* [dpdk-dev] [PATCH 1/4] compat: Add infrastructure to support symbol versioning
2014-09-15 19:23 [dpdk-dev] [PATCH 0/4] Add DSO symbol versioning to support backwards compatibility Neil Horman
@ 2014-09-15 19:23 ` Neil Horman
2014-09-23 10:39 ` Sergio Gonzalez Monroy
` (3 more replies)
2014-09-15 19:23 ` [dpdk-dev] [PATCH 2/4] Provide initial versioning for all DPDK libraries Neil Horman
` (3 subsequent siblings)
4 siblings, 4 replies; 43+ messages in thread
From: Neil Horman @ 2014-09-15 19:23 UTC (permalink / raw)
To: dev
Add initial pass header files to support symbol versioning.
Signed-off-by: Neil Horman <nhorman@tuxdriver.com>
CC: Thomas Monjalon <thomas.monjalon@6wind.com>
CC: "Richardson, Bruce" <bruce.richardson@intel.com>
---
lib/Makefile | 1 +
lib/librte_compat/Makefile | 38 +++++++++++++++++++
lib/librte_compat/rte_compat.h | 86 ++++++++++++++++++++++++++++++++++++++++++
mk/rte.lib.mk | 6 +++
4 files changed, 131 insertions(+)
create mode 100644 lib/librte_compat/Makefile
create mode 100644 lib/librte_compat/rte_compat.h
diff --git a/lib/Makefile b/lib/Makefile
index 10c5bb3..a85b55b 100644
--- a/lib/Makefile
+++ b/lib/Makefile
@@ -32,6 +32,7 @@
include $(RTE_SDK)/mk/rte.vars.mk
DIRS-$(CONFIG_RTE_LIBC) += libc
+DIRS-y += librte_compat
DIRS-$(CONFIG_RTE_LIBRTE_EAL) += librte_eal
DIRS-$(CONFIG_RTE_LIBRTE_MALLOC) += librte_malloc
DIRS-$(CONFIG_RTE_LIBRTE_RING) += librte_ring
diff --git a/lib/librte_compat/Makefile b/lib/librte_compat/Makefile
new file mode 100644
index 0000000..a61511a
--- /dev/null
+++ b/lib/librte_compat/Makefile
@@ -0,0 +1,38 @@
+# BSD LICENSE
+#
+# Copyright(c) 2010-2014 Intel Corporation. All rights reserved.
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+#
+# * Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+# * Redistributions in binary form must reproduce the above copyright
+# notice, this list of conditions and the following disclaimer in
+# the documentation and/or other materials provided with the
+# distribution.
+# * Neither the name of Intel Corporation nor the names of its
+# contributors may be used to endorse or promote products derived
+# from this software without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+include $(RTE_SDK)/mk/rte.vars.mk
+
+
+# install includes
+SYMLINK-y-include := rte_compat.h
+
+include $(RTE_SDK)/mk/rte.lib.mk
diff --git a/lib/librte_compat/rte_compat.h b/lib/librte_compat/rte_compat.h
new file mode 100644
index 0000000..6d65a53
--- /dev/null
+++ b/lib/librte_compat/rte_compat.h
@@ -0,0 +1,86 @@
+/*-
+ * BSD LICENSE
+ *
+ * Copyright(c) 2010-2014 Intel Corporation. All rights reserved.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ * * Neither the name of Intel Corporation nor the names of its
+ * contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef _RTE_COMPAT_H_
+#define _RTE_COMPAT_H_
+
+/*
+ * This is just a stringification macro for use below.
+ */
+#define SA(x) #x
+
+#ifdef RTE_SYMBOL_VERSIONING
+
+/*
+ * Provides backwards compatibility when updating exported functions.
+ * When a symol is exported from a library to provide an API, it also provides a
+ * calling convention (ABI) that is embodied in its name, return type,
+ * arguments, etc. On occasion that function may need to change to accomodate
+ * new functionality, behavior, etc. When that occurs, it is desireable to
+ * allow for backwards compatibility for a time with older binaries that are
+ * dynamically linked to the dpdk. to support that the __vsym and
+ * VERSION_SYMBOL macros are created. They, in conjunction with the
+ * <library>_version.map file for a given library allow for multiple versions of
+ * a symbol to exist in a shared library so that older binaries need not be
+ * immediately recompiled. Their use is outlined in the following example:
+ * Assumptions: DPDK 1.(X) contains a function int foo(char *string)
+ * DPDK 1.(X+1) needs to change foo to be int foo(int index)
+ *
+ * To accomplish this:
+ * 1) Edit lib/<library>/library_version.map to add a DPDK_1.8 node, in which
+ * foo is exported as a global symbol
+ *
+ * 2) rename the existing function int foo(char *string) to
+ * int __vsym foo_v18(char *string)
+ *
+ * 3) Add this macro immediately below the function
+ * VERSION_SYMBOL(foo, _v18, 1.8);
+ *
+ */
+#define VERSION_SYMBOL(b, e, v) __asm__(".symver " SA(b) SA(e) ", "SA(b)"@DPDK_"SA(v))
+#define __vsym __attribute__((used))
+
+#else
+/*
+ * No symbol versioning in use
+ */
+#define VERSION_SYMBOL(b, e, v)
+#define __vsym
+
+/*
+ * RTE_SYMBOL_VERSIONING
+ */
+#endif
+
+
+#endif /* _RTE_COMPAT_H_ */
diff --git a/mk/rte.lib.mk b/mk/rte.lib.mk
index f458258..82ac309 100644
--- a/mk/rte.lib.mk
+++ b/mk/rte.lib.mk
@@ -40,8 +40,12 @@ VPATH += $(SRCDIR)
ifeq ($(RTE_BUILD_SHARED_LIB),y)
LIB := $(patsubst %.a,%.so,$(LIB))
+
+CPU_LDFLAGS += --version-script=$(EXPORT_MAP)
+
endif
+
_BUILD = $(LIB)
_INSTALL = $(INSTALL-FILES-y) $(SYMLINK-FILES-y) $(RTE_OUTPUT)/lib/$(LIB)
_CLEAN = doclean
@@ -160,7 +164,9 @@ endif
$(RTE_OUTPUT)/lib/$(LIB): $(LIB)
@echo " INSTALL-LIB $(LIB)"
@[ -d $(RTE_OUTPUT)/lib ] || mkdir -p $(RTE_OUTPUT)/lib
+ifneq ($(LIB),)
$(Q)cp -f $(LIB) $(RTE_OUTPUT)/lib
+endif
#
# Clean all generated files
--
1.9.3
^ permalink raw reply [flat|nested] 43+ messages in thread
* Re: [dpdk-dev] [PATCH 1/4] compat: Add infrastructure to support symbol versioning
2014-09-15 19:23 ` [dpdk-dev] [PATCH 1/4] compat: Add infrastructure to support symbol versioning Neil Horman
@ 2014-09-23 10:39 ` Sergio Gonzalez Monroy
2014-09-23 14:58 ` Neil Horman
2014-09-25 18:52 ` [dpdk-dev] [PATCH 1/4 v2] " Neil Horman
` (2 subsequent siblings)
3 siblings, 1 reply; 43+ messages in thread
From: Sergio Gonzalez Monroy @ 2014-09-23 10:39 UTC (permalink / raw)
To: Neil Horman; +Cc: dev
Hi Neil,
On Mon, Sep 15, 2014 at 03:23:48PM -0400, Neil Horman wrote:
> Add initial pass header files to support symbol versioning.
>
> Signed-off-by: Neil Horman <nhorman@tuxdriver.com>
> CC: Thomas Monjalon <thomas.monjalon@6wind.com>
> CC: "Richardson, Bruce" <bruce.richardson@intel.com>
> ---
> lib/Makefile | 1 +
> lib/librte_compat/Makefile | 38 +++++++++++++++++++
> lib/librte_compat/rte_compat.h | 86 ++++++++++++++++++++++++++++++++++++++++++
> mk/rte.lib.mk | 6 +++
> 4 files changed, 131 insertions(+)
> create mode 100644 lib/librte_compat/Makefile
> create mode 100644 lib/librte_compat/rte_compat.h
>
> diff --git a/lib/Makefile b/lib/Makefile
> index 10c5bb3..a85b55b 100644
> --- a/lib/Makefile
> +++ b/lib/Makefile
> @@ -32,6 +32,7 @@
> include $(RTE_SDK)/mk/rte.vars.mk
>
> DIRS-$(CONFIG_RTE_LIBC) += libc
> +DIRS-y += librte_compat
> DIRS-$(CONFIG_RTE_LIBRTE_EAL) += librte_eal
> DIRS-$(CONFIG_RTE_LIBRTE_MALLOC) += librte_malloc
> DIRS-$(CONFIG_RTE_LIBRTE_RING) += librte_ring
> diff --git a/lib/librte_compat/Makefile b/lib/librte_compat/Makefile
> new file mode 100644
> index 0000000..a61511a
> --- /dev/null
> +++ b/lib/librte_compat/Makefile
> @@ -0,0 +1,38 @@
> +# BSD LICENSE
> +#
> +# Copyright(c) 2010-2014 Intel Corporation. All rights reserved.
> +# All rights reserved.
> +#
> +# Redistribution and use in source and binary forms, with or without
> +# modification, are permitted provided that the following conditions
> +# are met:
> +#
> +# * Redistributions of source code must retain the above copyright
> +# notice, this list of conditions and the following disclaimer.
> +# * Redistributions in binary form must reproduce the above copyright
> +# notice, this list of conditions and the following disclaimer in
> +# the documentation and/or other materials provided with the
> +# distribution.
> +# * Neither the name of Intel Corporation nor the names of its
> +# contributors may be used to endorse or promote products derived
> +# from this software without specific prior written permission.
> +#
> +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
> +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
> +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
> +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
> +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
> +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
> +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
> +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
> +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
> +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
> +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
> +
> +include $(RTE_SDK)/mk/rte.vars.mk
> +
> +
> +# install includes
> +SYMLINK-y-include := rte_compat.h
> +
> +include $(RTE_SDK)/mk/rte.lib.mk
> diff --git a/lib/librte_compat/rte_compat.h b/lib/librte_compat/rte_compat.h
> new file mode 100644
> index 0000000..6d65a53
> --- /dev/null
> +++ b/lib/librte_compat/rte_compat.h
> @@ -0,0 +1,86 @@
> +/*-
> + * BSD LICENSE
> + *
> + * Copyright(c) 2010-2014 Intel Corporation. All rights reserved.
> + * All rights reserved.
> + *
> + * Redistribution and use in source and binary forms, with or without
> + * modification, are permitted provided that the following conditions
> + * are met:
> + *
> + * * Redistributions of source code must retain the above copyright
> + * notice, this list of conditions and the following disclaimer.
> + * * Redistributions in binary form must reproduce the above copyright
> + * notice, this list of conditions and the following disclaimer in
> + * the documentation and/or other materials provided with the
> + * distribution.
> + * * Neither the name of Intel Corporation nor the names of its
> + * contributors may be used to endorse or promote products derived
> + * from this software without specific prior written permission.
> + *
> + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
> + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
> + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
> + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
> + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
> + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
> + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
> + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
> + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
> + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
> + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
> + */
> +
> +#ifndef _RTE_COMPAT_H_
> +#define _RTE_COMPAT_H_
> +
> +/*
> + * This is just a stringification macro for use below.
> + */
> +#define SA(x) #x
> +
> +#ifdef RTE_SYMBOL_VERSIONING
> +
> +/*
> + * Provides backwards compatibility when updating exported functions.
> + * When a symol is exported from a library to provide an API, it also provides a
> + * calling convention (ABI) that is embodied in its name, return type,
> + * arguments, etc. On occasion that function may need to change to accomodate
> + * new functionality, behavior, etc. When that occurs, it is desireable to
> + * allow for backwards compatibility for a time with older binaries that are
> + * dynamically linked to the dpdk. to support that the __vsym and
> + * VERSION_SYMBOL macros are created. They, in conjunction with the
> + * <library>_version.map file for a given library allow for multiple versions of
> + * a symbol to exist in a shared library so that older binaries need not be
> + * immediately recompiled. Their use is outlined in the following example:
> + * Assumptions: DPDK 1.(X) contains a function int foo(char *string)
> + * DPDK 1.(X+1) needs to change foo to be int foo(int index)
> + *
> + * To accomplish this:
> + * 1) Edit lib/<library>/library_version.map to add a DPDK_1.8 node, in which
> + * foo is exported as a global symbol
> + *
> + * 2) rename the existing function int foo(char *string) to
> + * int __vsym foo_v18(char *string)
> + *
> + * 3) Add this macro immediately below the function
> + * VERSION_SYMBOL(foo, _v18, 1.8);
> + *
> + */
> +#define VERSION_SYMBOL(b, e, v) __asm__(".symver " SA(b) SA(e) ", "SA(b)"@DPDK_"SA(v))
> +#define __vsym __attribute__((used))
> +
I may be missing something here but would it not be neccessary to define a
default symbol?
Otherwise there would be multiple definitions of a given symbol and the linker
won't know which symbol version to bind to.
Following your example, something along these lines:
4) Edit lib/<library>/library_version.map to add a DPDK_1.9 node that is a
successor to DPDK_1.8, in which foo is exported as a global symbol
DPDK_1.9 {
global: foo;
} DPDK_1.8;
5) rename new function int foo(int index) to
int __vsym foo_v19(int index)
6) Add this macro immediately below the function:
DEFAULT_SYMBOL(foo, _v19, 1.9);
#define DEFAULT_SYMBOL(b, e, v) __asm__(".symver " SA(b) SA(e) ", "SA(b)"@@DPDK_"SA(v))
> +#else
> +/*
> + * No symbol versioning in use
> + */
> +#define VERSION_SYMBOL(b, e, v)
> +#define __vsym
> +
> +/*
> + * RTE_SYMBOL_VERSIONING
> + */
> +#endif
> +
> +
> +#endif /* _RTE_COMPAT_H_ */
> diff --git a/mk/rte.lib.mk b/mk/rte.lib.mk
> index f458258..82ac309 100644
> --- a/mk/rte.lib.mk
> +++ b/mk/rte.lib.mk
> @@ -40,8 +40,12 @@ VPATH += $(SRCDIR)
>
> ifeq ($(RTE_BUILD_SHARED_LIB),y)
> LIB := $(patsubst %.a,%.so,$(LIB))
> +
> +CPU_LDFLAGS += --version-script=$(EXPORT_MAP)
> +
> endif
>
> +
> _BUILD = $(LIB)
> _INSTALL = $(INSTALL-FILES-y) $(SYMLINK-FILES-y) $(RTE_OUTPUT)/lib/$(LIB)
> _CLEAN = doclean
> @@ -160,7 +164,9 @@ endif
> $(RTE_OUTPUT)/lib/$(LIB): $(LIB)
> @echo " INSTALL-LIB $(LIB)"
> @[ -d $(RTE_OUTPUT)/lib ] || mkdir -p $(RTE_OUTPUT)/lib
> +ifneq ($(LIB),)
> $(Q)cp -f $(LIB) $(RTE_OUTPUT)/lib
> +endif
>
> #
> # Clean all generated files
> --
> 1.9.3
>
Sergio
^ permalink raw reply [flat|nested] 43+ messages in thread
* Re: [dpdk-dev] [PATCH 1/4] compat: Add infrastructure to support symbol versioning
2014-09-23 10:39 ` Sergio Gonzalez Monroy
@ 2014-09-23 14:58 ` Neil Horman
2014-09-23 16:29 ` Sergio Gonzalez Monroy
0 siblings, 1 reply; 43+ messages in thread
From: Neil Horman @ 2014-09-23 14:58 UTC (permalink / raw)
To: Sergio Gonzalez Monroy; +Cc: dev
On Tue, Sep 23, 2014 at 11:39:29AM +0100, Sergio Gonzalez Monroy wrote:
> Hi Neil,
>
> On Mon, Sep 15, 2014 at 03:23:48PM -0400, Neil Horman wrote:
> > Add initial pass header files to support symbol versioning.
> >
> > Signed-off-by: Neil Horman <nhorman@tuxdriver.com>
> > CC: Thomas Monjalon <thomas.monjalon@6wind.com>
> > CC: "Richardson, Bruce" <bruce.richardson@intel.com>
> > ---
> > lib/Makefile | 1 +
> > lib/librte_compat/Makefile | 38 +++++++++++++++++++
> > lib/librte_compat/rte_compat.h | 86 ++++++++++++++++++++++++++++++++++++++++++
> > mk/rte.lib.mk | 6 +++
> > 4 files changed, 131 insertions(+)
> > create mode 100644 lib/librte_compat/Makefile
> > create mode 100644 lib/librte_compat/rte_compat.h
> >
> > diff --git a/lib/Makefile b/lib/Makefile
> > index 10c5bb3..a85b55b 100644
> > --- a/lib/Makefile
> > +++ b/lib/Makefile
> > @@ -32,6 +32,7 @@
> > include $(RTE_SDK)/mk/rte.vars.mk
> >
> > DIRS-$(CONFIG_RTE_LIBC) += libc
> > +DIRS-y += librte_compat
> > DIRS-$(CONFIG_RTE_LIBRTE_EAL) += librte_eal
> > DIRS-$(CONFIG_RTE_LIBRTE_MALLOC) += librte_malloc
> > DIRS-$(CONFIG_RTE_LIBRTE_RING) += librte_ring
> > diff --git a/lib/librte_compat/Makefile b/lib/librte_compat/Makefile
> > new file mode 100644
> > index 0000000..a61511a
> > --- /dev/null
> > +++ b/lib/librte_compat/Makefile
> > @@ -0,0 +1,38 @@
> > +# BSD LICENSE
> > +#
> > +# Copyright(c) 2010-2014 Intel Corporation. All rights reserved.
> > +# All rights reserved.
> > +#
> > +# Redistribution and use in source and binary forms, with or without
> > +# modification, are permitted provided that the following conditions
> > +# are met:
> > +#
> > +# * Redistributions of source code must retain the above copyright
> > +# notice, this list of conditions and the following disclaimer.
> > +# * Redistributions in binary form must reproduce the above copyright
> > +# notice, this list of conditions and the following disclaimer in
> > +# the documentation and/or other materials provided with the
> > +# distribution.
> > +# * Neither the name of Intel Corporation nor the names of its
> > +# contributors may be used to endorse or promote products derived
> > +# from this software without specific prior written permission.
> > +#
> > +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
> > +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
> > +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
> > +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
> > +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
> > +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
> > +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
> > +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
> > +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
> > +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
> > +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
> > +
> > +include $(RTE_SDK)/mk/rte.vars.mk
> > +
> > +
> > +# install includes
> > +SYMLINK-y-include := rte_compat.h
> > +
> > +include $(RTE_SDK)/mk/rte.lib.mk
> > diff --git a/lib/librte_compat/rte_compat.h b/lib/librte_compat/rte_compat.h
> > new file mode 100644
> > index 0000000..6d65a53
> > --- /dev/null
> > +++ b/lib/librte_compat/rte_compat.h
> > @@ -0,0 +1,86 @@
> > +/*-
> > + * BSD LICENSE
> > + *
> > + * Copyright(c) 2010-2014 Intel Corporation. All rights reserved.
> > + * All rights reserved.
> > + *
> > + * Redistribution and use in source and binary forms, with or without
> > + * modification, are permitted provided that the following conditions
> > + * are met:
> > + *
> > + * * Redistributions of source code must retain the above copyright
> > + * notice, this list of conditions and the following disclaimer.
> > + * * Redistributions in binary form must reproduce the above copyright
> > + * notice, this list of conditions and the following disclaimer in
> > + * the documentation and/or other materials provided with the
> > + * distribution.
> > + * * Neither the name of Intel Corporation nor the names of its
> > + * contributors may be used to endorse or promote products derived
> > + * from this software without specific prior written permission.
> > + *
> > + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
> > + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
> > + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
> > + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
> > + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
> > + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
> > + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
> > + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
> > + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
> > + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
> > + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
> > + */
> > +
> > +#ifndef _RTE_COMPAT_H_
> > +#define _RTE_COMPAT_H_
> > +
> > +/*
> > + * This is just a stringification macro for use below.
> > + */
> > +#define SA(x) #x
> > +
> > +#ifdef RTE_SYMBOL_VERSIONING
> > +
> > +/*
> > + * Provides backwards compatibility when updating exported functions.
> > + * When a symol is exported from a library to provide an API, it also provides a
> > + * calling convention (ABI) that is embodied in its name, return type,
> > + * arguments, etc. On occasion that function may need to change to accomodate
> > + * new functionality, behavior, etc. When that occurs, it is desireable to
> > + * allow for backwards compatibility for a time with older binaries that are
> > + * dynamically linked to the dpdk. to support that the __vsym and
> > + * VERSION_SYMBOL macros are created. They, in conjunction with the
> > + * <library>_version.map file for a given library allow for multiple versions of
> > + * a symbol to exist in a shared library so that older binaries need not be
> > + * immediately recompiled. Their use is outlined in the following example:
> > + * Assumptions: DPDK 1.(X) contains a function int foo(char *string)
> > + * DPDK 1.(X+1) needs to change foo to be int foo(int index)
> > + *
> > + * To accomplish this:
> > + * 1) Edit lib/<library>/library_version.map to add a DPDK_1.8 node, in which
> > + * foo is exported as a global symbol
> > + *
> > + * 2) rename the existing function int foo(char *string) to
> > + * int __vsym foo_v18(char *string)
> > + *
> > + * 3) Add this macro immediately below the function
> > + * VERSION_SYMBOL(foo, _v18, 1.8);
> > + *
> > + */
> > +#define VERSION_SYMBOL(b, e, v) __asm__(".symver " SA(b) SA(e) ", "SA(b)"@DPDK_"SA(v))
> > +#define __vsym __attribute__((used))
> > +
>
> I may be missing something here but would it not be neccessary to define a
> default symbol?
> Otherwise there would be multiple definitions of a given symbol and the linker
> won't know which symbol version to bind to.
>
> Following your example, something along these lines:
> 4) Edit lib/<library>/library_version.map to add a DPDK_1.9 node that is a
> successor to DPDK_1.8, in which foo is exported as a global symbol
> DPDK_1.9 {
> global: foo;
> } DPDK_1.8;
>
> 5) rename new function int foo(int index) to
> int __vsym foo_v19(int index)
>
> 6) Add this macro immediately below the function:
> DEFAULT_SYMBOL(foo, _v19, 1.9);
>
> #define DEFAULT_SYMBOL(b, e, v) __asm__(".symver " SA(b) SA(e) ", "SA(b)"@@DPDK_"SA(v))
>
You're spot on (though the macro that I created in rte_compat.h is
VERSION_SYMBOL).
When you use a version script to create a DSO, at link time, the appropriate
version is appended to the symbol name (you can see it with objdump -t in a
linked binary). If you want to update the symbol to a new version, you do what
I documented in the header file (though now that I re-read it, it could be more
clear. Hows this for a change to the documentation:
To make a new version of a function foo in a DSO:
1) Edit lib/<library>/library_version.map to add a DPDK_1.8 node, in which
foo is exported as a global symbol
2) rename the existing function int foo(char *string) to
int __vsym foo_v18(char *string)
3) Add this macro immediately below the function
VERSION_SYMBOL(foo, _v18, 1.8);
4) Implement the new version of the function foo.
Those steps above will create two symbols in your export table of the DSO:
foo@@DPDK_1.8
foo@@DPDK_1.9
Any application linked against this DSO will link against the latest version
(DPDK_1.9). But if you look at the symbols referenced in a binary linked
against an older version of the same DSO, you'll note they explicitly look for
foo@@DPDK_1.8. Thats how we provide backwards compatibility
Does that answer your questions?
Neil
> > +#else
> > +/*
> > + * No symbol versioning in use
> > + */
> > +#define VERSION_SYMBOL(b, e, v)
> > +#define __vsym
> > +
> > +/*
> > + * RTE_SYMBOL_VERSIONING
> > + */
> > +#endif
> > +
> > +
> > +#endif /* _RTE_COMPAT_H_ */
> > diff --git a/mk/rte.lib.mk b/mk/rte.lib.mk
> > index f458258..82ac309 100644
> > --- a/mk/rte.lib.mk
> > +++ b/mk/rte.lib.mk
> > @@ -40,8 +40,12 @@ VPATH += $(SRCDIR)
> >
> > ifeq ($(RTE_BUILD_SHARED_LIB),y)
> > LIB := $(patsubst %.a,%.so,$(LIB))
> > +
> > +CPU_LDFLAGS += --version-script=$(EXPORT_MAP)
> > +
> > endif
> >
> > +
> > _BUILD = $(LIB)
> > _INSTALL = $(INSTALL-FILES-y) $(SYMLINK-FILES-y) $(RTE_OUTPUT)/lib/$(LIB)
> > _CLEAN = doclean
> > @@ -160,7 +164,9 @@ endif
> > $(RTE_OUTPUT)/lib/$(LIB): $(LIB)
> > @echo " INSTALL-LIB $(LIB)"
> > @[ -d $(RTE_OUTPUT)/lib ] || mkdir -p $(RTE_OUTPUT)/lib
> > +ifneq ($(LIB),)
> > $(Q)cp -f $(LIB) $(RTE_OUTPUT)/lib
> > +endif
> >
> > #
> > # Clean all generated files
> > --
> > 1.9.3
> >
>
> Sergio
>
^ permalink raw reply [flat|nested] 43+ messages in thread
* Re: [dpdk-dev] [PATCH 1/4] compat: Add infrastructure to support symbol versioning
2014-09-23 14:58 ` Neil Horman
@ 2014-09-23 16:29 ` Sergio Gonzalez Monroy
2014-09-23 17:31 ` Neil Horman
0 siblings, 1 reply; 43+ messages in thread
From: Sergio Gonzalez Monroy @ 2014-09-23 16:29 UTC (permalink / raw)
To: Neil Horman; +Cc: dev
On Tue, Sep 23, 2014 at 10:58:29AM -0400, Neil Horman wrote:
> On Tue, Sep 23, 2014 at 11:39:29AM +0100, Sergio Gonzalez Monroy wrote:
> > Hi Neil,
> >
> > On Mon, Sep 15, 2014 at 03:23:48PM -0400, Neil Horman wrote:
> > > Add initial pass header files to support symbol versioning.
> > >
> > > Signed-off-by: Neil Horman <nhorman@tuxdriver.com>
> > > CC: Thomas Monjalon <thomas.monjalon@6wind.com>
> > > CC: "Richardson, Bruce" <bruce.richardson@intel.com>
> > > ---
> > > lib/Makefile | 1 +
> > > lib/librte_compat/Makefile | 38 +++++++++++++++++++
> > > lib/librte_compat/rte_compat.h | 86 ++++++++++++++++++++++++++++++++++++++++++
> > > mk/rte.lib.mk | 6 +++
> > > 4 files changed, 131 insertions(+)
> > > create mode 100644 lib/librte_compat/Makefile
> > > create mode 100644 lib/librte_compat/rte_compat.h
> > >
> > > diff --git a/lib/Makefile b/lib/Makefile
> > > index 10c5bb3..a85b55b 100644
> > > --- a/lib/Makefile
> > > +++ b/lib/Makefile
> > > @@ -32,6 +32,7 @@
> > > include $(RTE_SDK)/mk/rte.vars.mk
> > >
> > > DIRS-$(CONFIG_RTE_LIBC) += libc
> > > +DIRS-y += librte_compat
> > > DIRS-$(CONFIG_RTE_LIBRTE_EAL) += librte_eal
> > > DIRS-$(CONFIG_RTE_LIBRTE_MALLOC) += librte_malloc
> > > DIRS-$(CONFIG_RTE_LIBRTE_RING) += librte_ring
> > > diff --git a/lib/librte_compat/Makefile b/lib/librte_compat/Makefile
> > > new file mode 100644
> > > index 0000000..a61511a
> > > --- /dev/null
> > > +++ b/lib/librte_compat/Makefile
> > > @@ -0,0 +1,38 @@
> > > +# BSD LICENSE
> > > +#
> > > +# Copyright(c) 2010-2014 Intel Corporation. All rights reserved.
> > > +# All rights reserved.
> > > +#
> > > +# Redistribution and use in source and binary forms, with or without
> > > +# modification, are permitted provided that the following conditions
> > > +# are met:
> > > +#
> > > +# * Redistributions of source code must retain the above copyright
> > > +# notice, this list of conditions and the following disclaimer.
> > > +# * Redistributions in binary form must reproduce the above copyright
> > > +# notice, this list of conditions and the following disclaimer in
> > > +# the documentation and/or other materials provided with the
> > > +# distribution.
> > > +# * Neither the name of Intel Corporation nor the names of its
> > > +# contributors may be used to endorse or promote products derived
> > > +# from this software without specific prior written permission.
> > > +#
> > > +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
> > > +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
> > > +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
> > > +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
> > > +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
> > > +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
> > > +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
> > > +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
> > > +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
> > > +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
> > > +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
> > > +
> > > +include $(RTE_SDK)/mk/rte.vars.mk
> > > +
> > > +
> > > +# install includes
> > > +SYMLINK-y-include := rte_compat.h
> > > +
> > > +include $(RTE_SDK)/mk/rte.lib.mk
> > > diff --git a/lib/librte_compat/rte_compat.h b/lib/librte_compat/rte_compat.h
> > > new file mode 100644
> > > index 0000000..6d65a53
> > > --- /dev/null
> > > +++ b/lib/librte_compat/rte_compat.h
> > > @@ -0,0 +1,86 @@
> > > +/*-
> > > + * BSD LICENSE
> > > + *
> > > + * Copyright(c) 2010-2014 Intel Corporation. All rights reserved.
> > > + * All rights reserved.
> > > + *
> > > + * Redistribution and use in source and binary forms, with or without
> > > + * modification, are permitted provided that the following conditions
> > > + * are met:
> > > + *
> > > + * * Redistributions of source code must retain the above copyright
> > > + * notice, this list of conditions and the following disclaimer.
> > > + * * Redistributions in binary form must reproduce the above copyright
> > > + * notice, this list of conditions and the following disclaimer in
> > > + * the documentation and/or other materials provided with the
> > > + * distribution.
> > > + * * Neither the name of Intel Corporation nor the names of its
> > > + * contributors may be used to endorse or promote products derived
> > > + * from this software without specific prior written permission.
> > > + *
> > > + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
> > > + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
> > > + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
> > > + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
> > > + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
> > > + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
> > > + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
> > > + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
> > > + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
> > > + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
> > > + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
> > > + */
> > > +
> > > +#ifndef _RTE_COMPAT_H_
> > > +#define _RTE_COMPAT_H_
> > > +
> > > +/*
> > > + * This is just a stringification macro for use below.
> > > + */
> > > +#define SA(x) #x
> > > +
> > > +#ifdef RTE_SYMBOL_VERSIONING
> > > +
> > > +/*
> > > + * Provides backwards compatibility when updating exported functions.
> > > + * When a symol is exported from a library to provide an API, it also provides a
> > > + * calling convention (ABI) that is embodied in its name, return type,
> > > + * arguments, etc. On occasion that function may need to change to accomodate
> > > + * new functionality, behavior, etc. When that occurs, it is desireable to
> > > + * allow for backwards compatibility for a time with older binaries that are
> > > + * dynamically linked to the dpdk. to support that the __vsym and
> > > + * VERSION_SYMBOL macros are created. They, in conjunction with the
> > > + * <library>_version.map file for a given library allow for multiple versions of
> > > + * a symbol to exist in a shared library so that older binaries need not be
> > > + * immediately recompiled. Their use is outlined in the following example:
> > > + * Assumptions: DPDK 1.(X) contains a function int foo(char *string)
> > > + * DPDK 1.(X+1) needs to change foo to be int foo(int index)
> > > + *
> > > + * To accomplish this:
> > > + * 1) Edit lib/<library>/library_version.map to add a DPDK_1.8 node, in which
> > > + * foo is exported as a global symbol
> > > + *
> > > + * 2) rename the existing function int foo(char *string) to
> > > + * int __vsym foo_v18(char *string)
> > > + *
> > > + * 3) Add this macro immediately below the function
> > > + * VERSION_SYMBOL(foo, _v18, 1.8);
> > > + *
> > > + */
> > > +#define VERSION_SYMBOL(b, e, v) __asm__(".symver " SA(b) SA(e) ", "SA(b)"@DPDK_"SA(v))
> > > +#define __vsym __attribute__((used))
> > > +
> >
> > I may be missing something here but would it not be neccessary to define a
> > default symbol?
> > Otherwise there would be multiple definitions of a given symbol and the linker
> > won't know which symbol version to bind to.
> >
> > Following your example, something along these lines:
> > 4) Edit lib/<library>/library_version.map to add a DPDK_1.9 node that is a
> > successor to DPDK_1.8, in which foo is exported as a global symbol
> > DPDK_1.9 {
> > global: foo;
> > } DPDK_1.8;
> >
> > 5) rename new function int foo(int index) to
> > int __vsym foo_v19(int index)
> >
> > 6) Add this macro immediately below the function:
> > DEFAULT_SYMBOL(foo, _v19, 1.9);
> >
> > #define DEFAULT_SYMBOL(b, e, v) __asm__(".symver " SA(b) SA(e) ", "SA(b)"@@DPDK_"SA(v))
> >
>
> You're spot on (though the macro that I created in rte_compat.h is
> VERSION_SYMBOL).
>
> When you use a version script to create a DSO, at link time, the appropriate
> version is appended to the symbol name (you can see it with objdump -t in a
> linked binary). If you want to update the symbol to a new version, you do what
> I documented in the header file (though now that I re-read it, it could be more
> clear. Hows this for a change to the documentation:
>
> To make a new version of a function foo in a DSO:
>
> 1) Edit lib/<library>/library_version.map to add a DPDK_1.8 node, in which
> foo is exported as a global symbol
>
> 2) rename the existing function int foo(char *string) to
> int __vsym foo_v18(char *string)
>
> 3) Add this macro immediately below the function
> VERSION_SYMBOL(foo, _v18, 1.8);
>
> 4) Implement the new version of the function foo.
>
>
> Those steps above will create two symbols in your export table of the DSO:
>
> foo@@DPDK_1.8
> foo@@DPDK_1.9
>
> Any application linked against this DSO will link against the latest version
> (DPDK_1.9). But if you look at the symbols referenced in a binary linked
> against an older version of the same DSO, you'll note they explicitly look for
> foo@@DPDK_1.8. Thats how we provide backwards compatibility
>
> Does that answer your questions?
>
> Neil
>
Correct me if I am wrong but when we define multiple versions of a symbol we
need to specify a default one.
As an example, if we were to have three versions of foo the export table of the
DSO should look something like this:
foo@VER_1.0
foo@VER_1.1
foo@@VER_1.2
In the above example, foo VER_1.2 is the default one and is indicated by
having double @.
Effectively we would need two macros VERSION_SYMBOL and DEFAULT_VERSION_SYMBOL
(maybe this name is more appropriate).
#define VERSION_SYMBOL(b, e, v) \
__asm__(".symver " SA(b) SA(e) ", "SA(b)"@DPDK_"SA(v))
#define DEFAULT_VERSION_SYMBOL(b, e, v) \
__asm__(".symver " SA(b) SA(e) ", "SA(b)"@@DPDK_"SA(v))
Following on the example, we should have something like:
int __vsym foo_v18(char *string) {...}
VERSION_SYMBOL(foo, _v18, 1.8);
int __vsym foo_v19(int index) {...}
DEFAULT_VERSION_SYMBOL(foo, _v19, 1.9);
The DSO export table would have the following symbols:
foo@DPDK_1.8
foo@@DPDK_1.9
Old binaries linked against DPDK 1.8 would have references to:
foo@@DPDK_1.8
and new binaries linked against DPDK 1.9 would have to:
foo@@DPDK_1.9
Sergio
> > > +#else
> > > +/*
> > > + * No symbol versioning in use
> > > + */
> > > +#define VERSION_SYMBOL(b, e, v)
> > > +#define __vsym
> > > +
> > > +/*
> > > + * RTE_SYMBOL_VERSIONING
> > > + */
> > > +#endif
> > > +
> > > +
> > > +#endif /* _RTE_COMPAT_H_ */
> > > diff --git a/mk/rte.lib.mk b/mk/rte.lib.mk
> > > index f458258..82ac309 100644
> > > --- a/mk/rte.lib.mk
> > > +++ b/mk/rte.lib.mk
> > > @@ -40,8 +40,12 @@ VPATH += $(SRCDIR)
> > >
> > > ifeq ($(RTE_BUILD_SHARED_LIB),y)
> > > LIB := $(patsubst %.a,%.so,$(LIB))
> > > +
> > > +CPU_LDFLAGS += --version-script=$(EXPORT_MAP)
> > > +
> > > endif
> > >
> > > +
> > > _BUILD = $(LIB)
> > > _INSTALL = $(INSTALL-FILES-y) $(SYMLINK-FILES-y) $(RTE_OUTPUT)/lib/$(LIB)
> > > _CLEAN = doclean
> > > @@ -160,7 +164,9 @@ endif
> > > $(RTE_OUTPUT)/lib/$(LIB): $(LIB)
> > > @echo " INSTALL-LIB $(LIB)"
> > > @[ -d $(RTE_OUTPUT)/lib ] || mkdir -p $(RTE_OUTPUT)/lib
> > > +ifneq ($(LIB),)
> > > $(Q)cp -f $(LIB) $(RTE_OUTPUT)/lib
> > > +endif
> > >
> > > #
> > > # Clean all generated files
> > > --
> > > 1.9.3
> > >
> >
> > Sergio
> >
^ permalink raw reply [flat|nested] 43+ messages in thread
* Re: [dpdk-dev] [PATCH 1/4] compat: Add infrastructure to support symbol versioning
2014-09-23 16:29 ` Sergio Gonzalez Monroy
@ 2014-09-23 17:31 ` Neil Horman
0 siblings, 0 replies; 43+ messages in thread
From: Neil Horman @ 2014-09-23 17:31 UTC (permalink / raw)
To: Sergio Gonzalez Monroy; +Cc: dev
On Tue, Sep 23, 2014 at 05:29:48PM +0100, Sergio Gonzalez Monroy wrote:
> On Tue, Sep 23, 2014 at 10:58:29AM -0400, Neil Horman wrote:
> > On Tue, Sep 23, 2014 at 11:39:29AM +0100, Sergio Gonzalez Monroy wrote:
> > > Hi Neil,
> > >
> > > On Mon, Sep 15, 2014 at 03:23:48PM -0400, Neil Horman wrote:
> > > > Add initial pass header files to support symbol versioning.
> > > >
> > > > Signed-off-by: Neil Horman <nhorman@tuxdriver.com>
> > > > CC: Thomas Monjalon <thomas.monjalon@6wind.com>
> > > > CC: "Richardson, Bruce" <bruce.richardson@intel.com>
> > > > ---
> > > > lib/Makefile | 1 +
> > > > lib/librte_compat/Makefile | 38 +++++++++++++++++++
> > > > lib/librte_compat/rte_compat.h | 86 ++++++++++++++++++++++++++++++++++++++++++
> > > > mk/rte.lib.mk | 6 +++
> > > > 4 files changed, 131 insertions(+)
> > > > create mode 100644 lib/librte_compat/Makefile
> > > > create mode 100644 lib/librte_compat/rte_compat.h
> > > >
> > > > diff --git a/lib/Makefile b/lib/Makefile
> > > > index 10c5bb3..a85b55b 100644
> > > > --- a/lib/Makefile
> > > > +++ b/lib/Makefile
> > > > @@ -32,6 +32,7 @@
> > > > include $(RTE_SDK)/mk/rte.vars.mk
> > > >
> > > > DIRS-$(CONFIG_RTE_LIBC) += libc
> > > > +DIRS-y += librte_compat
> > > > DIRS-$(CONFIG_RTE_LIBRTE_EAL) += librte_eal
> > > > DIRS-$(CONFIG_RTE_LIBRTE_MALLOC) += librte_malloc
> > > > DIRS-$(CONFIG_RTE_LIBRTE_RING) += librte_ring
> > > > diff --git a/lib/librte_compat/Makefile b/lib/librte_compat/Makefile
> > > > new file mode 100644
> > > > index 0000000..a61511a
> > > > --- /dev/null
> > > > +++ b/lib/librte_compat/Makefile
> > > > @@ -0,0 +1,38 @@
> > > > +# BSD LICENSE
> > > > +#
> > > > +# Copyright(c) 2010-2014 Intel Corporation. All rights reserved.
> > > > +# All rights reserved.
> > > > +#
> > > > +# Redistribution and use in source and binary forms, with or without
> > > > +# modification, are permitted provided that the following conditions
> > > > +# are met:
> > > > +#
> > > > +# * Redistributions of source code must retain the above copyright
> > > > +# notice, this list of conditions and the following disclaimer.
> > > > +# * Redistributions in binary form must reproduce the above copyright
> > > > +# notice, this list of conditions and the following disclaimer in
> > > > +# the documentation and/or other materials provided with the
> > > > +# distribution.
> > > > +# * Neither the name of Intel Corporation nor the names of its
> > > > +# contributors may be used to endorse or promote products derived
> > > > +# from this software without specific prior written permission.
> > > > +#
> > > > +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
> > > > +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
> > > > +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
> > > > +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
> > > > +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
> > > > +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
> > > > +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
> > > > +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
> > > > +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
> > > > +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
> > > > +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
> > > > +
> > > > +include $(RTE_SDK)/mk/rte.vars.mk
> > > > +
> > > > +
> > > > +# install includes
> > > > +SYMLINK-y-include := rte_compat.h
> > > > +
> > > > +include $(RTE_SDK)/mk/rte.lib.mk
> > > > diff --git a/lib/librte_compat/rte_compat.h b/lib/librte_compat/rte_compat.h
> > > > new file mode 100644
> > > > index 0000000..6d65a53
> > > > --- /dev/null
> > > > +++ b/lib/librte_compat/rte_compat.h
> > > > @@ -0,0 +1,86 @@
> > > > +/*-
> > > > + * BSD LICENSE
> > > > + *
> > > > + * Copyright(c) 2010-2014 Intel Corporation. All rights reserved.
> > > > + * All rights reserved.
> > > > + *
> > > > + * Redistribution and use in source and binary forms, with or without
> > > > + * modification, are permitted provided that the following conditions
> > > > + * are met:
> > > > + *
> > > > + * * Redistributions of source code must retain the above copyright
> > > > + * notice, this list of conditions and the following disclaimer.
> > > > + * * Redistributions in binary form must reproduce the above copyright
> > > > + * notice, this list of conditions and the following disclaimer in
> > > > + * the documentation and/or other materials provided with the
> > > > + * distribution.
> > > > + * * Neither the name of Intel Corporation nor the names of its
> > > > + * contributors may be used to endorse or promote products derived
> > > > + * from this software without specific prior written permission.
> > > > + *
> > > > + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
> > > > + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
> > > > + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
> > > > + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
> > > > + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
> > > > + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
> > > > + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
> > > > + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
> > > > + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
> > > > + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
> > > > + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
> > > > + */
> > > > +
> > > > +#ifndef _RTE_COMPAT_H_
> > > > +#define _RTE_COMPAT_H_
> > > > +
> > > > +/*
> > > > + * This is just a stringification macro for use below.
> > > > + */
> > > > +#define SA(x) #x
> > > > +
> > > > +#ifdef RTE_SYMBOL_VERSIONING
> > > > +
> > > > +/*
> > > > + * Provides backwards compatibility when updating exported functions.
> > > > + * When a symol is exported from a library to provide an API, it also provides a
> > > > + * calling convention (ABI) that is embodied in its name, return type,
> > > > + * arguments, etc. On occasion that function may need to change to accomodate
> > > > + * new functionality, behavior, etc. When that occurs, it is desireable to
> > > > + * allow for backwards compatibility for a time with older binaries that are
> > > > + * dynamically linked to the dpdk. to support that the __vsym and
> > > > + * VERSION_SYMBOL macros are created. They, in conjunction with the
> > > > + * <library>_version.map file for a given library allow for multiple versions of
> > > > + * a symbol to exist in a shared library so that older binaries need not be
> > > > + * immediately recompiled. Their use is outlined in the following example:
> > > > + * Assumptions: DPDK 1.(X) contains a function int foo(char *string)
> > > > + * DPDK 1.(X+1) needs to change foo to be int foo(int index)
> > > > + *
> > > > + * To accomplish this:
> > > > + * 1) Edit lib/<library>/library_version.map to add a DPDK_1.8 node, in which
> > > > + * foo is exported as a global symbol
> > > > + *
> > > > + * 2) rename the existing function int foo(char *string) to
> > > > + * int __vsym foo_v18(char *string)
> > > > + *
> > > > + * 3) Add this macro immediately below the function
> > > > + * VERSION_SYMBOL(foo, _v18, 1.8);
> > > > + *
> > > > + */
> > > > +#define VERSION_SYMBOL(b, e, v) __asm__(".symver " SA(b) SA(e) ", "SA(b)"@DPDK_"SA(v))
> > > > +#define __vsym __attribute__((used))
> > > > +
> > >
> > > I may be missing something here but would it not be neccessary to define a
> > > default symbol?
> > > Otherwise there would be multiple definitions of a given symbol and the linker
> > > won't know which symbol version to bind to.
> > >
> > > Following your example, something along these lines:
> > > 4) Edit lib/<library>/library_version.map to add a DPDK_1.9 node that is a
> > > successor to DPDK_1.8, in which foo is exported as a global symbol
> > > DPDK_1.9 {
> > > global: foo;
> > > } DPDK_1.8;
> > >
> > > 5) rename new function int foo(int index) to
> > > int __vsym foo_v19(int index)
> > >
> > > 6) Add this macro immediately below the function:
> > > DEFAULT_SYMBOL(foo, _v19, 1.9);
> > >
> > > #define DEFAULT_SYMBOL(b, e, v) __asm__(".symver " SA(b) SA(e) ", "SA(b)"@@DPDK_"SA(v))
> > >
> >
> > You're spot on (though the macro that I created in rte_compat.h is
> > VERSION_SYMBOL).
> >
> > When you use a version script to create a DSO, at link time, the appropriate
> > version is appended to the symbol name (you can see it with objdump -t in a
> > linked binary). If you want to update the symbol to a new version, you do what
> > I documented in the header file (though now that I re-read it, it could be more
> > clear. Hows this for a change to the documentation:
> >
> > To make a new version of a function foo in a DSO:
> >
> > 1) Edit lib/<library>/library_version.map to add a DPDK_1.8 node, in which
> > foo is exported as a global symbol
> >
> > 2) rename the existing function int foo(char *string) to
> > int __vsym foo_v18(char *string)
> >
> > 3) Add this macro immediately below the function
> > VERSION_SYMBOL(foo, _v18, 1.8);
> >
> > 4) Implement the new version of the function foo.
> >
> >
> > Those steps above will create two symbols in your export table of the DSO:
> >
> > foo@@DPDK_1.8
> > foo@@DPDK_1.9
> >
> > Any application linked against this DSO will link against the latest version
> > (DPDK_1.9). But if you look at the symbols referenced in a binary linked
> > against an older version of the same DSO, you'll note they explicitly look for
> > foo@@DPDK_1.8. Thats how we provide backwards compatibility
> >
> > Does that answer your questions?
> >
> > Neil
> >
> Correct me if I am wrong but when we define multiple versions of a symbol we
> need to specify a default one.
You are corrected :). The "Default" symbol is implicitly the latest version of
the symbol (where the ordinality of the symbol versions is defined by the map
file).
> As an example, if we were to have three versions of foo the export table of the
> DSO should look something like this:
>
> foo@VER_1.0
> foo@VER_1.1
> foo@@VER_1.2
>
> In the above example, foo VER_1.2 is the default one and is such based on the
fact that it is ordinally the most recent in the version map file.
Its the default symbol because its the latest one according to the map file (and
denoted by the double @'s). When linking that is the only symbol visibile to
the application being linked.
> Effectively we would need two macros VERSION_SYMBOL and DEFAULT_VERSION_SYMBOL
> (maybe this name is more appropriate).
>
Nope, we don't, because as you note above, the default is implicit by the fact
that it is ordinally the latest, and the latest version of the symbol is the
only version that the linker "sees" when linking new applications. The
VERSION_SYMBOL macro exists to tie older binary applications to the older
versions of the symbol at _load_ time.
> #define VERSION_SYMBOL(b, e, v) \
> __asm__(".symver " SA(b) SA(e) ", "SA(b)"@DPDK_"SA(v))
> #define DEFAULT_VERSION_SYMBOL(b, e, v) \
> __asm__(".symver " SA(b) SA(e) ", "SA(b)"@@DPDK_"SA(v))
>
Nope. Don't need it.
> Following on the example, we should have something like:
>
> int __vsym foo_v18(char *string) {...}
> VERSION_SYMBOL(foo, _v18, 1.8);
>
> int __vsym foo_v19(int index) {...}
> DEFAULT_VERSION_SYMBOL(foo, _v19, 1.9);
>
Nope. Lets start a bit further back. Assume we have the following map file:
DPDK_1.8 {
global:
foo;
};
And we have this in a C file:
void foo(int num) {
<implementation for version 1.8>
}
Then we want to update the foo function to something that is binary
incompatible. We would change the version map file as follows:
DPDK_1.8 {
global:
foo;
}
DPDK_1.9 {
global:
foo;
} DPDK_1.8;
That construct makes the linker see DPDK_1.9 ad ordinally "newer" than DPDK_1.8,
so symobls that are global in that version are exported rather than their older
counterparts in the DPDK_1.8 export set. When the linker links a new
application it only links to the latest version
Then in the C file we do the following:
void foo_v18(int num) {
<implementation for version 1.8>
}
VERSION_SYMBOL(foo, _v18, 1.8);
int foo(char *name) {
<implementation for version 1.9>
}
With this change, the new foo function is implicitly matched to version 1.9 in
the map file, and thats what gets linked to new application. The
VERSION_SYMBOL macro exports an additional symbol, foo@@DPDK_1.9, so that
previously built applications, that were linked when the origional version of
foo was the latest, will still find the appropriate symbol as foo@@DPDK_1.8
We could in fact something like what you are suggesting, in that we could use
the VERSION_SYMBOL macro on every exported function so that we explicitly tied
every version of every exported symbol to a statically defined version of the
function with a variant name (i.e. we could have a foo_v18, a foo_v19, foo_vX,
for every supported API version if you wanted), but that creates alot more work
for us. for instance, when doing a non DSO build, you still have to map each
symbol to a specfic version, and you have to keep that updated. By doing it the
way I did above, the actual function name is always the latest version, and you
only have to rename functions if you need to modify the api (I'm working under
the assumption that needing to do this is going to be somewhat rare).
Hope that helps
Neil
> The DSO export table would have the following symbols:
>
> foo@DPDK_1.8
> foo@@DPDK_1.9
>
> Old binaries linked against DPDK 1.8 would have references to:
> foo@@DPDK_1.8
>
> and new binaries linked against DPDK 1.9 would have to:
> foo@@DPDK_1.9
>
> Sergio
>
> > > > +#else
> > > > +/*
> > > > + * No symbol versioning in use
> > > > + */
> > > > +#define VERSION_SYMBOL(b, e, v)
> > > > +#define __vsym
> > > > +
> > > > +/*
> > > > + * RTE_SYMBOL_VERSIONING
> > > > + */
> > > > +#endif
> > > > +
> > > > +
> > > > +#endif /* _RTE_COMPAT_H_ */
> > > > diff --git a/mk/rte.lib.mk b/mk/rte.lib.mk
> > > > index f458258..82ac309 100644
> > > > --- a/mk/rte.lib.mk
> > > > +++ b/mk/rte.lib.mk
> > > > @@ -40,8 +40,12 @@ VPATH += $(SRCDIR)
> > > >
> > > > ifeq ($(RTE_BUILD_SHARED_LIB),y)
> > > > LIB := $(patsubst %.a,%.so,$(LIB))
> > > > +
> > > > +CPU_LDFLAGS += --version-script=$(EXPORT_MAP)
> > > > +
> > > > endif
> > > >
> > > > +
> > > > _BUILD = $(LIB)
> > > > _INSTALL = $(INSTALL-FILES-y) $(SYMLINK-FILES-y) $(RTE_OUTPUT)/lib/$(LIB)
> > > > _CLEAN = doclean
> > > > @@ -160,7 +164,9 @@ endif
> > > > $(RTE_OUTPUT)/lib/$(LIB): $(LIB)
> > > > @echo " INSTALL-LIB $(LIB)"
> > > > @[ -d $(RTE_OUTPUT)/lib ] || mkdir -p $(RTE_OUTPUT)/lib
> > > > +ifneq ($(LIB),)
> > > > $(Q)cp -f $(LIB) $(RTE_OUTPUT)/lib
> > > > +endif
> > > >
> > > > #
> > > > # Clean all generated files
> > > > --
> > > > 1.9.3
> > > >
> > >
> > > Sergio
> > >
>
^ permalink raw reply [flat|nested] 43+ messages in thread
* [dpdk-dev] [PATCH 1/4 v2] compat: Add infrastructure to support symbol versioning
2014-09-15 19:23 ` [dpdk-dev] [PATCH 1/4] compat: Add infrastructure to support symbol versioning Neil Horman
2014-09-23 10:39 ` Sergio Gonzalez Monroy
@ 2014-09-25 18:52 ` Neil Horman
2014-09-26 14:16 ` Sergio Gonzalez Monroy
2014-09-29 15:44 ` [dpdk-dev] [PATCH 1/4 v3] " Neil Horman
2014-09-30 15:18 ` [dpdk-dev] [PATCH 1/4 v4] " Neil Horman
3 siblings, 1 reply; 43+ messages in thread
From: Neil Horman @ 2014-09-25 18:52 UTC (permalink / raw)
To: dev
Add initial pass header files to support symbol versioning.
---
Change notes
v2)
* Fixed ifdef in rte_compat.h to test for RTE_BUILD_SHARED_LIB instead of the
non-existant RTE_SYMBOL_VERSIONING
* Fixed VERSION_SYMBOL macro to add the needed extra @ to make versioning work
properly
* Improved/Clarified documentation
Signed-off-by: Neil Horman <nhorman@tuxdriver.com>
CC: Thomas Monjalon <thomas.monjalon@6wind.com>
CC: "Richardson, Bruce" <bruce.richardson@intel.com>
CC: "Gonzalez Monroy, Sergio" <sergio.gonzalez.monroy@intel.com>
---
lib/Makefile | 1 +
lib/librte_compat/Makefile | 38 ++++++++++++++++++
lib/librte_compat/rte_compat.h | 87 ++++++++++++++++++++++++++++++++++++++++++
mk/rte.lib.mk | 6 +++
4 files changed, 132 insertions(+)
create mode 100644 lib/librte_compat/Makefile
create mode 100644 lib/librte_compat/rte_compat.h
diff --git a/lib/Makefile b/lib/Makefile
index 10c5bb3..a85b55b 100644
--- a/lib/Makefile
+++ b/lib/Makefile
@@ -32,6 +32,7 @@
include $(RTE_SDK)/mk/rte.vars.mk
DIRS-$(CONFIG_RTE_LIBC) += libc
+DIRS-y += librte_compat
DIRS-$(CONFIG_RTE_LIBRTE_EAL) += librte_eal
DIRS-$(CONFIG_RTE_LIBRTE_MALLOC) += librte_malloc
DIRS-$(CONFIG_RTE_LIBRTE_RING) += librte_ring
diff --git a/lib/librte_compat/Makefile b/lib/librte_compat/Makefile
new file mode 100644
index 0000000..3415c7b
--- /dev/null
+++ b/lib/librte_compat/Makefile
@@ -0,0 +1,38 @@
+# BSD LICENSE
+#
+# Copyright(c) 2010-2014 Neil Horman <nhorman@tuxdriver.com>
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+#
+# * Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+# * Redistributions in binary form must reproduce the above copyright
+# notice, this list of conditions and the following disclaimer in
+# the documentation and/or other materials provided with the
+# distribution.
+# * Neither the name of Intel Corporation nor the names of its
+# contributors may be used to endorse or promote products derived
+# from this software without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+include $(RTE_SDK)/mk/rte.vars.mk
+
+
+# install includes
+SYMLINK-y-include := rte_compat.h
+
+include $(RTE_SDK)/mk/rte.lib.mk
diff --git a/lib/librte_compat/rte_compat.h b/lib/librte_compat/rte_compat.h
new file mode 100644
index 0000000..cff9aea
--- /dev/null
+++ b/lib/librte_compat/rte_compat.h
@@ -0,0 +1,87 @@
+/*-
+ * BSD LICENSE
+ *
+ * Copyright(c) 2010-2014 Neil Horman <nhorman@tuxdriver.com>.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ * * Neither the name of Intel Corporation nor the names of its
+ * contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef _RTE_COMPAT_H_
+#define _RTE_COMPAT_H_
+
+/*
+ * This is just a stringification macro for use below.
+ */
+#define SA(x) #x
+
+#ifdef RTE_BUILD_SHARED_LIB
+
+/*
+ * Provides backwards compatibility when updating exported functions.
+ * When a symol is exported from a library to provide an API, it also provides a
+ * calling convention (ABI) that is embodied in its name, return type,
+ * arguments, etc. On occasion that function may need to change to accomodate
+ * new functionality, behavior, etc. When that occurs, it is desireable to
+ * allow for backwards compatibility for a time with older binaries that are
+ * dynamically linked to the dpdk. to support that the __vsym and
+ * VERSION_SYMBOL macros are created. They, in conjunction with the
+ * <library>_version.map file for a given library allow for multiple versions of
+ * a symbol to exist in a shared library so that older binaries need not be
+ * immediately recompiled. Their use is outlined in the following example:
+ * Assumptions: DPDK 1.(X) contains a function int foo(char *string)
+ * DPDK 1.(X+1) needs to change foo to be int foo(int index)
+ *
+ * To accomplish this:
+ * 1) Edit lib/<library>/library_version.map to add a DPDK_1.(X+1) node, in which
+ * foo is exported as a global symbol. Note that foo must be removed from the
+ * DPDK.(X) node, or you will see multiple symbol definitions
+ *
+ * 2) rename the existing function int foo(char *string) to
+ * int __vsym foo_v18(char *string)
+ *
+ * 3) Add this macro immediately below the function
+ * VERSION_SYMBOL(foo, _v18, 1.8);
+ *
+ */
+#define VERSION_SYMBOL(b, e, v) __asm__(".symver " SA(b) SA(e) ", "SA(b)"@@DPDK_"SA(v))
+#define __vsym __attribute__((used))
+
+#else
+/*
+ * No symbol versioning in use
+ */
+#define VERSION_SYMBOL(b, e, v)
+#define __vsym
+
+/*
+ * RTE_BUILD_SHARED_LIB
+ */
+#endif
+
+
+#endif /* _RTE_COMPAT_H_ */
diff --git a/mk/rte.lib.mk b/mk/rte.lib.mk
index f458258..82ac309 100644
--- a/mk/rte.lib.mk
+++ b/mk/rte.lib.mk
@@ -40,8 +40,12 @@ VPATH += $(SRCDIR)
ifeq ($(RTE_BUILD_SHARED_LIB),y)
LIB := $(patsubst %.a,%.so,$(LIB))
+
+CPU_LDFLAGS += --version-script=$(EXPORT_MAP)
+
endif
+
_BUILD = $(LIB)
_INSTALL = $(INSTALL-FILES-y) $(SYMLINK-FILES-y) $(RTE_OUTPUT)/lib/$(LIB)
_CLEAN = doclean
@@ -160,7 +164,9 @@ endif
$(RTE_OUTPUT)/lib/$(LIB): $(LIB)
@echo " INSTALL-LIB $(LIB)"
@[ -d $(RTE_OUTPUT)/lib ] || mkdir -p $(RTE_OUTPUT)/lib
+ifneq ($(LIB),)
$(Q)cp -f $(LIB) $(RTE_OUTPUT)/lib
+endif
#
# Clean all generated files
--
1.9.3
^ permalink raw reply [flat|nested] 43+ messages in thread
* Re: [dpdk-dev] [PATCH 1/4 v2] compat: Add infrastructure to support symbol versioning
2014-09-25 18:52 ` [dpdk-dev] [PATCH 1/4 v2] " Neil Horman
@ 2014-09-26 14:16 ` Sergio Gonzalez Monroy
2014-09-26 15:16 ` Neil Horman
0 siblings, 1 reply; 43+ messages in thread
From: Sergio Gonzalez Monroy @ 2014-09-26 14:16 UTC (permalink / raw)
To: Neil Horman; +Cc: dev
On Thu, Sep 25, 2014 at 02:52:32PM -0400, Neil Horman wrote:
> Add initial pass header files to support symbol versioning.
>
> ---
> Change notes
> v2)
> * Fixed ifdef in rte_compat.h to test for RTE_BUILD_SHARED_LIB instead of the
> non-existant RTE_SYMBOL_VERSIONING
>
> * Fixed VERSION_SYMBOL macro to add the needed extra @ to make versioning work
> properly
>
> * Improved/Clarified documentation
>
> Signed-off-by: Neil Horman <nhorman@tuxdriver.com>
> CC: Thomas Monjalon <thomas.monjalon@6wind.com>
> CC: "Richardson, Bruce" <bruce.richardson@intel.com>
> CC: "Gonzalez Monroy, Sergio" <sergio.gonzalez.monroy@intel.com>
> ---
> lib/Makefile | 1 +
> lib/librte_compat/Makefile | 38 ++++++++++++++++++
> lib/librte_compat/rte_compat.h | 87 ++++++++++++++++++++++++++++++++++++++++++
> mk/rte.lib.mk | 6 +++
> 4 files changed, 132 insertions(+)
> create mode 100644 lib/librte_compat/Makefile
> create mode 100644 lib/librte_compat/rte_compat.h
>
> diff --git a/lib/Makefile b/lib/Makefile
> index 10c5bb3..a85b55b 100644
> --- a/lib/Makefile
> +++ b/lib/Makefile
> @@ -32,6 +32,7 @@
> include $(RTE_SDK)/mk/rte.vars.mk
>
> DIRS-$(CONFIG_RTE_LIBC) += libc
> +DIRS-y += librte_compat
> DIRS-$(CONFIG_RTE_LIBRTE_EAL) += librte_eal
> DIRS-$(CONFIG_RTE_LIBRTE_MALLOC) += librte_malloc
> DIRS-$(CONFIG_RTE_LIBRTE_RING) += librte_ring
> diff --git a/lib/librte_compat/Makefile b/lib/librte_compat/Makefile
> new file mode 100644
> index 0000000..3415c7b
> --- /dev/null
> +++ b/lib/librte_compat/Makefile
> @@ -0,0 +1,38 @@
> +# BSD LICENSE
> +#
> +# Copyright(c) 2010-2014 Neil Horman <nhorman@tuxdriver.com>
> +# All rights reserved.
> +#
> +# Redistribution and use in source and binary forms, with or without
> +# modification, are permitted provided that the following conditions
> +# are met:
> +#
> +# * Redistributions of source code must retain the above copyright
> +# notice, this list of conditions and the following disclaimer.
> +# * Redistributions in binary form must reproduce the above copyright
> +# notice, this list of conditions and the following disclaimer in
> +# the documentation and/or other materials provided with the
> +# distribution.
> +# * Neither the name of Intel Corporation nor the names of its
> +# contributors may be used to endorse or promote products derived
> +# from this software without specific prior written permission.
> +#
> +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
> +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
> +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
> +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
> +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
> +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
> +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
> +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
> +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
> +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
> +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
> +
> +include $(RTE_SDK)/mk/rte.vars.mk
> +
> +
> +# install includes
> +SYMLINK-y-include := rte_compat.h
> +
> +include $(RTE_SDK)/mk/rte.lib.mk
> diff --git a/lib/librte_compat/rte_compat.h b/lib/librte_compat/rte_compat.h
> new file mode 100644
> index 0000000..cff9aea
> --- /dev/null
> +++ b/lib/librte_compat/rte_compat.h
> @@ -0,0 +1,87 @@
> +/*-
> + * BSD LICENSE
> + *
> + * Copyright(c) 2010-2014 Neil Horman <nhorman@tuxdriver.com>.
> + * All rights reserved.
> + *
> + * Redistribution and use in source and binary forms, with or without
> + * modification, are permitted provided that the following conditions
> + * are met:
> + *
> + * * Redistributions of source code must retain the above copyright
> + * notice, this list of conditions and the following disclaimer.
> + * * Redistributions in binary form must reproduce the above copyright
> + * notice, this list of conditions and the following disclaimer in
> + * the documentation and/or other materials provided with the
> + * distribution.
> + * * Neither the name of Intel Corporation nor the names of its
> + * contributors may be used to endorse or promote products derived
> + * from this software without specific prior written permission.
> + *
> + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
> + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
> + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
> + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
> + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
> + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
> + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
> + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
> + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
> + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
> + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
> + */
> +
> +#ifndef _RTE_COMPAT_H_
> +#define _RTE_COMPAT_H_
> +
> +/*
> + * This is just a stringification macro for use below.
> + */
> +#define SA(x) #x
> +
> +#ifdef RTE_BUILD_SHARED_LIB
> +
> +/*
> + * Provides backwards compatibility when updating exported functions.
> + * When a symol is exported from a library to provide an API, it also provides a
> + * calling convention (ABI) that is embodied in its name, return type,
> + * arguments, etc. On occasion that function may need to change to accomodate
> + * new functionality, behavior, etc. When that occurs, it is desireable to
> + * allow for backwards compatibility for a time with older binaries that are
> + * dynamically linked to the dpdk. to support that the __vsym and
> + * VERSION_SYMBOL macros are created. They, in conjunction with the
> + * <library>_version.map file for a given library allow for multiple versions of
> + * a symbol to exist in a shared library so that older binaries need not be
> + * immediately recompiled. Their use is outlined in the following example:
> + * Assumptions: DPDK 1.(X) contains a function int foo(char *string)
> + * DPDK 1.(X+1) needs to change foo to be int foo(int index)
> + *
> + * To accomplish this:
> + * 1) Edit lib/<library>/library_version.map to add a DPDK_1.(X+1) node, in which
> + * foo is exported as a global symbol. Note that foo must be removed from the
> + * DPDK.(X) node, or you will see multiple symbol definitions
> + *
By removing the symbol from the previous node in the version map, you make
it local instead of global and applications linked against DPDK 1.8 will fail
with the new library.
Following the steps you describe, if we create a new version of the function
rte_acl_create we would end up with the following dso:
$ readelf -s x86_64-native-linuxapp-gcc/lib/librte_acl.so | grep "create\|\.symtab\|\.dynsym"
Symbol table '.dynsym' contains 42 entries:
28: 0000000000001990 627 FUNC GLOBAL DEFAULT 12 rte_acl_create@@DPDK_1.9
Symbol table '.symtab' contains 147 entries:
94: 0000000000001960 36 FUNC LOCAL DEFAULT 12 rte_acl_create_v18
105: 0000000000001960 36 FUNC LOCAL DEFAULT 12 rte_acl_create@@DPDK_1.8
138: 0000000000001990 627 FUNC GLOBAL DEFAULT 12 rte_acl_create
You can check that applications linked with the old lib will fail to run.
Note that to easily check this you should define the environment variable
LD_BIND_NOW to resolve all symbols at program startup (man ld.so).
Sergio
> + * 2) rename the existing function int foo(char *string) to
> + * int __vsym foo_v18(char *string)
> + *
> + * 3) Add this macro immediately below the function
> + * VERSION_SYMBOL(foo, _v18, 1.8);
> + *
> + */
> +#define VERSION_SYMBOL(b, e, v) __asm__(".symver " SA(b) SA(e) ", "SA(b)"@@DPDK_"SA(v))
> +#define __vsym __attribute__((used))
> +
> +#else
> +/*
> + * No symbol versioning in use
> + */
> +#define VERSION_SYMBOL(b, e, v)
> +#define __vsym
> +
> +/*
> + * RTE_BUILD_SHARED_LIB
> + */
> +#endif
> +
> +
> +#endif /* _RTE_COMPAT_H_ */
> diff --git a/mk/rte.lib.mk b/mk/rte.lib.mk
> index f458258..82ac309 100644
> --- a/mk/rte.lib.mk
> +++ b/mk/rte.lib.mk
> @@ -40,8 +40,12 @@ VPATH += $(SRCDIR)
>
> ifeq ($(RTE_BUILD_SHARED_LIB),y)
> LIB := $(patsubst %.a,%.so,$(LIB))
> +
> +CPU_LDFLAGS += --version-script=$(EXPORT_MAP)
> +
> endif
>
> +
> _BUILD = $(LIB)
> _INSTALL = $(INSTALL-FILES-y) $(SYMLINK-FILES-y) $(RTE_OUTPUT)/lib/$(LIB)
> _CLEAN = doclean
> @@ -160,7 +164,9 @@ endif
> $(RTE_OUTPUT)/lib/$(LIB): $(LIB)
> @echo " INSTALL-LIB $(LIB)"
> @[ -d $(RTE_OUTPUT)/lib ] || mkdir -p $(RTE_OUTPUT)/lib
> +ifneq ($(LIB),)
> $(Q)cp -f $(LIB) $(RTE_OUTPUT)/lib
> +endif
>
> #
> # Clean all generated files
> --
> 1.9.3
>
^ permalink raw reply [flat|nested] 43+ messages in thread
* Re: [dpdk-dev] [PATCH 1/4 v2] compat: Add infrastructure to support symbol versioning
2014-09-26 14:16 ` Sergio Gonzalez Monroy
@ 2014-09-26 15:16 ` Neil Horman
2014-09-26 15:33 ` Sergio Gonzalez Monroy
0 siblings, 1 reply; 43+ messages in thread
From: Neil Horman @ 2014-09-26 15:16 UTC (permalink / raw)
To: Sergio Gonzalez Monroy; +Cc: dev
On Fri, Sep 26, 2014 at 03:16:08PM +0100, Sergio Gonzalez Monroy wrote:
> On Thu, Sep 25, 2014 at 02:52:32PM -0400, Neil Horman wrote:
> > Add initial pass header files to support symbol versioning.
> >
> > ---
> > Change notes
> > v2)
> > * Fixed ifdef in rte_compat.h to test for RTE_BUILD_SHARED_LIB instead of the
> > non-existant RTE_SYMBOL_VERSIONING
> >
> > * Fixed VERSION_SYMBOL macro to add the needed extra @ to make versioning work
> > properly
> >
> > * Improved/Clarified documentation
> >
> > Signed-off-by: Neil Horman <nhorman@tuxdriver.com>
> > CC: Thomas Monjalon <thomas.monjalon@6wind.com>
> > CC: "Richardson, Bruce" <bruce.richardson@intel.com>
> > CC: "Gonzalez Monroy, Sergio" <sergio.gonzalez.monroy@intel.com>
> > ---
> > lib/Makefile | 1 +
> > lib/librte_compat/Makefile | 38 ++++++++++++++++++
> > lib/librte_compat/rte_compat.h | 87 ++++++++++++++++++++++++++++++++++++++++++
> > mk/rte.lib.mk | 6 +++
> > 4 files changed, 132 insertions(+)
> > create mode 100644 lib/librte_compat/Makefile
> > create mode 100644 lib/librte_compat/rte_compat.h
> >
> > diff --git a/lib/Makefile b/lib/Makefile
> > index 10c5bb3..a85b55b 100644
> > --- a/lib/Makefile
> > +++ b/lib/Makefile
> > @@ -32,6 +32,7 @@
> > include $(RTE_SDK)/mk/rte.vars.mk
> >
> > DIRS-$(CONFIG_RTE_LIBC) += libc
> > +DIRS-y += librte_compat
> > DIRS-$(CONFIG_RTE_LIBRTE_EAL) += librte_eal
> > DIRS-$(CONFIG_RTE_LIBRTE_MALLOC) += librte_malloc
> > DIRS-$(CONFIG_RTE_LIBRTE_RING) += librte_ring
> > diff --git a/lib/librte_compat/Makefile b/lib/librte_compat/Makefile
> > new file mode 100644
> > index 0000000..3415c7b
> > --- /dev/null
> > +++ b/lib/librte_compat/Makefile
> > @@ -0,0 +1,38 @@
> > +# BSD LICENSE
> > +#
> > +# Copyright(c) 2010-2014 Neil Horman <nhorman@tuxdriver.com>
> > +# All rights reserved.
> > +#
> > +# Redistribution and use in source and binary forms, with or without
> > +# modification, are permitted provided that the following conditions
> > +# are met:
> > +#
> > +# * Redistributions of source code must retain the above copyright
> > +# notice, this list of conditions and the following disclaimer.
> > +# * Redistributions in binary form must reproduce the above copyright
> > +# notice, this list of conditions and the following disclaimer in
> > +# the documentation and/or other materials provided with the
> > +# distribution.
> > +# * Neither the name of Intel Corporation nor the names of its
> > +# contributors may be used to endorse or promote products derived
> > +# from this software without specific prior written permission.
> > +#
> > +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
> > +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
> > +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
> > +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
> > +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
> > +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
> > +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
> > +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
> > +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
> > +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
> > +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
> > +
> > +include $(RTE_SDK)/mk/rte.vars.mk
> > +
> > +
> > +# install includes
> > +SYMLINK-y-include := rte_compat.h
> > +
> > +include $(RTE_SDK)/mk/rte.lib.mk
> > diff --git a/lib/librte_compat/rte_compat.h b/lib/librte_compat/rte_compat.h
> > new file mode 100644
> > index 0000000..cff9aea
> > --- /dev/null
> > +++ b/lib/librte_compat/rte_compat.h
> > @@ -0,0 +1,87 @@
> > +/*-
> > + * BSD LICENSE
> > + *
> > + * Copyright(c) 2010-2014 Neil Horman <nhorman@tuxdriver.com>.
> > + * All rights reserved.
> > + *
> > + * Redistribution and use in source and binary forms, with or without
> > + * modification, are permitted provided that the following conditions
> > + * are met:
> > + *
> > + * * Redistributions of source code must retain the above copyright
> > + * notice, this list of conditions and the following disclaimer.
> > + * * Redistributions in binary form must reproduce the above copyright
> > + * notice, this list of conditions and the following disclaimer in
> > + * the documentation and/or other materials provided with the
> > + * distribution.
> > + * * Neither the name of Intel Corporation nor the names of its
> > + * contributors may be used to endorse or promote products derived
> > + * from this software without specific prior written permission.
> > + *
> > + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
> > + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
> > + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
> > + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
> > + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
> > + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
> > + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
> > + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
> > + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
> > + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
> > + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
> > + */
> > +
> > +#ifndef _RTE_COMPAT_H_
> > +#define _RTE_COMPAT_H_
> > +
> > +/*
> > + * This is just a stringification macro for use below.
> > + */
> > +#define SA(x) #x
> > +
> > +#ifdef RTE_BUILD_SHARED_LIB
> > +
> > +/*
> > + * Provides backwards compatibility when updating exported functions.
> > + * When a symol is exported from a library to provide an API, it also provides a
> > + * calling convention (ABI) that is embodied in its name, return type,
> > + * arguments, etc. On occasion that function may need to change to accomodate
> > + * new functionality, behavior, etc. When that occurs, it is desireable to
> > + * allow for backwards compatibility for a time with older binaries that are
> > + * dynamically linked to the dpdk. to support that the __vsym and
> > + * VERSION_SYMBOL macros are created. They, in conjunction with the
> > + * <library>_version.map file for a given library allow for multiple versions of
> > + * a symbol to exist in a shared library so that older binaries need not be
> > + * immediately recompiled. Their use is outlined in the following example:
> > + * Assumptions: DPDK 1.(X) contains a function int foo(char *string)
> > + * DPDK 1.(X+1) needs to change foo to be int foo(int index)
> > + *
> > + * To accomplish this:
> > + * 1) Edit lib/<library>/library_version.map to add a DPDK_1.(X+1) node, in which
> > + * foo is exported as a global symbol. Note that foo must be removed from the
> > + * DPDK.(X) node, or you will see multiple symbol definitions
> > + *
>
> By removing the symbol from the previous node in the version map, you make
> it local instead of global and applications linked against DPDK 1.8 will fail
> with the new library.
>
It sounds like you just did the remove part, and not the add part. What does
your new version map file look like?
Neil
> Following the steps you describe, if we create a new version of the function
> rte_acl_create we would end up with the following dso:
>
> $ readelf -s x86_64-native-linuxapp-gcc/lib/librte_acl.so | grep "create\|\.symtab\|\.dynsym"
> Symbol table '.dynsym' contains 42 entries:
> 28: 0000000000001990 627 FUNC GLOBAL DEFAULT 12 rte_acl_create@@DPDK_1.9
> Symbol table '.symtab' contains 147 entries:
> 94: 0000000000001960 36 FUNC LOCAL DEFAULT 12 rte_acl_create_v18
> 105: 0000000000001960 36 FUNC LOCAL DEFAULT 12 rte_acl_create@@DPDK_1.8
> 138: 0000000000001990 627 FUNC GLOBAL DEFAULT 12 rte_acl_create
>
> You can check that applications linked with the old lib will fail to run.
> Note that to easily check this you should define the environment variable
> LD_BIND_NOW to resolve all symbols at program startup (man ld.so).
>
> Sergio
>
> > + * 2) rename the existing function int foo(char *string) to
> > + * int __vsym foo_v18(char *string)
> > + *
> > + * 3) Add this macro immediately below the function
> > + * VERSION_SYMBOL(foo, _v18, 1.8);
> > + *
> > + */
> > +#define VERSION_SYMBOL(b, e, v) __asm__(".symver " SA(b) SA(e) ", "SA(b)"@@DPDK_"SA(v))
> > +#define __vsym __attribute__((used))
> > +
> > +#else
> > +/*
> > + * No symbol versioning in use
> > + */
> > +#define VERSION_SYMBOL(b, e, v)
> > +#define __vsym
> > +
> > +/*
> > + * RTE_BUILD_SHARED_LIB
> > + */
> > +#endif
> > +
> > +
> > +#endif /* _RTE_COMPAT_H_ */
> > diff --git a/mk/rte.lib.mk b/mk/rte.lib.mk
> > index f458258..82ac309 100644
> > --- a/mk/rte.lib.mk
> > +++ b/mk/rte.lib.mk
> > @@ -40,8 +40,12 @@ VPATH += $(SRCDIR)
> >
> > ifeq ($(RTE_BUILD_SHARED_LIB),y)
> > LIB := $(patsubst %.a,%.so,$(LIB))
> > +
> > +CPU_LDFLAGS += --version-script=$(EXPORT_MAP)
> > +
> > endif
> >
> > +
> > _BUILD = $(LIB)
> > _INSTALL = $(INSTALL-FILES-y) $(SYMLINK-FILES-y) $(RTE_OUTPUT)/lib/$(LIB)
> > _CLEAN = doclean
> > @@ -160,7 +164,9 @@ endif
> > $(RTE_OUTPUT)/lib/$(LIB): $(LIB)
> > @echo " INSTALL-LIB $(LIB)"
> > @[ -d $(RTE_OUTPUT)/lib ] || mkdir -p $(RTE_OUTPUT)/lib
> > +ifneq ($(LIB),)
> > $(Q)cp -f $(LIB) $(RTE_OUTPUT)/lib
> > +endif
> >
> > #
> > # Clean all generated files
> > --
> > 1.9.3
> >
>
^ permalink raw reply [flat|nested] 43+ messages in thread
* Re: [dpdk-dev] [PATCH 1/4 v2] compat: Add infrastructure to support symbol versioning
2014-09-26 15:16 ` Neil Horman
@ 2014-09-26 15:33 ` Sergio Gonzalez Monroy
2014-09-26 16:22 ` Neil Horman
0 siblings, 1 reply; 43+ messages in thread
From: Sergio Gonzalez Monroy @ 2014-09-26 15:33 UTC (permalink / raw)
To: Neil Horman; +Cc: dev
On Fri, Sep 26, 2014 at 11:16:30AM -0400, Neil Horman wrote:
> On Fri, Sep 26, 2014 at 03:16:08PM +0100, Sergio Gonzalez Monroy wrote:
> > On Thu, Sep 25, 2014 at 02:52:32PM -0400, Neil Horman wrote:
> > > Add initial pass header files to support symbol versioning.
> > >
> > > ---
> > > Change notes
> > > v2)
> > > * Fixed ifdef in rte_compat.h to test for RTE_BUILD_SHARED_LIB instead of the
> > > non-existant RTE_SYMBOL_VERSIONING
> > >
> > > * Fixed VERSION_SYMBOL macro to add the needed extra @ to make versioning work
> > > properly
> > >
> > > * Improved/Clarified documentation
> > >
> > > Signed-off-by: Neil Horman <nhorman@tuxdriver.com>
> > > CC: Thomas Monjalon <thomas.monjalon@6wind.com>
> > > CC: "Richardson, Bruce" <bruce.richardson@intel.com>
> > > CC: "Gonzalez Monroy, Sergio" <sergio.gonzalez.monroy@intel.com>
> > > ---
> > > lib/Makefile | 1 +
> > > lib/librte_compat/Makefile | 38 ++++++++++++++++++
> > > lib/librte_compat/rte_compat.h | 87 ++++++++++++++++++++++++++++++++++++++++++
> > > mk/rte.lib.mk | 6 +++
> > > 4 files changed, 132 insertions(+)
> > > create mode 100644 lib/librte_compat/Makefile
> > > create mode 100644 lib/librte_compat/rte_compat.h
> > >
> > > diff --git a/lib/Makefile b/lib/Makefile
> > > index 10c5bb3..a85b55b 100644
> > > --- a/lib/Makefile
> > > +++ b/lib/Makefile
> > > @@ -32,6 +32,7 @@
> > > include $(RTE_SDK)/mk/rte.vars.mk
> > >
> > > DIRS-$(CONFIG_RTE_LIBC) += libc
> > > +DIRS-y += librte_compat
> > > DIRS-$(CONFIG_RTE_LIBRTE_EAL) += librte_eal
> > > DIRS-$(CONFIG_RTE_LIBRTE_MALLOC) += librte_malloc
> > > DIRS-$(CONFIG_RTE_LIBRTE_RING) += librte_ring
> > > diff --git a/lib/librte_compat/Makefile b/lib/librte_compat/Makefile
> > > new file mode 100644
> > > index 0000000..3415c7b
> > > --- /dev/null
> > > +++ b/lib/librte_compat/Makefile
> > > @@ -0,0 +1,38 @@
> > > +# BSD LICENSE
> > > +#
> > > +# Copyright(c) 2010-2014 Neil Horman <nhorman@tuxdriver.com>
> > > +# All rights reserved.
> > > +#
> > > +# Redistribution and use in source and binary forms, with or without
> > > +# modification, are permitted provided that the following conditions
> > > +# are met:
> > > +#
> > > +# * Redistributions of source code must retain the above copyright
> > > +# notice, this list of conditions and the following disclaimer.
> > > +# * Redistributions in binary form must reproduce the above copyright
> > > +# notice, this list of conditions and the following disclaimer in
> > > +# the documentation and/or other materials provided with the
> > > +# distribution.
> > > +# * Neither the name of Intel Corporation nor the names of its
> > > +# contributors may be used to endorse or promote products derived
> > > +# from this software without specific prior written permission.
> > > +#
> > > +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
> > > +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
> > > +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
> > > +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
> > > +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
> > > +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
> > > +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
> > > +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
> > > +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
> > > +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
> > > +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
> > > +
> > > +include $(RTE_SDK)/mk/rte.vars.mk
> > > +
> > > +
> > > +# install includes
> > > +SYMLINK-y-include := rte_compat.h
> > > +
> > > +include $(RTE_SDK)/mk/rte.lib.mk
> > > diff --git a/lib/librte_compat/rte_compat.h b/lib/librte_compat/rte_compat.h
> > > new file mode 100644
> > > index 0000000..cff9aea
> > > --- /dev/null
> > > +++ b/lib/librte_compat/rte_compat.h
> > > @@ -0,0 +1,87 @@
> > > +/*-
> > > + * BSD LICENSE
> > > + *
> > > + * Copyright(c) 2010-2014 Neil Horman <nhorman@tuxdriver.com>.
> > > + * All rights reserved.
> > > + *
> > > + * Redistribution and use in source and binary forms, with or without
> > > + * modification, are permitted provided that the following conditions
> > > + * are met:
> > > + *
> > > + * * Redistributions of source code must retain the above copyright
> > > + * notice, this list of conditions and the following disclaimer.
> > > + * * Redistributions in binary form must reproduce the above copyright
> > > + * notice, this list of conditions and the following disclaimer in
> > > + * the documentation and/or other materials provided with the
> > > + * distribution.
> > > + * * Neither the name of Intel Corporation nor the names of its
> > > + * contributors may be used to endorse or promote products derived
> > > + * from this software without specific prior written permission.
> > > + *
> > > + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
> > > + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
> > > + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
> > > + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
> > > + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
> > > + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
> > > + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
> > > + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
> > > + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
> > > + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
> > > + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
> > > + */
> > > +
> > > +#ifndef _RTE_COMPAT_H_
> > > +#define _RTE_COMPAT_H_
> > > +
> > > +/*
> > > + * This is just a stringification macro for use below.
> > > + */
> > > +#define SA(x) #x
> > > +
> > > +#ifdef RTE_BUILD_SHARED_LIB
> > > +
> > > +/*
> > > + * Provides backwards compatibility when updating exported functions.
> > > + * When a symol is exported from a library to provide an API, it also provides a
> > > + * calling convention (ABI) that is embodied in its name, return type,
> > > + * arguments, etc. On occasion that function may need to change to accomodate
> > > + * new functionality, behavior, etc. When that occurs, it is desireable to
> > > + * allow for backwards compatibility for a time with older binaries that are
> > > + * dynamically linked to the dpdk. to support that the __vsym and
> > > + * VERSION_SYMBOL macros are created. They, in conjunction with the
> > > + * <library>_version.map file for a given library allow for multiple versions of
> > > + * a symbol to exist in a shared library so that older binaries need not be
> > > + * immediately recompiled. Their use is outlined in the following example:
> > > + * Assumptions: DPDK 1.(X) contains a function int foo(char *string)
> > > + * DPDK 1.(X+1) needs to change foo to be int foo(int index)
> > > + *
> > > + * To accomplish this:
> > > + * 1) Edit lib/<library>/library_version.map to add a DPDK_1.(X+1) node, in which
> > > + * foo is exported as a global symbol. Note that foo must be removed from the
> > > + * DPDK.(X) node, or you will see multiple symbol definitions
> > > + *
> >
> > By removing the symbol from the previous node in the version map, you make
> > it local instead of global and applications linked against DPDK 1.8 will fail
> > with the new library.
> >
> It sounds like you just did the remove part, and not the add part. What does
> your new version map file look like?
>
> Neil
>
$ cat lib/librte_acl/rte_acl_version.map
DPDK_1.8 {
global:
rte_acl_find_existing;
rte_acl_free;
rte_acl_add_rules;
rte_acl_reset_rules;
rte_acl_build;
rte_acl_reset;
rte_acl_classify;
rte_acl_dump;
rte_acl_list_dump;
rte_acl_ipv4vlan_add_rules;
rte_acl_ipv4vlan_build;
rte_acl_classify_scalar;
rte_acl_classify_alg;
rte_acl_set_ctx_classify;
local: *;
};
DPDK_1.9 {
global:
rte_acl_create;
} DPDK_1.8;
Anyway, if the DPDK_1.9 node was not defined, the dso would not have the symbol:
rte_acl_create@@DPDK_1.9
Sergio
> > Following the steps you describe, if we create a new version of the function
> > rte_acl_create we would end up with the following dso:
> >
> > $ readelf -s x86_64-native-linuxapp-gcc/lib/librte_acl.so | grep "create\|\.symtab\|\.dynsym"
> > Symbol table '.dynsym' contains 42 entries:
> > 28: 0000000000001990 627 FUNC GLOBAL DEFAULT 12 rte_acl_create@@DPDK_1.9
> > Symbol table '.symtab' contains 147 entries:
> > 94: 0000000000001960 36 FUNC LOCAL DEFAULT 12 rte_acl_create_v18
> > 105: 0000000000001960 36 FUNC LOCAL DEFAULT 12 rte_acl_create@@DPDK_1.8
> > 138: 0000000000001990 627 FUNC GLOBAL DEFAULT 12 rte_acl_create
> >
> > You can check that applications linked with the old lib will fail to run.
> > Note that to easily check this you should define the environment variable
> > LD_BIND_NOW to resolve all symbols at program startup (man ld.so).
> >
> > Sergio
> >
> > > + * 2) rename the existing function int foo(char *string) to
> > > + * int __vsym foo_v18(char *string)
> > > + *
> > > + * 3) Add this macro immediately below the function
> > > + * VERSION_SYMBOL(foo, _v18, 1.8);
> > > + *
> > > + */
> > > +#define VERSION_SYMBOL(b, e, v) __asm__(".symver " SA(b) SA(e) ", "SA(b)"@@DPDK_"SA(v))
> > > +#define __vsym __attribute__((used))
> > > +
> > > +#else
> > > +/*
> > > + * No symbol versioning in use
> > > + */
> > > +#define VERSION_SYMBOL(b, e, v)
> > > +#define __vsym
> > > +
> > > +/*
> > > + * RTE_BUILD_SHARED_LIB
> > > + */
> > > +#endif
> > > +
> > > +
> > > +#endif /* _RTE_COMPAT_H_ */
> > > diff --git a/mk/rte.lib.mk b/mk/rte.lib.mk
> > > index f458258..82ac309 100644
> > > --- a/mk/rte.lib.mk
> > > +++ b/mk/rte.lib.mk
> > > @@ -40,8 +40,12 @@ VPATH += $(SRCDIR)
> > >
> > > ifeq ($(RTE_BUILD_SHARED_LIB),y)
> > > LIB := $(patsubst %.a,%.so,$(LIB))
> > > +
> > > +CPU_LDFLAGS += --version-script=$(EXPORT_MAP)
> > > +
> > > endif
> > >
> > > +
> > > _BUILD = $(LIB)
> > > _INSTALL = $(INSTALL-FILES-y) $(SYMLINK-FILES-y) $(RTE_OUTPUT)/lib/$(LIB)
> > > _CLEAN = doclean
> > > @@ -160,7 +164,9 @@ endif
> > > $(RTE_OUTPUT)/lib/$(LIB): $(LIB)
> > > @echo " INSTALL-LIB $(LIB)"
> > > @[ -d $(RTE_OUTPUT)/lib ] || mkdir -p $(RTE_OUTPUT)/lib
> > > +ifneq ($(LIB),)
> > > $(Q)cp -f $(LIB) $(RTE_OUTPUT)/lib
> > > +endif
> > >
> > > #
> > > # Clean all generated files
> > > --
> > > 1.9.3
> > >
> >
^ permalink raw reply [flat|nested] 43+ messages in thread
* Re: [dpdk-dev] [PATCH 1/4 v2] compat: Add infrastructure to support symbol versioning
2014-09-26 15:33 ` Sergio Gonzalez Monroy
@ 2014-09-26 16:22 ` Neil Horman
2014-09-26 19:19 ` Neil Horman
0 siblings, 1 reply; 43+ messages in thread
From: Neil Horman @ 2014-09-26 16:22 UTC (permalink / raw)
To: Sergio Gonzalez Monroy; +Cc: dev
On Fri, Sep 26, 2014 at 04:33:04PM +0100, Sergio Gonzalez Monroy wrote:
> On Fri, Sep 26, 2014 at 11:16:30AM -0400, Neil Horman wrote:
> > On Fri, Sep 26, 2014 at 03:16:08PM +0100, Sergio Gonzalez Monroy wrote:
> > > On Thu, Sep 25, 2014 at 02:52:32PM -0400, Neil Horman wrote:
> > > > Add initial pass header files to support symbol versioning.
> > > >
> > > > ---
> > > > Change notes
> > > > v2)
> > > > * Fixed ifdef in rte_compat.h to test for RTE_BUILD_SHARED_LIB instead of the
> > > > non-existant RTE_SYMBOL_VERSIONING
> > > >
> > > > * Fixed VERSION_SYMBOL macro to add the needed extra @ to make versioning work
> > > > properly
> > > >
> > > > * Improved/Clarified documentation
> > > >
> > > > Signed-off-by: Neil Horman <nhorman@tuxdriver.com>
> > > > CC: Thomas Monjalon <thomas.monjalon@6wind.com>
> > > > CC: "Richardson, Bruce" <bruce.richardson@intel.com>
> > > > CC: "Gonzalez Monroy, Sergio" <sergio.gonzalez.monroy@intel.com>
> > > > ---
> > > > lib/Makefile | 1 +
> > > > lib/librte_compat/Makefile | 38 ++++++++++++++++++
> > > > lib/librte_compat/rte_compat.h | 87 ++++++++++++++++++++++++++++++++++++++++++
> > > > mk/rte.lib.mk | 6 +++
> > > > 4 files changed, 132 insertions(+)
> > > > create mode 100644 lib/librte_compat/Makefile
> > > > create mode 100644 lib/librte_compat/rte_compat.h
> > > >
> > > > diff --git a/lib/Makefile b/lib/Makefile
> > > > index 10c5bb3..a85b55b 100644
> > > > --- a/lib/Makefile
> > > > +++ b/lib/Makefile
> > > > @@ -32,6 +32,7 @@
> > > > include $(RTE_SDK)/mk/rte.vars.mk
> > > >
> > > > DIRS-$(CONFIG_RTE_LIBC) += libc
> > > > +DIRS-y += librte_compat
> > > > DIRS-$(CONFIG_RTE_LIBRTE_EAL) += librte_eal
> > > > DIRS-$(CONFIG_RTE_LIBRTE_MALLOC) += librte_malloc
> > > > DIRS-$(CONFIG_RTE_LIBRTE_RING) += librte_ring
> > > > diff --git a/lib/librte_compat/Makefile b/lib/librte_compat/Makefile
> > > > new file mode 100644
> > > > index 0000000..3415c7b
> > > > --- /dev/null
> > > > +++ b/lib/librte_compat/Makefile
> > > > @@ -0,0 +1,38 @@
> > > > +# BSD LICENSE
> > > > +#
> > > > +# Copyright(c) 2010-2014 Neil Horman <nhorman@tuxdriver.com>
> > > > +# All rights reserved.
> > > > +#
> > > > +# Redistribution and use in source and binary forms, with or without
> > > > +# modification, are permitted provided that the following conditions
> > > > +# are met:
> > > > +#
> > > > +# * Redistributions of source code must retain the above copyright
> > > > +# notice, this list of conditions and the following disclaimer.
> > > > +# * Redistributions in binary form must reproduce the above copyright
> > > > +# notice, this list of conditions and the following disclaimer in
> > > > +# the documentation and/or other materials provided with the
> > > > +# distribution.
> > > > +# * Neither the name of Intel Corporation nor the names of its
> > > > +# contributors may be used to endorse or promote products derived
> > > > +# from this software without specific prior written permission.
> > > > +#
> > > > +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
> > > > +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
> > > > +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
> > > > +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
> > > > +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
> > > > +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
> > > > +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
> > > > +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
> > > > +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
> > > > +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
> > > > +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
> > > > +
> > > > +include $(RTE_SDK)/mk/rte.vars.mk
> > > > +
> > > > +
> > > > +# install includes
> > > > +SYMLINK-y-include := rte_compat.h
> > > > +
> > > > +include $(RTE_SDK)/mk/rte.lib.mk
> > > > diff --git a/lib/librte_compat/rte_compat.h b/lib/librte_compat/rte_compat.h
> > > > new file mode 100644
> > > > index 0000000..cff9aea
> > > > --- /dev/null
> > > > +++ b/lib/librte_compat/rte_compat.h
> > > > @@ -0,0 +1,87 @@
> > > > +/*-
> > > > + * BSD LICENSE
> > > > + *
> > > > + * Copyright(c) 2010-2014 Neil Horman <nhorman@tuxdriver.com>.
> > > > + * All rights reserved.
> > > > + *
> > > > + * Redistribution and use in source and binary forms, with or without
> > > > + * modification, are permitted provided that the following conditions
> > > > + * are met:
> > > > + *
> > > > + * * Redistributions of source code must retain the above copyright
> > > > + * notice, this list of conditions and the following disclaimer.
> > > > + * * Redistributions in binary form must reproduce the above copyright
> > > > + * notice, this list of conditions and the following disclaimer in
> > > > + * the documentation and/or other materials provided with the
> > > > + * distribution.
> > > > + * * Neither the name of Intel Corporation nor the names of its
> > > > + * contributors may be used to endorse or promote products derived
> > > > + * from this software without specific prior written permission.
> > > > + *
> > > > + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
> > > > + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
> > > > + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
> > > > + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
> > > > + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
> > > > + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
> > > > + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
> > > > + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
> > > > + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
> > > > + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
> > > > + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
> > > > + */
> > > > +
> > > > +#ifndef _RTE_COMPAT_H_
> > > > +#define _RTE_COMPAT_H_
> > > > +
> > > > +/*
> > > > + * This is just a stringification macro for use below.
> > > > + */
> > > > +#define SA(x) #x
> > > > +
> > > > +#ifdef RTE_BUILD_SHARED_LIB
> > > > +
> > > > +/*
> > > > + * Provides backwards compatibility when updating exported functions.
> > > > + * When a symol is exported from a library to provide an API, it also provides a
> > > > + * calling convention (ABI) that is embodied in its name, return type,
> > > > + * arguments, etc. On occasion that function may need to change to accomodate
> > > > + * new functionality, behavior, etc. When that occurs, it is desireable to
> > > > + * allow for backwards compatibility for a time with older binaries that are
> > > > + * dynamically linked to the dpdk. to support that the __vsym and
> > > > + * VERSION_SYMBOL macros are created. They, in conjunction with the
> > > > + * <library>_version.map file for a given library allow for multiple versions of
> > > > + * a symbol to exist in a shared library so that older binaries need not be
> > > > + * immediately recompiled. Their use is outlined in the following example:
> > > > + * Assumptions: DPDK 1.(X) contains a function int foo(char *string)
> > > > + * DPDK 1.(X+1) needs to change foo to be int foo(int index)
> > > > + *
> > > > + * To accomplish this:
> > > > + * 1) Edit lib/<library>/library_version.map to add a DPDK_1.(X+1) node, in which
> > > > + * foo is exported as a global symbol. Note that foo must be removed from the
> > > > + * DPDK.(X) node, or you will see multiple symbol definitions
> > > > + *
> > >
> > > By removing the symbol from the previous node in the version map, you make
> > > it local instead of global and applications linked against DPDK 1.8 will fail
> > > with the new library.
> > >
> > It sounds like you just did the remove part, and not the add part. What does
> > your new version map file look like?
> >
> > Neil
> >
>
> $ cat lib/librte_acl/rte_acl_version.map
> DPDK_1.8 {
> global:
> rte_acl_find_existing;
> rte_acl_free;
> rte_acl_add_rules;
> rte_acl_reset_rules;
> rte_acl_build;
> rte_acl_reset;
> rte_acl_classify;
> rte_acl_dump;
> rte_acl_list_dump;
> rte_acl_ipv4vlan_add_rules;
> rte_acl_ipv4vlan_build;
> rte_acl_classify_scalar;
> rte_acl_classify_alg;
> rte_acl_set_ctx_classify;
>
> local: *;
> };
>
> DPDK_1.9 {
> global:
> rte_acl_create;
> } DPDK_1.8;
>
>
> Anyway, if the DPDK_1.9 node was not defined, the dso would not have the symbol:
> rte_acl_create@@DPDK_1.9
>
> Sergio
>
> > > Following the steps you describe, if we create a new version of the function
> > > rte_acl_create we would end up with the following dso:
> > >
> > > $ readelf -s x86_64-native-linuxapp-gcc/lib/librte_acl.so | grep "create\|\.symtab\|\.dynsym"
> > > Symbol table '.dynsym' contains 42 entries:
> > > 28: 0000000000001990 627 FUNC GLOBAL DEFAULT 12 rte_acl_create@@DPDK_1.9
> > > Symbol table '.symtab' contains 147 entries:
> > > 94: 0000000000001960 36 FUNC LOCAL DEFAULT 12 rte_acl_create_v18
> > > 105: 0000000000001960 36 FUNC LOCAL DEFAULT 12 rte_acl_create@@DPDK_1.8
> > > 138: 0000000000001990 627 FUNC GLOBAL DEFAULT 12 rte_acl_create
> > >
> > > You can check that applications linked with the old lib will fail to run.
> > > Note that to easily check this you should define the environment variable
> > > LD_BIND_NOW to resolve all symbols at program startup (man ld.so).
> > >
> > > Sergio
> > >
Hm, thats odd, Using the same changes in my build here, I get both an exported
global rte_acl_create@@DPDK_1.8 and @@DPDK_1.9 symbol. Let me take a closer
look at it here once I get through the rest of my email
Neil
> > > > + * 2) rename the existing function int foo(char *string) to
> > > > + * int __vsym foo_v18(char *string)
> > > > + *
> > > > + * 3) Add this macro immediately below the function
> > > > + * VERSION_SYMBOL(foo, _v18, 1.8);
> > > > + *
> > > > + */
> > > > +#define VERSION_SYMBOL(b, e, v) __asm__(".symver " SA(b) SA(e) ", "SA(b)"@@DPDK_"SA(v))
> > > > +#define __vsym __attribute__((used))
> > > > +
> > > > +#else
> > > > +/*
> > > > + * No symbol versioning in use
> > > > + */
> > > > +#define VERSION_SYMBOL(b, e, v)
> > > > +#define __vsym
> > > > +
> > > > +/*
> > > > + * RTE_BUILD_SHARED_LIB
> > > > + */
> > > > +#endif
> > > > +
> > > > +
> > > > +#endif /* _RTE_COMPAT_H_ */
> > > > diff --git a/mk/rte.lib.mk b/mk/rte.lib.mk
> > > > index f458258..82ac309 100644
> > > > --- a/mk/rte.lib.mk
> > > > +++ b/mk/rte.lib.mk
> > > > @@ -40,8 +40,12 @@ VPATH += $(SRCDIR)
> > > >
> > > > ifeq ($(RTE_BUILD_SHARED_LIB),y)
> > > > LIB := $(patsubst %.a,%.so,$(LIB))
> > > > +
> > > > +CPU_LDFLAGS += --version-script=$(EXPORT_MAP)
> > > > +
> > > > endif
> > > >
> > > > +
> > > > _BUILD = $(LIB)
> > > > _INSTALL = $(INSTALL-FILES-y) $(SYMLINK-FILES-y) $(RTE_OUTPUT)/lib/$(LIB)
> > > > _CLEAN = doclean
> > > > @@ -160,7 +164,9 @@ endif
> > > > $(RTE_OUTPUT)/lib/$(LIB): $(LIB)
> > > > @echo " INSTALL-LIB $(LIB)"
> > > > @[ -d $(RTE_OUTPUT)/lib ] || mkdir -p $(RTE_OUTPUT)/lib
> > > > +ifneq ($(LIB),)
> > > > $(Q)cp -f $(LIB) $(RTE_OUTPUT)/lib
> > > > +endif
> > > >
> > > > #
> > > > # Clean all generated files
> > > > --
> > > > 1.9.3
> > > >
> > >
>
^ permalink raw reply [flat|nested] 43+ messages in thread
* Re: [dpdk-dev] [PATCH 1/4 v2] compat: Add infrastructure to support symbol versioning
2014-09-26 16:22 ` Neil Horman
@ 2014-09-26 19:19 ` Neil Horman
0 siblings, 0 replies; 43+ messages in thread
From: Neil Horman @ 2014-09-26 19:19 UTC (permalink / raw)
To: Sergio Gonzalez Monroy; +Cc: dev
On Fri, Sep 26, 2014 at 12:22:56PM -0400, Neil Horman wrote:
> On Fri, Sep 26, 2014 at 04:33:04PM +0100, Sergio Gonzalez Monroy wrote:
> > On Fri, Sep 26, 2014 at 11:16:30AM -0400, Neil Horman wrote:
> > > On Fri, Sep 26, 2014 at 03:16:08PM +0100, Sergio Gonzalez Monroy wrote:
> > > > On Thu, Sep 25, 2014 at 02:52:32PM -0400, Neil Horman wrote:
> > > > > Add initial pass header files to support symbol versioning.
> > > > >
> > > > > ---
> > > > > Change notes
> > > > > v2)
> > > > > * Fixed ifdef in rte_compat.h to test for RTE_BUILD_SHARED_LIB instead of the
> > > > > non-existant RTE_SYMBOL_VERSIONING
> > > > >
> > > > > * Fixed VERSION_SYMBOL macro to add the needed extra @ to make versioning work
> > > > > properly
> > > > >
> > > > > * Improved/Clarified documentation
> > > > >
> > > > > Signed-off-by: Neil Horman <nhorman@tuxdriver.com>
> > > > > CC: Thomas Monjalon <thomas.monjalon@6wind.com>
> > > > > CC: "Richardson, Bruce" <bruce.richardson@intel.com>
> > > > > CC: "Gonzalez Monroy, Sergio" <sergio.gonzalez.monroy@intel.com>
> > > > > ---
> > > > > lib/Makefile | 1 +
> > > > > lib/librte_compat/Makefile | 38 ++++++++++++++++++
> > > > > lib/librte_compat/rte_compat.h | 87 ++++++++++++++++++++++++++++++++++++++++++
> > > > > mk/rte.lib.mk | 6 +++
> > > > > 4 files changed, 132 insertions(+)
> > > > > create mode 100644 lib/librte_compat/Makefile
> > > > > create mode 100644 lib/librte_compat/rte_compat.h
> > > > >
> > > > > diff --git a/lib/Makefile b/lib/Makefile
> > > > > index 10c5bb3..a85b55b 100644
> > > > > --- a/lib/Makefile
> > > > > +++ b/lib/Makefile
> > > > > @@ -32,6 +32,7 @@
> > > > > include $(RTE_SDK)/mk/rte.vars.mk
> > > > >
> > > > > DIRS-$(CONFIG_RTE_LIBC) += libc
> > > > > +DIRS-y += librte_compat
> > > > > DIRS-$(CONFIG_RTE_LIBRTE_EAL) += librte_eal
> > > > > DIRS-$(CONFIG_RTE_LIBRTE_MALLOC) += librte_malloc
> > > > > DIRS-$(CONFIG_RTE_LIBRTE_RING) += librte_ring
> > > > > diff --git a/lib/librte_compat/Makefile b/lib/librte_compat/Makefile
> > > > > new file mode 100644
> > > > > index 0000000..3415c7b
> > > > > --- /dev/null
> > > > > +++ b/lib/librte_compat/Makefile
> > > > > @@ -0,0 +1,38 @@
> > > > > +# BSD LICENSE
> > > > > +#
> > > > > +# Copyright(c) 2010-2014 Neil Horman <nhorman@tuxdriver.com>
> > > > > +# All rights reserved.
> > > > > +#
> > > > > +# Redistribution and use in source and binary forms, with or without
> > > > > +# modification, are permitted provided that the following conditions
> > > > > +# are met:
> > > > > +#
> > > > > +# * Redistributions of source code must retain the above copyright
> > > > > +# notice, this list of conditions and the following disclaimer.
> > > > > +# * Redistributions in binary form must reproduce the above copyright
> > > > > +# notice, this list of conditions and the following disclaimer in
> > > > > +# the documentation and/or other materials provided with the
> > > > > +# distribution.
> > > > > +# * Neither the name of Intel Corporation nor the names of its
> > > > > +# contributors may be used to endorse or promote products derived
> > > > > +# from this software without specific prior written permission.
> > > > > +#
> > > > > +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
> > > > > +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
> > > > > +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
> > > > > +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
> > > > > +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
> > > > > +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
> > > > > +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
> > > > > +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
> > > > > +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
> > > > > +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
> > > > > +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
> > > > > +
> > > > > +include $(RTE_SDK)/mk/rte.vars.mk
> > > > > +
> > > > > +
> > > > > +# install includes
> > > > > +SYMLINK-y-include := rte_compat.h
> > > > > +
> > > > > +include $(RTE_SDK)/mk/rte.lib.mk
> > > > > diff --git a/lib/librte_compat/rte_compat.h b/lib/librte_compat/rte_compat.h
> > > > > new file mode 100644
> > > > > index 0000000..cff9aea
> > > > > --- /dev/null
> > > > > +++ b/lib/librte_compat/rte_compat.h
> > > > > @@ -0,0 +1,87 @@
> > > > > +/*-
> > > > > + * BSD LICENSE
> > > > > + *
> > > > > + * Copyright(c) 2010-2014 Neil Horman <nhorman@tuxdriver.com>.
> > > > > + * All rights reserved.
> > > > > + *
> > > > > + * Redistribution and use in source and binary forms, with or without
> > > > > + * modification, are permitted provided that the following conditions
> > > > > + * are met:
> > > > > + *
> > > > > + * * Redistributions of source code must retain the above copyright
> > > > > + * notice, this list of conditions and the following disclaimer.
> > > > > + * * Redistributions in binary form must reproduce the above copyright
> > > > > + * notice, this list of conditions and the following disclaimer in
> > > > > + * the documentation and/or other materials provided with the
> > > > > + * distribution.
> > > > > + * * Neither the name of Intel Corporation nor the names of its
> > > > > + * contributors may be used to endorse or promote products derived
> > > > > + * from this software without specific prior written permission.
> > > > > + *
> > > > > + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
> > > > > + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
> > > > > + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
> > > > > + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
> > > > > + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
> > > > > + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
> > > > > + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
> > > > > + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
> > > > > + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
> > > > > + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
> > > > > + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
> > > > > + */
> > > > > +
> > > > > +#ifndef _RTE_COMPAT_H_
> > > > > +#define _RTE_COMPAT_H_
> > > > > +
> > > > > +/*
> > > > > + * This is just a stringification macro for use below.
> > > > > + */
> > > > > +#define SA(x) #x
> > > > > +
> > > > > +#ifdef RTE_BUILD_SHARED_LIB
> > > > > +
> > > > > +/*
> > > > > + * Provides backwards compatibility when updating exported functions.
> > > > > + * When a symol is exported from a library to provide an API, it also provides a
> > > > > + * calling convention (ABI) that is embodied in its name, return type,
> > > > > + * arguments, etc. On occasion that function may need to change to accomodate
> > > > > + * new functionality, behavior, etc. When that occurs, it is desireable to
> > > > > + * allow for backwards compatibility for a time with older binaries that are
> > > > > + * dynamically linked to the dpdk. to support that the __vsym and
> > > > > + * VERSION_SYMBOL macros are created. They, in conjunction with the
> > > > > + * <library>_version.map file for a given library allow for multiple versions of
> > > > > + * a symbol to exist in a shared library so that older binaries need not be
> > > > > + * immediately recompiled. Their use is outlined in the following example:
> > > > > + * Assumptions: DPDK 1.(X) contains a function int foo(char *string)
> > > > > + * DPDK 1.(X+1) needs to change foo to be int foo(int index)
> > > > > + *
> > > > > + * To accomplish this:
> > > > > + * 1) Edit lib/<library>/library_version.map to add a DPDK_1.(X+1) node, in which
> > > > > + * foo is exported as a global symbol. Note that foo must be removed from the
> > > > > + * DPDK.(X) node, or you will see multiple symbol definitions
> > > > > + *
> > > >
> > > > By removing the symbol from the previous node in the version map, you make
> > > > it local instead of global and applications linked against DPDK 1.8 will fail
> > > > with the new library.
> > > >
> > > It sounds like you just did the remove part, and not the add part. What does
> > > your new version map file look like?
> > >
> > > Neil
> > >
> >
> > $ cat lib/librte_acl/rte_acl_version.map
> > DPDK_1.8 {
> > global:
> > rte_acl_find_existing;
> > rte_acl_free;
> > rte_acl_add_rules;
> > rte_acl_reset_rules;
> > rte_acl_build;
> > rte_acl_reset;
> > rte_acl_classify;
> > rte_acl_dump;
> > rte_acl_list_dump;
> > rte_acl_ipv4vlan_add_rules;
> > rte_acl_ipv4vlan_build;
> > rte_acl_classify_scalar;
> > rte_acl_classify_alg;
> > rte_acl_set_ctx_classify;
> >
> > local: *;
> > };
> >
> > DPDK_1.9 {
> > global:
> > rte_acl_create;
> > } DPDK_1.8;
> >
> >
> > Anyway, if the DPDK_1.9 node was not defined, the dso would not have the symbol:
> > rte_acl_create@@DPDK_1.9
> >
> > Sergio
> >
> > > > Following the steps you describe, if we create a new version of the function
> > > > rte_acl_create we would end up with the following dso:
> > > >
> > > > $ readelf -s x86_64-native-linuxapp-gcc/lib/librte_acl.so | grep "create\|\.symtab\|\.dynsym"
> > > > Symbol table '.dynsym' contains 42 entries:
> > > > 28: 0000000000001990 627 FUNC GLOBAL DEFAULT 12 rte_acl_create@@DPDK_1.9
> > > > Symbol table '.symtab' contains 147 entries:
> > > > 94: 0000000000001960 36 FUNC LOCAL DEFAULT 12 rte_acl_create_v18
> > > > 105: 0000000000001960 36 FUNC LOCAL DEFAULT 12 rte_acl_create@@DPDK_1.8
> > > > 138: 0000000000001990 627 FUNC GLOBAL DEFAULT 12 rte_acl_create
> > > >
> > > > You can check that applications linked with the old lib will fail to run.
> > > > Note that to easily check this you should define the environment variable
> > > > LD_BIND_NOW to resolve all symbols at program startup (man ld.so).
> > > >
> > > > Sergio
> > > >
> Hm, thats odd, Using the same changes in my build here, I get both an exported
> global rte_acl_create@@DPDK_1.8 and @@DPDK_1.9 symbol. Let me take a closer
> look at it here once I get through the rest of my email
> Neil
>
> > > > > + * 2) rename the existing function int foo(char *string) to
> > > > > + * int __vsym foo_v18(char *string)
> > > > > + *
> > > > > + * 3) Add this macro immediately below the function
> > > > > + * VERSION_SYMBOL(foo, _v18, 1.8);
> > > > > + *
> > > > > + */
> > > > > +#define VERSION_SYMBOL(b, e, v) __asm__(".symver " SA(b) SA(e) ", "SA(b)"@@DPDK_"SA(v))
> > > > > +#define __vsym __attribute__((used))
> > > > > +
> > > > > +#else
> > > > > +/*
> > > > > + * No symbol versioning in use
> > > > > + */
> > > > > +#define VERSION_SYMBOL(b, e, v)
> > > > > +#define __vsym
> > > > > +
> > > > > +/*
> > > > > + * RTE_BUILD_SHARED_LIB
> > > > > + */
> > > > > +#endif
> > > > > +
> > > > > +
> > > > > +#endif /* _RTE_COMPAT_H_ */
> > > > > diff --git a/mk/rte.lib.mk b/mk/rte.lib.mk
> > > > > index f458258..82ac309 100644
> > > > > --- a/mk/rte.lib.mk
> > > > > +++ b/mk/rte.lib.mk
> > > > > @@ -40,8 +40,12 @@ VPATH += $(SRCDIR)
> > > > >
> > > > > ifeq ($(RTE_BUILD_SHARED_LIB),y)
> > > > > LIB := $(patsubst %.a,%.so,$(LIB))
> > > > > +
> > > > > +CPU_LDFLAGS += --version-script=$(EXPORT_MAP)
> > > > > +
> > > > > endif
> > > > >
> > > > > +
> > > > > _BUILD = $(LIB)
> > > > > _INSTALL = $(INSTALL-FILES-y) $(SYMLINK-FILES-y) $(RTE_OUTPUT)/lib/$(LIB)
> > > > > _CLEAN = doclean
> > > > > @@ -160,7 +164,9 @@ endif
> > > > > $(RTE_OUTPUT)/lib/$(LIB): $(LIB)
> > > > > @echo " INSTALL-LIB $(LIB)"
> > > > > @[ -d $(RTE_OUTPUT)/lib ] || mkdir -p $(RTE_OUTPUT)/lib
> > > > > +ifneq ($(LIB),)
> > > > > $(Q)cp -f $(LIB) $(RTE_OUTPUT)/lib
> > > > > +endif
> > > > >
> > > > > #
> > > > > # Clean all generated files
> > > > > --
> > > > > 1.9.3
> > > > >
> > > >
> >
>
Well, I have to apologize Sergio. Apparently I misread something in the guide
for symbol versioning and this isn't in fact working. It appeared to be working
for me because something was messed up in my tree and I wasn't relinking when I
updated the map file. So self-NAK on this series for now, I'll repost it
shortly. The good news is I have a bit of smaple code working properly, which
I've verified, and I should have a new version of this series (which should by
an large look the same) ready early next week
Best
Neil
^ permalink raw reply [flat|nested] 43+ messages in thread
* [dpdk-dev] [PATCH 1/4 v3] compat: Add infrastructure to support symbol versioning
2014-09-15 19:23 ` [dpdk-dev] [PATCH 1/4] compat: Add infrastructure to support symbol versioning Neil Horman
2014-09-23 10:39 ` Sergio Gonzalez Monroy
2014-09-25 18:52 ` [dpdk-dev] [PATCH 1/4 v2] " Neil Horman
@ 2014-09-29 15:44 ` Neil Horman
2014-09-30 8:13 ` Sergio Gonzalez Monroy
2014-09-30 15:18 ` [dpdk-dev] [PATCH 1/4 v4] " Neil Horman
3 siblings, 1 reply; 43+ messages in thread
From: Neil Horman @ 2014-09-29 15:44 UTC (permalink / raw)
To: dev
Add initial pass header files to support symbol versioning.
---
Change notes
v2)
* Fixed ifdef in rte_compat.h to test for RTE_BUILD_SHARED_LIB instead of the
non-existant RTE_SYMBOL_VERSIONING
* Fixed VERSION_SYMBOL macro to add the needed extra @ to make versioning work
properly
* Improved/Clarified documentation
v3)
* Added missing macros to fully export the symver directive specification
Signed-off-by: Neil Horman <nhorman@tuxdriver.com>
CC: Thomas Monjalon <thomas.monjalon@6wind.com>
CC: "Richardson, Bruce" <bruce.richardson@intel.com>
CC: "Gonzalez Monroy, Sergio" <sergio.gonzalez.monroy@intel.com>
---
lib/Makefile | 1 +
lib/librte_compat/Makefile | 38 ++++++++++++++++++
lib/librte_compat/rte_compat.h | 90 ++++++++++++++++++++++++++++++++++++++++++
mk/rte.lib.mk | 6 +++
4 files changed, 135 insertions(+)
create mode 100644 lib/librte_compat/Makefile
create mode 100644 lib/librte_compat/rte_compat.h
diff --git a/lib/Makefile b/lib/Makefile
index 10c5bb3..a85b55b 100644
--- a/lib/Makefile
+++ b/lib/Makefile
@@ -32,6 +32,7 @@
include $(RTE_SDK)/mk/rte.vars.mk
DIRS-$(CONFIG_RTE_LIBC) += libc
+DIRS-y += librte_compat
DIRS-$(CONFIG_RTE_LIBRTE_EAL) += librte_eal
DIRS-$(CONFIG_RTE_LIBRTE_MALLOC) += librte_malloc
DIRS-$(CONFIG_RTE_LIBRTE_RING) += librte_ring
diff --git a/lib/librte_compat/Makefile b/lib/librte_compat/Makefile
new file mode 100644
index 0000000..3415c7b
--- /dev/null
+++ b/lib/librte_compat/Makefile
@@ -0,0 +1,38 @@
+# BSD LICENSE
+#
+# Copyright(c) 2010-2014 Neil Horman <nhorman@tuxdriver.com>
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+#
+# * Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+# * Redistributions in binary form must reproduce the above copyright
+# notice, this list of conditions and the following disclaimer in
+# the documentation and/or other materials provided with the
+# distribution.
+# * Neither the name of Intel Corporation nor the names of its
+# contributors may be used to endorse or promote products derived
+# from this software without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+include $(RTE_SDK)/mk/rte.vars.mk
+
+
+# install includes
+SYMLINK-y-include := rte_compat.h
+
+include $(RTE_SDK)/mk/rte.lib.mk
diff --git a/lib/librte_compat/rte_compat.h b/lib/librte_compat/rte_compat.h
new file mode 100644
index 0000000..0b76771
--- /dev/null
+++ b/lib/librte_compat/rte_compat.h
@@ -0,0 +1,90 @@
+/*-
+ * BSD LICENSE
+ *
+ * Copyright(c) 2010-2014 Neil Horman <nhorman@tuxdriver.com>.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ * * Neither the name of Intel Corporation nor the names of its
+ * contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef _RTE_COMPAT_H_
+#define _RTE_COMPAT_H_
+
+/*
+ * This is just a stringification macro for use below.
+ */
+#define SA(x) #x
+
+#ifdef RTE_BUILD_SHARED_LIB
+
+/*
+ * Provides backwards compatibility when updating exported functions.
+ * When a symol is exported from a library to provide an API, it also provides a
+ * calling convention (ABI) that is embodied in its name, return type,
+ * arguments, etc. On occasion that function may need to change to accomodate
+ * new functionality, behavior, etc. When that occurs, it is desireable to
+ * allow for backwards compatibility for a time with older binaries that are
+ * dynamically linked to the dpdk. to support that the __vsym and
+ * VERSION_SYMBOL macros are created. They, in conjunction with the
+ * <library>_version.map file for a given library allow for multiple versions of
+ * a symbol to exist in a shared library so that older binaries need not be
+ * immediately recompiled. Their use is outlined in the following example:
+ * Assumptions: DPDK 1.(X) contains a function int foo(char *string)
+ * DPDK 1.(X+1) needs to change foo to be int foo(int index)
+ *
+ * To accomplish this:
+ * 1) Edit lib/<library>/library_version.map to add a DPDK_1.(X+1) node, in which
+ * foo is exported as a global symbol.
+ *
+ * 2) rename the existing function int foo(char *string) to
+ * int __vsym foo_v18(char *string)
+ *
+ * 3) Add this macro immediately below the function
+ * VERSION_SYMBOL(foo, _v18, 1.8);
+ *
+ * 4) Implement a new version of foo.
+ *
+ */
+#define VERSION_SYMBOL(b, e, v) __asm__(".symver " SA(b) SA(e) ", "SA(b)"@DPDK_"SA(v))
+#define BASE_SYMBOL(b, n) __asm__(".symver " SA(n) ", "SA(b)"@")
+#define BIND_DEFAULT_SYMBOL(b, v) __asm__(".symver " SA(b) ", "SA(b)"@@DPDK_"SA(v))
+#define __vsym __attribute__((used))
+
+#else
+/*
+ * No symbol versioning in use
+ */
+#define VERSION_SYMBOL(b, e, v)
+#define __vsym
+
+/*
+ * RTE_BUILD_SHARED_LIB
+ */
+#endif
+
+
+#endif /* _RTE_COMPAT_H_ */
diff --git a/mk/rte.lib.mk b/mk/rte.lib.mk
index f458258..82ac309 100644
--- a/mk/rte.lib.mk
+++ b/mk/rte.lib.mk
@@ -40,8 +40,12 @@ VPATH += $(SRCDIR)
ifeq ($(RTE_BUILD_SHARED_LIB),y)
LIB := $(patsubst %.a,%.so,$(LIB))
+
+CPU_LDFLAGS += --version-script=$(EXPORT_MAP)
+
endif
+
_BUILD = $(LIB)
_INSTALL = $(INSTALL-FILES-y) $(SYMLINK-FILES-y) $(RTE_OUTPUT)/lib/$(LIB)
_CLEAN = doclean
@@ -160,7 +164,9 @@ endif
$(RTE_OUTPUT)/lib/$(LIB): $(LIB)
@echo " INSTALL-LIB $(LIB)"
@[ -d $(RTE_OUTPUT)/lib ] || mkdir -p $(RTE_OUTPUT)/lib
+ifneq ($(LIB),)
$(Q)cp -f $(LIB) $(RTE_OUTPUT)/lib
+endif
#
# Clean all generated files
--
1.9.3
^ permalink raw reply [flat|nested] 43+ messages in thread
* Re: [dpdk-dev] [PATCH 1/4 v3] compat: Add infrastructure to support symbol versioning
2014-09-29 15:44 ` [dpdk-dev] [PATCH 1/4 v3] " Neil Horman
@ 2014-09-30 8:13 ` Sergio Gonzalez Monroy
0 siblings, 0 replies; 43+ messages in thread
From: Sergio Gonzalez Monroy @ 2014-09-30 8:13 UTC (permalink / raw)
To: Neil Horman; +Cc: dev
On Mon, Sep 29, 2014 at 11:44:03AM -0400, Neil Horman wrote:
> Add initial pass header files to support symbol versioning.
>
> ---
> Change notes
> v2)
> * Fixed ifdef in rte_compat.h to test for RTE_BUILD_SHARED_LIB instead of the
> non-existant RTE_SYMBOL_VERSIONING
>
> * Fixed VERSION_SYMBOL macro to add the needed extra @ to make versioning work
> properly
>
> * Improved/Clarified documentation
>
> v3)
> * Added missing macros to fully export the symver directive specification
>
> Signed-off-by: Neil Horman <nhorman@tuxdriver.com>
> CC: Thomas Monjalon <thomas.monjalon@6wind.com>
> CC: "Richardson, Bruce" <bruce.richardson@intel.com>
> CC: "Gonzalez Monroy, Sergio" <sergio.gonzalez.monroy@intel.com>
> ---
> lib/Makefile | 1 +
> lib/librte_compat/Makefile | 38 ++++++++++++++++++
> lib/librte_compat/rte_compat.h | 90 ++++++++++++++++++++++++++++++++++++++++++
> mk/rte.lib.mk | 6 +++
> 4 files changed, 135 insertions(+)
> create mode 100644 lib/librte_compat/Makefile
> create mode 100644 lib/librte_compat/rte_compat.h
>
> diff --git a/lib/Makefile b/lib/Makefile
> index 10c5bb3..a85b55b 100644
> --- a/lib/Makefile
> +++ b/lib/Makefile
> @@ -32,6 +32,7 @@
> include $(RTE_SDK)/mk/rte.vars.mk
>
> DIRS-$(CONFIG_RTE_LIBC) += libc
> +DIRS-y += librte_compat
> DIRS-$(CONFIG_RTE_LIBRTE_EAL) += librte_eal
> DIRS-$(CONFIG_RTE_LIBRTE_MALLOC) += librte_malloc
> DIRS-$(CONFIG_RTE_LIBRTE_RING) += librte_ring
> diff --git a/lib/librte_compat/Makefile b/lib/librte_compat/Makefile
> new file mode 100644
> index 0000000..3415c7b
> --- /dev/null
> +++ b/lib/librte_compat/Makefile
> @@ -0,0 +1,38 @@
> +# BSD LICENSE
> +#
> +# Copyright(c) 2010-2014 Neil Horman <nhorman@tuxdriver.com>
> +# All rights reserved.
> +#
> +# Redistribution and use in source and binary forms, with or without
> +# modification, are permitted provided that the following conditions
> +# are met:
> +#
> +# * Redistributions of source code must retain the above copyright
> +# notice, this list of conditions and the following disclaimer.
> +# * Redistributions in binary form must reproduce the above copyright
> +# notice, this list of conditions and the following disclaimer in
> +# the documentation and/or other materials provided with the
> +# distribution.
> +# * Neither the name of Intel Corporation nor the names of its
> +# contributors may be used to endorse or promote products derived
> +# from this software without specific prior written permission.
> +#
> +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
> +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
> +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
> +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
> +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
> +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
> +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
> +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
> +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
> +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
> +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
> +
> +include $(RTE_SDK)/mk/rte.vars.mk
> +
> +
> +# install includes
> +SYMLINK-y-include := rte_compat.h
> +
> +include $(RTE_SDK)/mk/rte.lib.mk
> diff --git a/lib/librte_compat/rte_compat.h b/lib/librte_compat/rte_compat.h
> new file mode 100644
> index 0000000..0b76771
> --- /dev/null
> +++ b/lib/librte_compat/rte_compat.h
> @@ -0,0 +1,90 @@
> +/*-
> + * BSD LICENSE
> + *
> + * Copyright(c) 2010-2014 Neil Horman <nhorman@tuxdriver.com>.
> + * All rights reserved.
> + *
> + * Redistribution and use in source and binary forms, with or without
> + * modification, are permitted provided that the following conditions
> + * are met:
> + *
> + * * Redistributions of source code must retain the above copyright
> + * notice, this list of conditions and the following disclaimer.
> + * * Redistributions in binary form must reproduce the above copyright
> + * notice, this list of conditions and the following disclaimer in
> + * the documentation and/or other materials provided with the
> + * distribution.
> + * * Neither the name of Intel Corporation nor the names of its
> + * contributors may be used to endorse or promote products derived
> + * from this software without specific prior written permission.
> + *
> + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
> + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
> + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
> + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
> + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
> + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
> + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
> + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
> + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
> + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
> + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
> + */
> +
> +#ifndef _RTE_COMPAT_H_
> +#define _RTE_COMPAT_H_
> +
> +/*
> + * This is just a stringification macro for use below.
> + */
> +#define SA(x) #x
> +
> +#ifdef RTE_BUILD_SHARED_LIB
> +
> +/*
> + * Provides backwards compatibility when updating exported functions.
> + * When a symol is exported from a library to provide an API, it also provides a
> + * calling convention (ABI) that is embodied in its name, return type,
> + * arguments, etc. On occasion that function may need to change to accomodate
> + * new functionality, behavior, etc. When that occurs, it is desireable to
> + * allow for backwards compatibility for a time with older binaries that are
> + * dynamically linked to the dpdk. to support that the __vsym and
> + * VERSION_SYMBOL macros are created. They, in conjunction with the
> + * <library>_version.map file for a given library allow for multiple versions of
> + * a symbol to exist in a shared library so that older binaries need not be
> + * immediately recompiled. Their use is outlined in the following example:
> + * Assumptions: DPDK 1.(X) contains a function int foo(char *string)
> + * DPDK 1.(X+1) needs to change foo to be int foo(int index)
> + *
> + * To accomplish this:
> + * 1) Edit lib/<library>/library_version.map to add a DPDK_1.(X+1) node, in which
> + * foo is exported as a global symbol.
> + *
> + * 2) rename the existing function int foo(char *string) to
> + * int __vsym foo_v18(char *string)
> + *
> + * 3) Add this macro immediately below the function
> + * VERSION_SYMBOL(foo, _v18, 1.8);
> + *
> + * 4) Implement a new version of foo.
> + *
> + */
> +#define VERSION_SYMBOL(b, e, v) __asm__(".symver " SA(b) SA(e) ", "SA(b)"@DPDK_"SA(v))
> +#define BASE_SYMBOL(b, n) __asm__(".symver " SA(n) ", "SA(b)"@")
> +#define BIND_DEFAULT_SYMBOL(b, v) __asm__(".symver " SA(b) ", "SA(b)"@@DPDK_"SA(v))
> +#define __vsym __attribute__((used))
I think it would be useful to provide an example for the new macros.
> +
> +#else
> +/*
> + * No symbol versioning in use
> + */
> +#define VERSION_SYMBOL(b, e, v)
> +#define __vsym
Both new macros missing for non shared lib build.
Sergio
> +
> +/*
> + * RTE_BUILD_SHARED_LIB
> + */
> +#endif
> +
> +
> +#endif /* _RTE_COMPAT_H_ */
> diff --git a/mk/rte.lib.mk b/mk/rte.lib.mk
> index f458258..82ac309 100644
> --- a/mk/rte.lib.mk
> +++ b/mk/rte.lib.mk
> @@ -40,8 +40,12 @@ VPATH += $(SRCDIR)
>
> ifeq ($(RTE_BUILD_SHARED_LIB),y)
> LIB := $(patsubst %.a,%.so,$(LIB))
> +
> +CPU_LDFLAGS += --version-script=$(EXPORT_MAP)
> +
> endif
>
> +
> _BUILD = $(LIB)
> _INSTALL = $(INSTALL-FILES-y) $(SYMLINK-FILES-y) $(RTE_OUTPUT)/lib/$(LIB)
> _CLEAN = doclean
> @@ -160,7 +164,9 @@ endif
> $(RTE_OUTPUT)/lib/$(LIB): $(LIB)
> @echo " INSTALL-LIB $(LIB)"
> @[ -d $(RTE_OUTPUT)/lib ] || mkdir -p $(RTE_OUTPUT)/lib
> +ifneq ($(LIB),)
> $(Q)cp -f $(LIB) $(RTE_OUTPUT)/lib
> +endif
>
> #
> # Clean all generated files
> --
> 1.9.3
>
^ permalink raw reply [flat|nested] 43+ messages in thread
* [dpdk-dev] [PATCH 1/4 v4] compat: Add infrastructure to support symbol versioning
2014-09-15 19:23 ` [dpdk-dev] [PATCH 1/4] compat: Add infrastructure to support symbol versioning Neil Horman
` (2 preceding siblings ...)
2014-09-29 15:44 ` [dpdk-dev] [PATCH 1/4 v3] " Neil Horman
@ 2014-09-30 15:18 ` Neil Horman
2014-10-01 10:15 ` Sergio Gonzalez Monroy
2014-10-01 11:28 ` Sergio Gonzalez Monroy
3 siblings, 2 replies; 43+ messages in thread
From: Neil Horman @ 2014-09-30 15:18 UTC (permalink / raw)
To: dev
Add initial pass header files to support symbol versioning.
---
Change notes
v2)
* Fixed ifdef in rte_compat.h to test for RTE_BUILD_SHARED_LIB instead of the
non-existant RTE_SYMBOL_VERSIONING
* Fixed VERSION_SYMBOL macro to add the needed extra @ to make versioning work
properly
* Improved/Clarified documentation
v3)
* Added missing macros to fully export the symver directive specification
v4)
* Added macro definitions for !SHARED_LIB case
* Improved documentation
Signed-off-by: Neil Horman <nhorman@tuxdriver.com>
CC: Thomas Monjalon <thomas.monjalon@6wind.com>
CC: "Richardson, Bruce" <bruce.richardson@intel.com>
CC: "Gonzalez Monroy, Sergio" <sergio.gonzalez.monroy@intel.com>
---
lib/Makefile | 1 +
lib/librte_compat/Makefile | 38 +++++++++++++++++
lib/librte_compat/rte_compat.h | 96 ++++++++++++++++++++++++++++++++++++++++++
mk/rte.lib.mk | 6 +++
4 files changed, 141 insertions(+)
create mode 100644 lib/librte_compat/Makefile
create mode 100644 lib/librte_compat/rte_compat.h
diff --git a/lib/Makefile b/lib/Makefile
index 10c5bb3..a85b55b 100644
--- a/lib/Makefile
+++ b/lib/Makefile
@@ -32,6 +32,7 @@
include $(RTE_SDK)/mk/rte.vars.mk
DIRS-$(CONFIG_RTE_LIBC) += libc
+DIRS-y += librte_compat
DIRS-$(CONFIG_RTE_LIBRTE_EAL) += librte_eal
DIRS-$(CONFIG_RTE_LIBRTE_MALLOC) += librte_malloc
DIRS-$(CONFIG_RTE_LIBRTE_RING) += librte_ring
diff --git a/lib/librte_compat/Makefile b/lib/librte_compat/Makefile
new file mode 100644
index 0000000..3415c7b
--- /dev/null
+++ b/lib/librte_compat/Makefile
@@ -0,0 +1,38 @@
+# BSD LICENSE
+#
+# Copyright(c) 2010-2014 Neil Horman <nhorman@tuxdriver.com>
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+#
+# * Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+# * Redistributions in binary form must reproduce the above copyright
+# notice, this list of conditions and the following disclaimer in
+# the documentation and/or other materials provided with the
+# distribution.
+# * Neither the name of Intel Corporation nor the names of its
+# contributors may be used to endorse or promote products derived
+# from this software without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+include $(RTE_SDK)/mk/rte.vars.mk
+
+
+# install includes
+SYMLINK-y-include := rte_compat.h
+
+include $(RTE_SDK)/mk/rte.lib.mk
diff --git a/lib/librte_compat/rte_compat.h b/lib/librte_compat/rte_compat.h
new file mode 100644
index 0000000..d99e362
--- /dev/null
+++ b/lib/librte_compat/rte_compat.h
@@ -0,0 +1,96 @@
+/*-
+ * BSD LICENSE
+ *
+ * Copyright(c) 2010-2014 Neil Horman <nhorman@tuxdriver.com>.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ * * Neither the name of Intel Corporation nor the names of its
+ * contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef _RTE_COMPAT_H_
+#define _RTE_COMPAT_H_
+
+/*
+ * This is just a stringification macro for use below.
+ */
+#define SA(x) #x
+
+#ifdef RTE_BUILD_SHARED_LIB
+
+/*
+ * Provides backwards compatibility when updating exported functions.
+ * When a symol is exported from a library to provide an API, it also provides a
+ * calling convention (ABI) that is embodied in its name, return type,
+ * arguments, etc. On occasion that function may need to change to accomodate
+ * new functionality, behavior, etc. When that occurs, it is desireable to
+ * allow for backwards compatibility for a time with older binaries that are
+ * dynamically linked to the dpdk. to support that the __vsym and
+ * VERSION_SYMBOL macros are created. They, in conjunction with the
+ * <library>_version.map file for a given library allow for multiple versions of
+ * a symbol to exist in a shared library so that older binaries need not be
+ * immediately recompiled. Their use is outlined in the following example:
+ * Assumptions: DPDK 1.(X) contains a function int foo(char *string)
+ * DPDK 1.(X+1) needs to change foo to be int foo(int index)
+ *
+ * To accomplish this:
+ * 1) Edit lib/<library>/library_version.map to add a DPDK_1.(X+1) node, in which
+ * foo is exported as a global symbol.
+ *
+ * 2) rename the existing function int foo(char *string) to
+ * int __vsym foo_v18(char *string)
+ *
+ * 3) Add this macro immediately below the function
+ * VERSION_SYMBOL(foo, _v18, 1.8);
+ *
+ * 4) Implement a new version of foo.
+ * char foo(int value, int otherval) { ...}
+ *
+ * 5) Mark the newest version as the default version
+ * BIND_DEFAULT_SYMBOL(foo, 1.9);
+ *
+ */
+#define VERSION_SYMBOL(b, e, v) __asm__(".symver " SA(b) SA(e) ", "SA(b)"@DPDK_"SA(v))
+#define BASE_SYMBOL(b, n) __asm__(".symver " SA(n) ", "SA(b)"@")
+#define BIND_DEFAULT_SYMBOL(b, v) __asm__(".symver " SA(b) ", "SA(b)"@@DPDK_"SA(v))
+#define __vsym __attribute__((used))
+
+#else
+/*
+ * No symbol versioning in use
+ */
+#define VERSION_SYMBOL(b, e, v)
+#define __vsym
+#define BASE_SYMBOL(b, n)
+#define BIND_DEFAULT_SYMBOL(b, v)
+
+/*
+ * RTE_BUILD_SHARED_LIB
+ */
+#endif
+
+
+#endif /* _RTE_COMPAT_H_ */
diff --git a/mk/rte.lib.mk b/mk/rte.lib.mk
index f458258..82ac309 100644
--- a/mk/rte.lib.mk
+++ b/mk/rte.lib.mk
@@ -40,8 +40,12 @@ VPATH += $(SRCDIR)
ifeq ($(RTE_BUILD_SHARED_LIB),y)
LIB := $(patsubst %.a,%.so,$(LIB))
+
+CPU_LDFLAGS += --version-script=$(EXPORT_MAP)
+
endif
+
_BUILD = $(LIB)
_INSTALL = $(INSTALL-FILES-y) $(SYMLINK-FILES-y) $(RTE_OUTPUT)/lib/$(LIB)
_CLEAN = doclean
@@ -160,7 +164,9 @@ endif
$(RTE_OUTPUT)/lib/$(LIB): $(LIB)
@echo " INSTALL-LIB $(LIB)"
@[ -d $(RTE_OUTPUT)/lib ] || mkdir -p $(RTE_OUTPUT)/lib
+ifneq ($(LIB),)
$(Q)cp -f $(LIB) $(RTE_OUTPUT)/lib
+endif
#
# Clean all generated files
--
1.9.3
^ permalink raw reply [flat|nested] 43+ messages in thread
* Re: [dpdk-dev] [PATCH 1/4 v4] compat: Add infrastructure to support symbol versioning
2014-09-30 15:18 ` [dpdk-dev] [PATCH 1/4 v4] " Neil Horman
@ 2014-10-01 10:15 ` Sergio Gonzalez Monroy
2014-10-01 10:38 ` Neil Horman
2014-10-01 11:28 ` Sergio Gonzalez Monroy
1 sibling, 1 reply; 43+ messages in thread
From: Sergio Gonzalez Monroy @ 2014-10-01 10:15 UTC (permalink / raw)
To: Neil Horman; +Cc: dev
On Tue, Sep 30, 2014 at 11:18:00AM -0400, Neil Horman wrote:
> Add initial pass header files to support symbol versioning.
>
> ---
> Change notes
> v2)
> * Fixed ifdef in rte_compat.h to test for RTE_BUILD_SHARED_LIB instead of the
> non-existant RTE_SYMBOL_VERSIONING
>
> * Fixed VERSION_SYMBOL macro to add the needed extra @ to make versioning work
> properly
>
> * Improved/Clarified documentation
>
> v3)
> * Added missing macros to fully export the symver directive specification
>
> v4)
> * Added macro definitions for !SHARED_LIB case
> * Improved documentation
>
> Signed-off-by: Neil Horman <nhorman@tuxdriver.com>
> CC: Thomas Monjalon <thomas.monjalon@6wind.com>
> CC: "Richardson, Bruce" <bruce.richardson@intel.com>
> CC: "Gonzalez Monroy, Sergio" <sergio.gonzalez.monroy@intel.com>
> ---
> lib/Makefile | 1 +
> lib/librte_compat/Makefile | 38 +++++++++++++++++
> lib/librte_compat/rte_compat.h | 96 ++++++++++++++++++++++++++++++++++++++++++
> mk/rte.lib.mk | 6 +++
> 4 files changed, 141 insertions(+)
> create mode 100644 lib/librte_compat/Makefile
> create mode 100644 lib/librte_compat/rte_compat.h
>
> diff --git a/lib/Makefile b/lib/Makefile
> index 10c5bb3..a85b55b 100644
> --- a/lib/Makefile
> +++ b/lib/Makefile
> @@ -32,6 +32,7 @@
> include $(RTE_SDK)/mk/rte.vars.mk
>
> DIRS-$(CONFIG_RTE_LIBC) += libc
> +DIRS-y += librte_compat
> DIRS-$(CONFIG_RTE_LIBRTE_EAL) += librte_eal
> DIRS-$(CONFIG_RTE_LIBRTE_MALLOC) += librte_malloc
> DIRS-$(CONFIG_RTE_LIBRTE_RING) += librte_ring
> diff --git a/lib/librte_compat/Makefile b/lib/librte_compat/Makefile
> new file mode 100644
> index 0000000..3415c7b
> --- /dev/null
> +++ b/lib/librte_compat/Makefile
> @@ -0,0 +1,38 @@
> +# BSD LICENSE
> +#
> +# Copyright(c) 2010-2014 Neil Horman <nhorman@tuxdriver.com>
> +# All rights reserved.
> +#
> +# Redistribution and use in source and binary forms, with or without
> +# modification, are permitted provided that the following conditions
> +# are met:
> +#
> +# * Redistributions of source code must retain the above copyright
> +# notice, this list of conditions and the following disclaimer.
> +# * Redistributions in binary form must reproduce the above copyright
> +# notice, this list of conditions and the following disclaimer in
> +# the documentation and/or other materials provided with the
> +# distribution.
> +# * Neither the name of Intel Corporation nor the names of its
> +# contributors may be used to endorse or promote products derived
> +# from this software without specific prior written permission.
> +#
> +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
> +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
> +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
> +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
> +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
> +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
> +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
> +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
> +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
> +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
> +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
> +
> +include $(RTE_SDK)/mk/rte.vars.mk
> +
> +
> +# install includes
> +SYMLINK-y-include := rte_compat.h
> +
> +include $(RTE_SDK)/mk/rte.lib.mk
> diff --git a/lib/librte_compat/rte_compat.h b/lib/librte_compat/rte_compat.h
> new file mode 100644
> index 0000000..d99e362
> --- /dev/null
> +++ b/lib/librte_compat/rte_compat.h
> @@ -0,0 +1,96 @@
> +/*-
> + * BSD LICENSE
> + *
> + * Copyright(c) 2010-2014 Neil Horman <nhorman@tuxdriver.com>.
> + * All rights reserved.
> + *
> + * Redistribution and use in source and binary forms, with or without
> + * modification, are permitted provided that the following conditions
> + * are met:
> + *
> + * * Redistributions of source code must retain the above copyright
> + * notice, this list of conditions and the following disclaimer.
> + * * Redistributions in binary form must reproduce the above copyright
> + * notice, this list of conditions and the following disclaimer in
> + * the documentation and/or other materials provided with the
> + * distribution.
> + * * Neither the name of Intel Corporation nor the names of its
> + * contributors may be used to endorse or promote products derived
> + * from this software without specific prior written permission.
> + *
> + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
> + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
> + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
> + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
> + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
> + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
> + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
> + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
> + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
> + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
> + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
> + */
> +
> +#ifndef _RTE_COMPAT_H_
> +#define _RTE_COMPAT_H_
> +
> +/*
> + * This is just a stringification macro for use below.
> + */
> +#define SA(x) #x
> +
> +#ifdef RTE_BUILD_SHARED_LIB
> +
> +/*
> + * Provides backwards compatibility when updating exported functions.
> + * When a symol is exported from a library to provide an API, it also provides a
> + * calling convention (ABI) that is embodied in its name, return type,
> + * arguments, etc. On occasion that function may need to change to accomodate
> + * new functionality, behavior, etc. When that occurs, it is desireable to
> + * allow for backwards compatibility for a time with older binaries that are
> + * dynamically linked to the dpdk. to support that the __vsym and
> + * VERSION_SYMBOL macros are created. They, in conjunction with the
> + * <library>_version.map file for a given library allow for multiple versions of
> + * a symbol to exist in a shared library so that older binaries need not be
> + * immediately recompiled. Their use is outlined in the following example:
> + * Assumptions: DPDK 1.(X) contains a function int foo(char *string)
> + * DPDK 1.(X+1) needs to change foo to be int foo(int index)
> + *
> + * To accomplish this:
> + * 1) Edit lib/<library>/library_version.map to add a DPDK_1.(X+1) node, in which
> + * foo is exported as a global symbol.
> + *
> + * 2) rename the existing function int foo(char *string) to
> + * int __vsym foo_v18(char *string)
> + *
> + * 3) Add this macro immediately below the function
> + * VERSION_SYMBOL(foo, _v18, 1.8);
> + *
> + * 4) Implement a new version of foo.
> + * char foo(int value, int otherval) { ...}
> + *
> + * 5) Mark the newest version as the default version
> + * BIND_DEFAULT_SYMBOL(foo, 1.9);
> + *
> + */
> +#define VERSION_SYMBOL(b, e, v) __asm__(".symver " SA(b) SA(e) ", "SA(b)"@DPDK_"SA(v))
> +#define BASE_SYMBOL(b, n) __asm__(".symver " SA(n) ", "SA(b)"@")
Hi Neil,
I was wondering about the use of BASE_SYMBOL macro (as you left it out of the example/doc).
>From what I understood (according to ld documentation on versioning), that macro would
bound the symbol to the unspecified base version of the symbol.
You would want that to provide backward compatibility to apps linked against DSOs pre-versioning.
I was under the impression that there would not be support for such apps (therefore no need
for BASE_SYMBOL macro).
Sergio
> +#define BIND_DEFAULT_SYMBOL(b, v) __asm__(".symver " SA(b) ", "SA(b)"@@DPDK_"SA(v))
> +#define __vsym __attribute__((used))
> +
> +#else
> +/*
> + * No symbol versioning in use
> + */
> +#define VERSION_SYMBOL(b, e, v)
> +#define __vsym
> +#define BASE_SYMBOL(b, n)
> +#define BIND_DEFAULT_SYMBOL(b, v)
> +
> +/*
> + * RTE_BUILD_SHARED_LIB
> + */
> +#endif
> +
> +
> +#endif /* _RTE_COMPAT_H_ */
> diff --git a/mk/rte.lib.mk b/mk/rte.lib.mk
> index f458258..82ac309 100644
> --- a/mk/rte.lib.mk
> +++ b/mk/rte.lib.mk
> @@ -40,8 +40,12 @@ VPATH += $(SRCDIR)
>
> ifeq ($(RTE_BUILD_SHARED_LIB),y)
> LIB := $(patsubst %.a,%.so,$(LIB))
> +
> +CPU_LDFLAGS += --version-script=$(EXPORT_MAP)
> +
> endif
>
> +
> _BUILD = $(LIB)
> _INSTALL = $(INSTALL-FILES-y) $(SYMLINK-FILES-y) $(RTE_OUTPUT)/lib/$(LIB)
> _CLEAN = doclean
> @@ -160,7 +164,9 @@ endif
> $(RTE_OUTPUT)/lib/$(LIB): $(LIB)
> @echo " INSTALL-LIB $(LIB)"
> @[ -d $(RTE_OUTPUT)/lib ] || mkdir -p $(RTE_OUTPUT)/lib
> +ifneq ($(LIB),)
> $(Q)cp -f $(LIB) $(RTE_OUTPUT)/lib
> +endif
>
> #
> # Clean all generated files
> --
> 1.9.3
>
Looks good.
^ permalink raw reply [flat|nested] 43+ messages in thread
* Re: [dpdk-dev] [PATCH 1/4 v4] compat: Add infrastructure to support symbol versioning
2014-10-01 10:15 ` Sergio Gonzalez Monroy
@ 2014-10-01 10:38 ` Neil Horman
0 siblings, 0 replies; 43+ messages in thread
From: Neil Horman @ 2014-10-01 10:38 UTC (permalink / raw)
To: Sergio Gonzalez Monroy; +Cc: dev
On Wed, Oct 01, 2014 at 11:15:31AM +0100, Sergio Gonzalez Monroy wrote:
> On Tue, Sep 30, 2014 at 11:18:00AM -0400, Neil Horman wrote:
> > Add initial pass header files to support symbol versioning.
> >
> > ---
> > Change notes
> > v2)
> > * Fixed ifdef in rte_compat.h to test for RTE_BUILD_SHARED_LIB instead of the
> > non-existant RTE_SYMBOL_VERSIONING
> >
> > * Fixed VERSION_SYMBOL macro to add the needed extra @ to make versioning work
> > properly
> >
> > * Improved/Clarified documentation
> >
> > v3)
> > * Added missing macros to fully export the symver directive specification
> >
> > v4)
> > * Added macro definitions for !SHARED_LIB case
> > * Improved documentation
> >
> > Signed-off-by: Neil Horman <nhorman@tuxdriver.com>
> > CC: Thomas Monjalon <thomas.monjalon@6wind.com>
> > CC: "Richardson, Bruce" <bruce.richardson@intel.com>
> > CC: "Gonzalez Monroy, Sergio" <sergio.gonzalez.monroy@intel.com>
> > ---
> > lib/Makefile | 1 +
> > lib/librte_compat/Makefile | 38 +++++++++++++++++
> > lib/librte_compat/rte_compat.h | 96 ++++++++++++++++++++++++++++++++++++++++++
> > mk/rte.lib.mk | 6 +++
> > 4 files changed, 141 insertions(+)
> > create mode 100644 lib/librte_compat/Makefile
> > create mode 100644 lib/librte_compat/rte_compat.h
> >
> > diff --git a/lib/Makefile b/lib/Makefile
> > index 10c5bb3..a85b55b 100644
> > --- a/lib/Makefile
> > +++ b/lib/Makefile
> > @@ -32,6 +32,7 @@
> > include $(RTE_SDK)/mk/rte.vars.mk
> >
> > DIRS-$(CONFIG_RTE_LIBC) += libc
> > +DIRS-y += librte_compat
> > DIRS-$(CONFIG_RTE_LIBRTE_EAL) += librte_eal
> > DIRS-$(CONFIG_RTE_LIBRTE_MALLOC) += librte_malloc
> > DIRS-$(CONFIG_RTE_LIBRTE_RING) += librte_ring
> > diff --git a/lib/librte_compat/Makefile b/lib/librte_compat/Makefile
> > new file mode 100644
> > index 0000000..3415c7b
> > --- /dev/null
> > +++ b/lib/librte_compat/Makefile
> > @@ -0,0 +1,38 @@
> > +# BSD LICENSE
> > +#
> > +# Copyright(c) 2010-2014 Neil Horman <nhorman@tuxdriver.com>
> > +# All rights reserved.
> > +#
> > +# Redistribution and use in source and binary forms, with or without
> > +# modification, are permitted provided that the following conditions
> > +# are met:
> > +#
> > +# * Redistributions of source code must retain the above copyright
> > +# notice, this list of conditions and the following disclaimer.
> > +# * Redistributions in binary form must reproduce the above copyright
> > +# notice, this list of conditions and the following disclaimer in
> > +# the documentation and/or other materials provided with the
> > +# distribution.
> > +# * Neither the name of Intel Corporation nor the names of its
> > +# contributors may be used to endorse or promote products derived
> > +# from this software without specific prior written permission.
> > +#
> > +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
> > +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
> > +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
> > +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
> > +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
> > +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
> > +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
> > +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
> > +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
> > +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
> > +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
> > +
> > +include $(RTE_SDK)/mk/rte.vars.mk
> > +
> > +
> > +# install includes
> > +SYMLINK-y-include := rte_compat.h
> > +
> > +include $(RTE_SDK)/mk/rte.lib.mk
> > diff --git a/lib/librte_compat/rte_compat.h b/lib/librte_compat/rte_compat.h
> > new file mode 100644
> > index 0000000..d99e362
> > --- /dev/null
> > +++ b/lib/librte_compat/rte_compat.h
> > @@ -0,0 +1,96 @@
> > +/*-
> > + * BSD LICENSE
> > + *
> > + * Copyright(c) 2010-2014 Neil Horman <nhorman@tuxdriver.com>.
> > + * All rights reserved.
> > + *
> > + * Redistribution and use in source and binary forms, with or without
> > + * modification, are permitted provided that the following conditions
> > + * are met:
> > + *
> > + * * Redistributions of source code must retain the above copyright
> > + * notice, this list of conditions and the following disclaimer.
> > + * * Redistributions in binary form must reproduce the above copyright
> > + * notice, this list of conditions and the following disclaimer in
> > + * the documentation and/or other materials provided with the
> > + * distribution.
> > + * * Neither the name of Intel Corporation nor the names of its
> > + * contributors may be used to endorse or promote products derived
> > + * from this software without specific prior written permission.
> > + *
> > + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
> > + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
> > + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
> > + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
> > + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
> > + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
> > + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
> > + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
> > + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
> > + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
> > + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
> > + */
> > +
> > +#ifndef _RTE_COMPAT_H_
> > +#define _RTE_COMPAT_H_
> > +
> > +/*
> > + * This is just a stringification macro for use below.
> > + */
> > +#define SA(x) #x
> > +
> > +#ifdef RTE_BUILD_SHARED_LIB
> > +
> > +/*
> > + * Provides backwards compatibility when updating exported functions.
> > + * When a symol is exported from a library to provide an API, it also provides a
> > + * calling convention (ABI) that is embodied in its name, return type,
> > + * arguments, etc. On occasion that function may need to change to accomodate
> > + * new functionality, behavior, etc. When that occurs, it is desireable to
> > + * allow for backwards compatibility for a time with older binaries that are
> > + * dynamically linked to the dpdk. to support that the __vsym and
> > + * VERSION_SYMBOL macros are created. They, in conjunction with the
> > + * <library>_version.map file for a given library allow for multiple versions of
> > + * a symbol to exist in a shared library so that older binaries need not be
> > + * immediately recompiled. Their use is outlined in the following example:
> > + * Assumptions: DPDK 1.(X) contains a function int foo(char *string)
> > + * DPDK 1.(X+1) needs to change foo to be int foo(int index)
> > + *
> > + * To accomplish this:
> > + * 1) Edit lib/<library>/library_version.map to add a DPDK_1.(X+1) node, in which
> > + * foo is exported as a global symbol.
> > + *
> > + * 2) rename the existing function int foo(char *string) to
> > + * int __vsym foo_v18(char *string)
> > + *
> > + * 3) Add this macro immediately below the function
> > + * VERSION_SYMBOL(foo, _v18, 1.8);
> > + *
> > + * 4) Implement a new version of foo.
> > + * char foo(int value, int otherval) { ...}
> > + *
> > + * 5) Mark the newest version as the default version
> > + * BIND_DEFAULT_SYMBOL(foo, 1.9);
> > + *
> > + */
> > +#define VERSION_SYMBOL(b, e, v) __asm__(".symver " SA(b) SA(e) ", "SA(b)"@DPDK_"SA(v))
> > +#define BASE_SYMBOL(b, n) __asm__(".symver " SA(n) ", "SA(b)"@")
>
> Hi Neil,
>
> I was wondering about the use of BASE_SYMBOL macro (as you left it out of the example/doc).
>
> From what I understood (according to ld documentation on versioning), that macro would
> bound the symbol to the unspecified base version of the symbol.
> You would want that to provide backward compatibility to apps linked against DSOs pre-versioning.
> I was under the impression that there would not be support for such apps (therefore no need
> for BASE_SYMBOL macro).
>
You are correct, there really is no need for it in our immediate purpose. I
only provided it for completeness of the versioning specification language
(hence the lack of example). We can remove it if you like, but I figured it was
potentially useful to include.
Neil
> Sergio
>
>
> > +#define BIND_DEFAULT_SYMBOL(b, v) __asm__(".symver " SA(b) ", "SA(b)"@@DPDK_"SA(v))
> > +#define __vsym __attribute__((used))
> > +
> > +#else
> > +/*
> > + * No symbol versioning in use
> > + */
> > +#define VERSION_SYMBOL(b, e, v)
> > +#define __vsym
> > +#define BASE_SYMBOL(b, n)
> > +#define BIND_DEFAULT_SYMBOL(b, v)
> > +
> > +/*
> > + * RTE_BUILD_SHARED_LIB
> > + */
> > +#endif
> > +
> > +
> > +#endif /* _RTE_COMPAT_H_ */
> > diff --git a/mk/rte.lib.mk b/mk/rte.lib.mk
> > index f458258..82ac309 100644
> > --- a/mk/rte.lib.mk
> > +++ b/mk/rte.lib.mk
> > @@ -40,8 +40,12 @@ VPATH += $(SRCDIR)
> >
> > ifeq ($(RTE_BUILD_SHARED_LIB),y)
> > LIB := $(patsubst %.a,%.so,$(LIB))
> > +
> > +CPU_LDFLAGS += --version-script=$(EXPORT_MAP)
> > +
> > endif
> >
> > +
> > _BUILD = $(LIB)
> > _INSTALL = $(INSTALL-FILES-y) $(SYMLINK-FILES-y) $(RTE_OUTPUT)/lib/$(LIB)
> > _CLEAN = doclean
> > @@ -160,7 +164,9 @@ endif
> > $(RTE_OUTPUT)/lib/$(LIB): $(LIB)
> > @echo " INSTALL-LIB $(LIB)"
> > @[ -d $(RTE_OUTPUT)/lib ] || mkdir -p $(RTE_OUTPUT)/lib
> > +ifneq ($(LIB),)
> > $(Q)cp -f $(LIB) $(RTE_OUTPUT)/lib
> > +endif
> >
> > #
> > # Clean all generated files
> > --
> > 1.9.3
> >
> Looks good.
>
^ permalink raw reply [flat|nested] 43+ messages in thread
* Re: [dpdk-dev] [PATCH 1/4 v4] compat: Add infrastructure to support symbol versioning
2014-09-30 15:18 ` [dpdk-dev] [PATCH 1/4 v4] " Neil Horman
2014-10-01 10:15 ` Sergio Gonzalez Monroy
@ 2014-10-01 11:28 ` Sergio Gonzalez Monroy
1 sibling, 0 replies; 43+ messages in thread
From: Sergio Gonzalez Monroy @ 2014-10-01 11:28 UTC (permalink / raw)
To: Neil Horman; +Cc: dev
Acked-by: Sergio Gonzalez Monroy <sergio.gonzalez.monroy@intel.com>
On Tue, Sep 30, 2014 at 11:18:00AM -0400, Neil Horman wrote:
> Add initial pass header files to support symbol versioning.
>
> ---
> Change notes
> v2)
> * Fixed ifdef in rte_compat.h to test for RTE_BUILD_SHARED_LIB instead of the
> non-existant RTE_SYMBOL_VERSIONING
>
> * Fixed VERSION_SYMBOL macro to add the needed extra @ to make versioning work
> properly
>
> * Improved/Clarified documentation
>
> v3)
> * Added missing macros to fully export the symver directive specification
>
> v4)
> * Added macro definitions for !SHARED_LIB case
> * Improved documentation
>
> Signed-off-by: Neil Horman <nhorman@tuxdriver.com>
> CC: Thomas Monjalon <thomas.monjalon@6wind.com>
> CC: "Richardson, Bruce" <bruce.richardson@intel.com>
> CC: "Gonzalez Monroy, Sergio" <sergio.gonzalez.monroy@intel.com>
> ---
> lib/Makefile | 1 +
> lib/librte_compat/Makefile | 38 +++++++++++++++++
> lib/librte_compat/rte_compat.h | 96 ++++++++++++++++++++++++++++++++++++++++++
> mk/rte.lib.mk | 6 +++
> 4 files changed, 141 insertions(+)
> create mode 100644 lib/librte_compat/Makefile
> create mode 100644 lib/librte_compat/rte_compat.h
>
> diff --git a/lib/Makefile b/lib/Makefile
> index 10c5bb3..a85b55b 100644
> --- a/lib/Makefile
> +++ b/lib/Makefile
> @@ -32,6 +32,7 @@
> include $(RTE_SDK)/mk/rte.vars.mk
>
> DIRS-$(CONFIG_RTE_LIBC) += libc
> +DIRS-y += librte_compat
> DIRS-$(CONFIG_RTE_LIBRTE_EAL) += librte_eal
> DIRS-$(CONFIG_RTE_LIBRTE_MALLOC) += librte_malloc
> DIRS-$(CONFIG_RTE_LIBRTE_RING) += librte_ring
> diff --git a/lib/librte_compat/Makefile b/lib/librte_compat/Makefile
> new file mode 100644
> index 0000000..3415c7b
> --- /dev/null
> +++ b/lib/librte_compat/Makefile
> @@ -0,0 +1,38 @@
> +# BSD LICENSE
> +#
> +# Copyright(c) 2010-2014 Neil Horman <nhorman@tuxdriver.com>
> +# All rights reserved.
> +#
> +# Redistribution and use in source and binary forms, with or without
> +# modification, are permitted provided that the following conditions
> +# are met:
> +#
> +# * Redistributions of source code must retain the above copyright
> +# notice, this list of conditions and the following disclaimer.
> +# * Redistributions in binary form must reproduce the above copyright
> +# notice, this list of conditions and the following disclaimer in
> +# the documentation and/or other materials provided with the
> +# distribution.
> +# * Neither the name of Intel Corporation nor the names of its
> +# contributors may be used to endorse or promote products derived
> +# from this software without specific prior written permission.
> +#
> +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
> +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
> +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
> +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
> +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
> +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
> +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
> +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
> +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
> +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
> +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
> +
> +include $(RTE_SDK)/mk/rte.vars.mk
> +
> +
> +# install includes
> +SYMLINK-y-include := rte_compat.h
> +
> +include $(RTE_SDK)/mk/rte.lib.mk
> diff --git a/lib/librte_compat/rte_compat.h b/lib/librte_compat/rte_compat.h
> new file mode 100644
> index 0000000..d99e362
> --- /dev/null
> +++ b/lib/librte_compat/rte_compat.h
> @@ -0,0 +1,96 @@
> +/*-
> + * BSD LICENSE
> + *
> + * Copyright(c) 2010-2014 Neil Horman <nhorman@tuxdriver.com>.
> + * All rights reserved.
> + *
> + * Redistribution and use in source and binary forms, with or without
> + * modification, are permitted provided that the following conditions
> + * are met:
> + *
> + * * Redistributions of source code must retain the above copyright
> + * notice, this list of conditions and the following disclaimer.
> + * * Redistributions in binary form must reproduce the above copyright
> + * notice, this list of conditions and the following disclaimer in
> + * the documentation and/or other materials provided with the
> + * distribution.
> + * * Neither the name of Intel Corporation nor the names of its
> + * contributors may be used to endorse or promote products derived
> + * from this software without specific prior written permission.
> + *
> + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
> + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
> + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
> + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
> + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
> + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
> + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
> + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
> + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
> + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
> + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
> + */
> +
> +#ifndef _RTE_COMPAT_H_
> +#define _RTE_COMPAT_H_
> +
> +/*
> + * This is just a stringification macro for use below.
> + */
> +#define SA(x) #x
> +
> +#ifdef RTE_BUILD_SHARED_LIB
> +
> +/*
> + * Provides backwards compatibility when updating exported functions.
> + * When a symol is exported from a library to provide an API, it also provides a
> + * calling convention (ABI) that is embodied in its name, return type,
> + * arguments, etc. On occasion that function may need to change to accomodate
> + * new functionality, behavior, etc. When that occurs, it is desireable to
> + * allow for backwards compatibility for a time with older binaries that are
> + * dynamically linked to the dpdk. to support that the __vsym and
> + * VERSION_SYMBOL macros are created. They, in conjunction with the
> + * <library>_version.map file for a given library allow for multiple versions of
> + * a symbol to exist in a shared library so that older binaries need not be
> + * immediately recompiled. Their use is outlined in the following example:
> + * Assumptions: DPDK 1.(X) contains a function int foo(char *string)
> + * DPDK 1.(X+1) needs to change foo to be int foo(int index)
> + *
> + * To accomplish this:
> + * 1) Edit lib/<library>/library_version.map to add a DPDK_1.(X+1) node, in which
> + * foo is exported as a global symbol.
> + *
> + * 2) rename the existing function int foo(char *string) to
> + * int __vsym foo_v18(char *string)
> + *
> + * 3) Add this macro immediately below the function
> + * VERSION_SYMBOL(foo, _v18, 1.8);
> + *
> + * 4) Implement a new version of foo.
> + * char foo(int value, int otherval) { ...}
> + *
> + * 5) Mark the newest version as the default version
> + * BIND_DEFAULT_SYMBOL(foo, 1.9);
> + *
> + */
> +#define VERSION_SYMBOL(b, e, v) __asm__(".symver " SA(b) SA(e) ", "SA(b)"@DPDK_"SA(v))
> +#define BASE_SYMBOL(b, n) __asm__(".symver " SA(n) ", "SA(b)"@")
> +#define BIND_DEFAULT_SYMBOL(b, v) __asm__(".symver " SA(b) ", "SA(b)"@@DPDK_"SA(v))
> +#define __vsym __attribute__((used))
> +
> +#else
> +/*
> + * No symbol versioning in use
> + */
> +#define VERSION_SYMBOL(b, e, v)
> +#define __vsym
> +#define BASE_SYMBOL(b, n)
> +#define BIND_DEFAULT_SYMBOL(b, v)
> +
> +/*
> + * RTE_BUILD_SHARED_LIB
> + */
> +#endif
> +
> +
> +#endif /* _RTE_COMPAT_H_ */
> diff --git a/mk/rte.lib.mk b/mk/rte.lib.mk
> index f458258..82ac309 100644
> --- a/mk/rte.lib.mk
> +++ b/mk/rte.lib.mk
> @@ -40,8 +40,12 @@ VPATH += $(SRCDIR)
>
> ifeq ($(RTE_BUILD_SHARED_LIB),y)
> LIB := $(patsubst %.a,%.so,$(LIB))
> +
> +CPU_LDFLAGS += --version-script=$(EXPORT_MAP)
> +
> endif
>
> +
> _BUILD = $(LIB)
> _INSTALL = $(INSTALL-FILES-y) $(SYMLINK-FILES-y) $(RTE_OUTPUT)/lib/$(LIB)
> _CLEAN = doclean
> @@ -160,7 +164,9 @@ endif
> $(RTE_OUTPUT)/lib/$(LIB): $(LIB)
> @echo " INSTALL-LIB $(LIB)"
> @[ -d $(RTE_OUTPUT)/lib ] || mkdir -p $(RTE_OUTPUT)/lib
> +ifneq ($(LIB),)
> $(Q)cp -f $(LIB) $(RTE_OUTPUT)/lib
> +endif
>
> #
> # Clean all generated files
> --
> 1.9.3
>
^ permalink raw reply [flat|nested] 43+ messages in thread
* [dpdk-dev] [PATCH 2/4] Provide initial versioning for all DPDK libraries
2014-09-15 19:23 [dpdk-dev] [PATCH 0/4] Add DSO symbol versioning to support backwards compatibility Neil Horman
2014-09-15 19:23 ` [dpdk-dev] [PATCH 1/4] compat: Add infrastructure to support symbol versioning Neil Horman
@ 2014-09-15 19:23 ` Neil Horman
2014-09-19 9:45 ` Bruce Richardson
2014-10-01 11:25 ` Sergio Gonzalez Monroy
2014-09-15 19:23 ` [dpdk-dev] [PATCH 3/4] Add library version extenstion Neil Horman
` (2 subsequent siblings)
4 siblings, 2 replies; 43+ messages in thread
From: Neil Horman @ 2014-09-15 19:23 UTC (permalink / raw)
To: dev
Add linker version script files to each DPDK library to put a stake in the
ground from which we can start cleaning up API's
Signed-off-by: Neil Horman <nhorman@tuxdriver.com>
CC: Thomas Monjalon <thomas.monjalon@6wind.com>
CC: "Richardson, Bruce" <bruce.richardson@intel.com>
---
lib/librte_acl/Makefile | 2 +
lib/librte_acl/rte_acl_version.map | 19 ++++
lib/librte_cfgfile/Makefile | 2 +
lib/librte_cfgfile/rte_cfgfile_version.map | 14 +++
lib/librte_cmdline/Makefile | 2 +
lib/librte_cmdline/rte_cmdline_version.map | 69 +++++++++++++
lib/librte_distributor/Makefile | 2 +
lib/librte_distributor/rte_distributor_version.map | 16 +++
lib/librte_eal/bsdapp/eal/Makefile | 2 +
lib/librte_eal/bsdapp/eal/rte_eal_version.map | 89 +++++++++++++++++
lib/librte_eal/linuxapp/eal/Makefile | 2 +
lib/librte_eal/linuxapp/eal/rte_eal_version.map | 89 +++++++++++++++++
lib/librte_ether/Makefile | 2 +
lib/librte_ether/rte_ether_version.map | 108 +++++++++++++++++++++
lib/librte_hash/Makefile | 2 +
lib/librte_hash/rte_hash_version.map | 18 ++++
lib/librte_ip_frag/Makefile | 2 +
lib/librte_ip_frag/rte_ipfrag_version.map | 14 +++
lib/librte_ivshmem/Makefile | 2 +
lib/librte_ivshmem/rte_ivshmem_version.map | 13 +++
lib/librte_kni/Makefile | 2 +
lib/librte_kni/rte_kni_version.map | 19 ++++
lib/librte_kvargs/Makefile | 2 +
lib/librte_kvargs/rte_kvargs_version.map | 10 ++
lib/librte_lpm/Makefile | 2 +
lib/librte_lpm/rte_lpm_version.map | 24 +++++
lib/librte_malloc/Makefile | 2 +
lib/librte_malloc/rte_malloc_version.map | 19 ++++
lib/librte_mbuf/Makefile | 2 +
lib/librte_mbuf/rte_mbuf_version.map | 12 +++
lib/librte_mempool/Makefile | 2 +
lib/librte_mempool/rte_mempool_version.map | 18 ++++
lib/librte_meter/Makefile | 2 +
lib/librte_meter/rte_meter_version.map | 13 +++
lib/librte_pipeline/Makefile | 2 +
lib/librte_pipeline/rte_pipeline_version.map | 23 +++++
lib/librte_pmd_bond/Makefile | 2 +
lib/librte_pmd_bond/rte_eth_bond_version.map | 20 ++++
lib/librte_pmd_e1000/Makefile | 2 +
lib/librte_pmd_e1000/rte_pmd_e1000_version.map | 5 +
lib/librte_pmd_i40e/Makefile | 2 +
lib/librte_pmd_i40e/rte_pmd_i40e_version.map | 5 +
lib/librte_pmd_ixgbe/Makefile | 2 +
lib/librte_pmd_ixgbe/rte_pmd_ixgbe_version.map | 5 +
lib/librte_pmd_pcap/Makefile | 2 +
lib/librte_pmd_pcap/rte_pmd_pcap_version.map | 5 +
lib/librte_pmd_ring/Makefile | 2 +
lib/librte_pmd_ring/rte_eth_ring.c | 2 +-
lib/librte_pmd_ring/rte_eth_ring.h | 6 --
lib/librte_pmd_ring/rte_eth_ring_version.map | 10 ++
lib/librte_pmd_virtio/Makefile | 1 +
lib/librte_pmd_virtio/rte_pmd_virtio_version.map | 5 +
lib/librte_pmd_vmxnet3/Makefile | 2 +
lib/librte_pmd_vmxnet3/rte_pmd_vmxnet3_version.map | 5 +
lib/librte_pmd_xenvirt/Makefile | 2 +
lib/librte_pmd_xenvirt/rte_eth_xenvirt_version.map | 8 ++
lib/librte_port/Makefile | 2 +
lib/librte_port/rte_port_version.map | 18 ++++
lib/librte_power/Makefile | 2 +
lib/librte_power/rte_power_version.map | 14 +++
lib/librte_ring/Makefile | 2 +
lib/librte_ring/rte_ring_version.map | 12 +++
lib/librte_sched/Makefile | 2 +
lib/librte_sched/rte_sched_version.map | 22 +++++
lib/librte_table/Makefile | 2 +
lib/librte_table/rte_table_version.map | 22 +++++
lib/librte_timer/Makefile | 2 +
lib/librte_timer/rte_timer_version.map | 16 +++
68 files changed, 825 insertions(+), 7 deletions(-)
create mode 100644 lib/librte_acl/rte_acl_version.map
create mode 100644 lib/librte_cfgfile/rte_cfgfile_version.map
create mode 100644 lib/librte_cmdline/rte_cmdline_version.map
create mode 100644 lib/librte_distributor/rte_distributor_version.map
create mode 100644 lib/librte_eal/bsdapp/eal/rte_eal_version.map
create mode 100644 lib/librte_eal/linuxapp/eal/rte_eal_version.map
create mode 100644 lib/librte_ether/rte_ether_version.map
create mode 100644 lib/librte_hash/rte_hash_version.map
create mode 100644 lib/librte_ip_frag/rte_ipfrag_version.map
create mode 100644 lib/librte_ivshmem/rte_ivshmem_version.map
create mode 100644 lib/librte_kni/rte_kni_version.map
create mode 100644 lib/librte_kvargs/rte_kvargs_version.map
create mode 100644 lib/librte_lpm/rte_lpm_version.map
create mode 100644 lib/librte_malloc/rte_malloc_version.map
create mode 100644 lib/librte_mbuf/rte_mbuf_version.map
create mode 100644 lib/librte_mempool/rte_mempool_version.map
create mode 100644 lib/librte_meter/rte_meter_version.map
create mode 100644 lib/librte_pipeline/rte_pipeline_version.map
create mode 100644 lib/librte_pmd_bond/rte_eth_bond_version.map
create mode 100644 lib/librte_pmd_e1000/rte_pmd_e1000_version.map
create mode 100644 lib/librte_pmd_i40e/rte_pmd_i40e_version.map
create mode 100644 lib/librte_pmd_ixgbe/rte_pmd_ixgbe_version.map
create mode 100644 lib/librte_pmd_pcap/rte_pmd_pcap_version.map
create mode 100644 lib/librte_pmd_ring/rte_eth_ring_version.map
create mode 100644 lib/librte_pmd_virtio/rte_pmd_virtio_version.map
create mode 100644 lib/librte_pmd_vmxnet3/rte_pmd_vmxnet3_version.map
create mode 100644 lib/librte_pmd_xenvirt/rte_eth_xenvirt_version.map
create mode 100644 lib/librte_port/rte_port_version.map
create mode 100644 lib/librte_power/rte_power_version.map
create mode 100644 lib/librte_ring/rte_ring_version.map
create mode 100644 lib/librte_sched/rte_sched_version.map
create mode 100644 lib/librte_table/rte_table_version.map
create mode 100644 lib/librte_timer/rte_timer_version.map
diff --git a/lib/librte_acl/Makefile b/lib/librte_acl/Makefile
index 65e566d..1f96645 100644
--- a/lib/librte_acl/Makefile
+++ b/lib/librte_acl/Makefile
@@ -37,6 +37,8 @@ LIB = librte_acl.a
CFLAGS += -O3
CFLAGS += $(WERROR_FLAGS) -I$(SRCDIR)
+EXPORT_MAP := $(RTE_SDK)/lib/librte_acl/rte_acl_version.map
+
# all source are stored in SRCS-y
SRCS-$(CONFIG_RTE_LIBRTE_ACL) += tb_mem.c
diff --git a/lib/librte_acl/rte_acl_version.map b/lib/librte_acl/rte_acl_version.map
new file mode 100644
index 0000000..4480690
--- /dev/null
+++ b/lib/librte_acl/rte_acl_version.map
@@ -0,0 +1,19 @@
+DPDK_1.8 {
+ global:
+ rte_acl_create;
+ rte_acl_find_existing;
+ rte_acl_free;
+ rte_acl_add_rules;
+ rte_acl_reset_rules;
+ rte_acl_build;
+ rte_acl_reset;
+ rte_acl_classify;
+ rte_acl_dump;
+ rte_acl_list_dump;
+ rte_acl_ipv4vlan_add_rules;
+ rte_acl_ipv4vlan_build;
+ rte_acl_classify_scalar;
+
+ local: *;
+};
+
diff --git a/lib/librte_cfgfile/Makefile b/lib/librte_cfgfile/Makefile
index 55e8701..e655098 100644
--- a/lib/librte_cfgfile/Makefile
+++ b/lib/librte_cfgfile/Makefile
@@ -39,6 +39,8 @@ LIB = librte_cfgfile.a
CFLAGS += -O3
CFLAGS += $(WERROR_FLAGS)
+EXPORT_MAP := $(RTE_SDK)/lib/librte_cfgfile/rte_cfgfile_version.map
+
#
# all source are stored in SRCS-y
#
diff --git a/lib/librte_cfgfile/rte_cfgfile_version.map b/lib/librte_cfgfile/rte_cfgfile_version.map
new file mode 100644
index 0000000..10ecea6
--- /dev/null
+++ b/lib/librte_cfgfile/rte_cfgfile_version.map
@@ -0,0 +1,14 @@
+DPDK_1.8 {
+ global:
+ rte_cfgfile_load;
+ rte_cfgfile_num_sections;
+ rte_cfgfile_sections;
+ rte_cfgfile_has_section;
+ rte_cfgfile_section_num_entries;
+ rte_cfgfile_section_entries;
+ rte_cfgfile_get_entry;
+ rte_cfgfile_has_entry;
+ rte_cfgfile_close;
+
+ local: *;
+};
diff --git a/lib/librte_cmdline/Makefile b/lib/librte_cmdline/Makefile
index 7eae449..1a47173 100644
--- a/lib/librte_cmdline/Makefile
+++ b/lib/librte_cmdline/Makefile
@@ -36,6 +36,8 @@ LIB = librte_cmdline.a
CFLAGS += $(WERROR_FLAGS) -I$(SRCDIR) -O3
+EXPORT_MAP := $(RTE_SDK)/lib/librte_cmdline/rte_cmdline_version.map
+
# all source are stored in SRCS-y
SRCS-$(CONFIG_RTE_LIBRTE_CMDLINE) := cmdline.c
SRCS-$(CONFIG_RTE_LIBRTE_CMDLINE) += cmdline_cirbuf.c
diff --git a/lib/librte_cmdline/rte_cmdline_version.map b/lib/librte_cmdline/rte_cmdline_version.map
new file mode 100644
index 0000000..7616eff
--- /dev/null
+++ b/lib/librte_cmdline/rte_cmdline_version.map
@@ -0,0 +1,69 @@
+DPDK_1.8 {
+ global:
+ cmdline_new;
+ cmdline_set_prompt;
+ cmdline_free;
+ cmdline_printf;
+ cmdline_in;
+ cmdline_write_char;
+ cmdline_interact;
+ cmdline_quit;
+ cmdline_parse;
+ cmdline_complete;
+ cmdline_isendoftoken;
+ cmdline_parse_num;
+ cmdline_get_help_num;
+ cmdline_parse_ipaddr;
+ cmdline_get_help_ipaddr;
+ cmdline_parse_etheraddr;
+ cmdline_get_help_etheraddr;
+ cmdline_parse_string;
+ cmdline_complete_get_nb_string;
+ cmdline_complete_get_elt_string;
+ cmdline_get_help_string;
+ cmdline_parse_portlist;
+ cmdline_get_help_portlist;
+ cmdline_token_string_ops;
+ cmdline_token_num_ops;
+ cmdline_token_string_ops;
+ cmdline_token_ipaddr_ops;
+ cmdline_token_etheraddr_ops;
+ vt100_init;
+ vt100_parser;
+ cmdline_file_new;
+ cmdline_stdin_new;
+ cmdline_stdin_exit;
+ cirbuf_init;
+ cirbuf_add_head_safe;
+ cirbuf_add_head;
+ cirbuf_add_tail_safe;
+ cirbuf_add_tail;
+ cirbuf_del_head_safe;
+ cirbuf_del_head;
+ cirbuf_del_tail_safe;
+ cirbuf_del_tail;
+ cirbuf_get_head;
+ cirbuf_get_tail;
+ cirbuf_add_buf_head;
+ cirbuf_add_buf_tail;
+ cirbuf_del_buf_head;
+ cirbuf_del_buf_tail;
+ cirbuf_get_buf_head;
+ cirbuf_get_buf_tail;
+ cirbuf_align_left;
+ cirbuf_align_right;
+ rdline_init;
+ rdline_newline;
+ rdline_stop;
+ rdline_quit;
+ rdline_restart;
+ rdline_redisplay;
+ rdline_reset;
+ rdline_char_in;
+ rdline_get_buffer;
+ rdline_add_history;
+ rdline_clear_history;
+ rdline_get_history_item;
+
+ local: *;
+};
diff --git a/lib/librte_distributor/Makefile b/lib/librte_distributor/Makefile
index 36699f8..97d8bbb 100644
--- a/lib/librte_distributor/Makefile
+++ b/lib/librte_distributor/Makefile
@@ -37,6 +37,8 @@ LIB = librte_distributor.a
CFLAGS += -O3
CFLAGS += $(WERROR_FLAGS) -I$(SRCDIR)
+EXPORT_MAP := $(RTE_SDK)/lib/librte_distributor/rte_distributor_version.map
+
# all source are stored in SRCS-y
SRCS-$(CONFIG_RTE_LIBRTE_DISTRIBUTOR) := rte_distributor.c
diff --git a/lib/librte_distributor/rte_distributor_version.map b/lib/librte_distributor/rte_distributor_version.map
new file mode 100644
index 0000000..b81ddc8
--- /dev/null
+++ b/lib/librte_distributor/rte_distributor_version.map
@@ -0,0 +1,16 @@
+DPDK_1.8 {
+
+ global:
+ rte_distributor_create;
+ rte_distributor_process;
+ rte_distributor_returned_pkts;
+ rte_distributor_flush;
+ rte_distributor_clear_returns;
+ rte_distributor_get_pkt;
+ rte_distributor_return_pkt;
+ rte_distributor_request_pkt;
+ rte_distributor_poll_pkt;
+
+ local: *;
+};
+
diff --git a/lib/librte_eal/bsdapp/eal/Makefile b/lib/librte_eal/bsdapp/eal/Makefile
index 8f44273..2caaf00 100644
--- a/lib/librte_eal/bsdapp/eal/Makefile
+++ b/lib/librte_eal/bsdapp/eal/Makefile
@@ -45,6 +45,8 @@ CFLAGS += -I$(RTE_SDK)/lib/librte_pmd_ring
CFLAGS += -I$(RTE_SDK)/lib/librte_pmd_pcap
CFLAGS += $(WERROR_FLAGS) -O3
+EXPORT_MAP := $(RTE_SDK)/lib/librte_eal/bsdapp/eal/rte_eal_version.map
+
# specific to linuxapp exec-env
SRCS-$(CONFIG_RTE_LIBRTE_EAL_BSDAPP) := eal.c
SRCS-$(CONFIG_RTE_LIBRTE_EAL_BSDAPP) += eal_memory.c
diff --git a/lib/librte_eal/bsdapp/eal/rte_eal_version.map b/lib/librte_eal/bsdapp/eal/rte_eal_version.map
new file mode 100644
index 0000000..71788e1
--- /dev/null
+++ b/lib/librte_eal/bsdapp/eal/rte_eal_version.map
@@ -0,0 +1,89 @@
+DPDK_1.8 {
+ global:
+ rte_eal_alarm_set;
+ rte_eal_alarm_cancel;
+ rte_exit;
+ rte_cpu_get_flag_enabled;
+ rte_cpu_check_supported;
+ rte_get_tsc_hz;
+ rte_get_hpet_cycles;
+ rte_get_hpet_hz;
+ rte_eal_hpet_init;
+ rte_delay_us;
+ rte_dump_stack;
+ rte_dump_registers;
+ __rte_panic;
+ rte_eal_devargs_add;
+ rte_eal_devargs_type_count;
+ rte_eal_devargs_dump;
+ rte_eal_driver_register;
+ rte_eal_driver_unregister;
+ rte_eal_dev_init;
+ rte_eal_init;
+ rte_set_application_usage_hook;
+ rte_eal_has_hugepages;
+ rte_strerror;
+ rte_hexdump;
+ rte_memdump;
+ rte_intr_callback_register;
+ rte_intr_callback_unregister;
+ rte_intr_enable;
+ rte_intr_disable;
+ rte_eal_remote_launch;
+ rte_eal_mp_remote_launch;
+ rte_eal_get_lcore_state;
+ rte_eal_wait_lcore;
+ rte_eal_mp_wait_lcore;
+ rte_openlog_stream;
+ rte_set_log_level;
+ rte_set_log_type;
+ rte_log_cur_msg_loglevel;
+ rte_log_cur_msg_logtype;
+ rte_log_set_history;
+ rte_log_dump_history;
+ rte_log_add_in_history;
+ rte_log;
+ rte_vlog;
+ rte_mem_lock_page;
+ rte_mem_virt2phy;
+ rte_eal_get_physmem_layout;
+ rte_dump_physmem_layout;
+ rte_eal_get_physmem_size;
+ rte_memory_get_nchannel;
+ rte_memory_get_nrank;
+ rte_mem_phy2mch;
+ rte_xen_dom0_memory_init;
+ rte_xen_dom0_memory_attach;
+ rte_memzone_reserve;
+ rte_memzone_reserve_aligned;
+ rte_memzone_reserve_bounded;
+ rte_memzone_lookup;
+ rte_memzone_dump;
+ rte_memzone_walk;
+ rte_eal_pci_probe;
+ rte_eal_pci_dump;
+ rte_eal_pci_register;
+ rte_eal_pci_unregister;
+ rte_snprintf;
+ rte_strsplit;
+ rte_eal_tailq_reserve;
+ rte_eal_tailq_reserve_by_idx;
+ rte_dump_tailq;
+ rte_eal_tailq_lookup;
+ rte_eal_tailq_lookup_by_idx;
+ lcore_config;
+ per_lcore__lcore_id;
+ eal_timer_source;
+ rte_cycles_vmware_tsc_map;
+ rte_eal_get_configuration;
+ rte_logs;
+ rte_eal_lcore_role;
+ test_mp_secondary;
+ rte_eal_process_type;
+ per_lcore__rte_errno;
+ pci_device_list;
+ devargs_list;
+ eal_parse_sysfs_value;
+
+ local: *;
+};
diff --git a/lib/librte_eal/linuxapp/eal/Makefile b/lib/librte_eal/linuxapp/eal/Makefile
index 756d6b0..254d59c 100644
--- a/lib/librte_eal/linuxapp/eal/Makefile
+++ b/lib/librte_eal/linuxapp/eal/Makefile
@@ -33,6 +33,8 @@ include $(RTE_SDK)/mk/rte.vars.mk
LIB = librte_eal.a
+EXPORT_MAP := $(RTE_SDK)/lib/librte_eal/linuxapp/eal/rte_eal_version.map
+
VPATH += $(RTE_SDK)/lib/librte_eal/common
CFLAGS += -I$(SRCDIR)/include
diff --git a/lib/librte_eal/linuxapp/eal/rte_eal_version.map b/lib/librte_eal/linuxapp/eal/rte_eal_version.map
new file mode 100644
index 0000000..71788e1
--- /dev/null
+++ b/lib/librte_eal/linuxapp/eal/rte_eal_version.map
@@ -0,0 +1,89 @@
+DPDK_1.8 {
+ global:
+ rte_eal_alarm_set;
+ rte_eal_alarm_cancel;
+ rte_exit;
+ rte_cpu_get_flag_enabled;
+ rte_cpu_check_supported;
+ rte_get_tsc_hz;
+ rte_get_hpet_cycles;
+ rte_get_hpet_hz;
+ rte_eal_hpet_init;
+ rte_delay_us;
+ rte_dump_stack;
+ rte_dump_registers;
+ __rte_panic;
+ rte_eal_devargs_add;
+ rte_eal_devargs_type_count;
+ rte_eal_devargs_dump;
+ rte_eal_driver_register;
+ rte_eal_driver_unregister;
+ rte_eal_dev_init;
+ rte_eal_init;
+ rte_set_application_usage_hook;
+ rte_eal_has_hugepages;
+ rte_strerror;
+ rte_hexdump;
+ rte_memdump;
+ rte_intr_callback_register;
+ rte_intr_callback_unregister;
+ rte_intr_enable;
+ rte_intr_disable;
+ rte_eal_remote_launch;
+ rte_eal_mp_remote_launch;
+ rte_eal_get_lcore_state;
+ rte_eal_wait_lcore;
+ rte_eal_mp_wait_lcore;
+ rte_openlog_stream;
+ rte_set_log_level;
+ rte_set_log_type;
+ rte_log_cur_msg_loglevel;
+ rte_log_cur_msg_logtype;
+ rte_log_set_history;
+ rte_log_dump_history;
+ rte_log_add_in_history;
+ rte_log;
+ rte_vlog;
+ rte_mem_lock_page;
+ rte_mem_virt2phy;
+ rte_eal_get_physmem_layout;
+ rte_dump_physmem_layout;
+ rte_eal_get_physmem_size;
+ rte_memory_get_nchannel;
+ rte_memory_get_nrank;
+ rte_mem_phy2mch;
+ rte_xen_dom0_memory_init;
+ rte_xen_dom0_memory_attach;
+ rte_memzone_reserve;
+ rte_memzone_reserve_aligned;
+ rte_memzone_reserve_bounded;
+ rte_memzone_lookup;
+ rte_memzone_dump;
+ rte_memzone_walk;
+ rte_eal_pci_probe;
+ rte_eal_pci_dump;
+ rte_eal_pci_register;
+ rte_eal_pci_unregister;
+ rte_snprintf;
+ rte_strsplit;
+ rte_eal_tailq_reserve;
+ rte_eal_tailq_reserve_by_idx;
+ rte_dump_tailq;
+ rte_eal_tailq_lookup;
+ rte_eal_tailq_lookup_by_idx;
+ lcore_config;
+ per_lcore__lcore_id;
+ eal_timer_source;
+ rte_cycles_vmware_tsc_map;
+ rte_eal_get_configuration;
+ rte_logs;
+ rte_eal_lcore_role;
+ test_mp_secondary;
+ rte_eal_process_type;
+ per_lcore__rte_errno;
+ pci_device_list;
+ devargs_list;
+ eal_parse_sysfs_value;
+
+ local: *;
+};
diff --git a/lib/librte_ether/Makefile b/lib/librte_ether/Makefile
index b310f8b..f40b5cc 100644
--- a/lib/librte_ether/Makefile
+++ b/lib/librte_ether/Makefile
@@ -39,6 +39,8 @@ LIB = libethdev.a
CFLAGS += -O3
CFLAGS += $(WERROR_FLAGS)
+EXPORT_MAP := $(RTE_SDK)/lib/librte_ether/rte_ether_version.map
+
SRCS-y += rte_ethdev.c
#
diff --git a/lib/librte_ether/rte_ether_version.map b/lib/librte_ether/rte_ether_version.map
new file mode 100644
index 0000000..41952ab
--- /dev/null
+++ b/lib/librte_ether/rte_ether_version.map
@@ -0,0 +1,108 @@
+DPDK_1.8 {
+ global:
+ rte_eth_driver_register;
+ rte_eth_dev_configure;
+ rte_eth_rx_queue_setup;
+ rte_eth_tx_queue_setup;
+ rte_eth_dev_socket_id;
+ rte_eth_dev_rx_queue_start;
+ rte_eth_dev_rx_queue_stop;
+ rte_eth_dev_tx_queue_start;
+ rte_eth_dev_tx_queue_stop;
+ rte_eth_dev_start;
+ rte_eth_dev_stop;
+ rte_eth_dev_set_link_up;
+ rte_eth_dev_set_link_down;
+ rte_eth_dev_close;
+ rte_eth_promiscuous_enable;
+ rte_eth_promiscuous_disable;
+ rte_eth_promiscuous_get;
+ rte_eth_allmulticast_enable;
+ rte_eth_allmulticast_disable;
+ rte_eth_allmulticast_get;
+ rte_eth_link;
+ rte_eth_link_get_nowait;
+ rte_eth_stats;
+ rte_eth_stats_reset;
+ rte_eth_dev_set_tx_queue_stats_mapping;
+ rte_eth_dev_set_rx_queue_stats_mapping;
+ rte_eth_macaddr_get;
+ rte_eth_dev_info_get;
+ rte_eth_dev_get_mtu;
+ rte_eth_dev_set_mtu;
+ rte_eth_dev_vlan_filter;
+ rte_eth_dev_set_vlan_strip_on_queue;
+ rte_eth_dev_set_vlan_ether_type;
+ rte_eth_dev_set_vlan_offload;
+ rte_eth_dev_get_vlan_offload;
+ rte_eth_dev_set_vlan_pvid;
+ rte_eth_rx_burst;
+ rte_eth_rx_queue_count;
+ rte_eth_rx_descriptor_done;
+ rte_eth_tx_burst;
+ rte_eth_dev_fdir_add_signature_filter;
+ rte_eth_dev_fdir_update_signature_filter;
+ rte_eth_dev_fdir_remove_signature_filter;
+ rte_eth_dev_fdir_get_infos;
+ rte_eth_dev_fdir_add_perfect_filter;
+ rte_eth_dev_fdir_update_perfect_filter;
+ rte_eth_dev_fdir_remove_perfect_filter;
+ rte_eth_dev_fdir_set_masks;
+ rte_eth_dev_callback_register;
+ rte_eth_dev_callback_unregister;
+ rte_eth_dev_callback_process;
+ rte_eth_led_on;
+ rte_eth_led_off;
+ rte_eth_dev_flow_ctrl_get;
+ rte_eth_dev_flow_ctrl_set;
+ rte_eth_dev_priority_flow_ctrl_set;
+ rte_eth_dev_mac_addr_add;
+ rte_eth_dev_mac_addr_remove;
+ rte_eth_dev_rss_reta_update;
+ rte_eth_dev_rss_reta_query;
+ rte_eth_dev_uc_hash_table_set;
+ rte_eth_dev_uc_all_hash_table_set;
+ rte_eth_dev_set_vf_rxmode;
+ rte_eth_dev_set_vf_tx;
+ rte_eth_dev_set_vf_rx;
+ rte_eth_dev_set_vf_vlan_filter;
+ rte_eth_mirror_rule_set;
+ rte_eth_mirror_rule_reset;
+ rte_eth_set_queue_rate_limit;
+ rte_eth_set_vf_rate_limit;
+ rte_eth_dev_bypass_init;
+ rte_eth_dev_bypass_state_show;
+ rte_eth_dev_bypass_state_set;
+ rte_eth_dev_bypass_event_show;
+ rte_eth_dev_bypass_event_store;
+ rte_eth_dev_wd_timeout_store;
+ rte_eth_dev_bypass_ver_show;
+ rte_eth_dev_bypass_wd_timeout_show;
+ rte_eth_dev_bypass_wd_reset;
+ rte_eth_dev_rss_hash_update;
+ rte_eth_dev_rss_hash_conf_get;
+ rte_eth_dev_add_syn_filter;
+ rte_eth_dev_remove_syn_filter;
+ rte_eth_dev_get_syn_filter;
+ rte_eth_dev_add_ethertype_filter;
+ rte_eth_dev_remove_ethertype_filter;
+ rte_eth_dev_get_ethertype_filter;
+ rte_eth_dev_add_2tuple_filter;
+ rte_eth_dev_remove_2tuple_filter;
+ rte_eth_dev_get_2tuple_filter;
+ rte_eth_dev_add_5tuple_filter;
+ rte_eth_dev_remove_5tuple_filter;
+ rte_eth_dev_get_5tuple_filter;
+ rte_eth_dev_add_flex_filter;
+ rte_eth_dev_remove_flex_filter;
+ rte_eth_dev_get_flex_filter;
+ rte_eth_dev_count;
+ rte_eth_link_get;
+ rte_eth_devices;
+ rte_eth_stats_get;
+ rte_eth_dev_allocate;
+ _rte_eth_dev_callback_process;
+
+ local: *;
+};
+
diff --git a/lib/librte_hash/Makefile b/lib/librte_hash/Makefile
index 95e4c09..a449ec2 100644
--- a/lib/librte_hash/Makefile
+++ b/lib/librte_hash/Makefile
@@ -37,6 +37,8 @@ LIB = librte_hash.a
CFLAGS += -O3
CFLAGS += $(WERROR_FLAGS) -I$(SRCDIR)
+EXPORT_MAP := $(RTE_SDK)/lib/librte_hash/rte_hash_version.map
+
# all source are stored in SRCS-y
SRCS-$(CONFIG_RTE_LIBRTE_HASH) := rte_hash.c
SRCS-$(CONFIG_RTE_LIBRTE_HASH) += rte_fbk_hash.c
diff --git a/lib/librte_hash/rte_hash_version.map b/lib/librte_hash/rte_hash_version.map
new file mode 100644
index 0000000..2a34313
--- /dev/null
+++ b/lib/librte_hash/rte_hash_version.map
@@ -0,0 +1,18 @@
+DPDK_1.8 {
+ global:
+ rte_fbk_hash_find_existing;
+ rte_fbk_hash_create;
+ rte_fbk_hash_free;
+ rte_hash_create;
+ rte_hash_find_existing;
+ rte_hash_free;
+ rte_hash_add_key;
+ rte_hash_add_key_with_hash;
+ rte_hash_del_key;
+ rte_hash_del_key_with_hash;
+ rte_hash_lookup;
+ rte_hash_lookup_with_hash;
+ rte_hash_lookup_bulk;
+
+ local: *;
+};
diff --git a/lib/librte_ip_frag/Makefile b/lib/librte_ip_frag/Makefile
index 2265c93..ede5a89 100644
--- a/lib/librte_ip_frag/Makefile
+++ b/lib/librte_ip_frag/Makefile
@@ -37,6 +37,8 @@ LIB = librte_ip_frag.a
CFLAGS += -O3
CFLAGS += $(WERROR_FLAGS) -I$(SRCDIR)
+EXPORT_MAP := $(RTE_SDK)/lib/librte_ip_frag/rte_ipfrag_version.map
+
#source files
SRCS-$(CONFIG_RTE_LIBRTE_IP_FRAG) += rte_ipv4_fragmentation.c
SRCS-$(CONFIG_RTE_LIBRTE_IP_FRAG) += rte_ipv4_reassembly.c
diff --git a/lib/librte_ip_frag/rte_ipfrag_version.map b/lib/librte_ip_frag/rte_ipfrag_version.map
new file mode 100644
index 0000000..afe1a0b
--- /dev/null
+++ b/lib/librte_ip_frag/rte_ipfrag_version.map
@@ -0,0 +1,14 @@
+DPDK_1.8 {
+ global:
+
+ rte_ip_frag_table_create;
+ rte_ipv6_fragment_packet;
+ rte_ipv6_frag_reassemble_packet;
+ rte_ipv4_fragment_packet;
+ rte_ipv4_frag_reassemble_packet;
+ rte_ip_frag_free_death_row;
+ rte_ip_frag_table_statistics_dump;
+
+ local: *;
+};
+
diff --git a/lib/librte_ivshmem/Makefile b/lib/librte_ivshmem/Makefile
index 536814c..be6f21a 100644
--- a/lib/librte_ivshmem/Makefile
+++ b/lib/librte_ivshmem/Makefile
@@ -36,6 +36,8 @@ LIB = librte_ivshmem.a
CFLAGS += $(WERROR_FLAGS) -I$(SRCDIR) -O3
+EXPORT_MAPS := $(RTE_SDK)/lib/librte_ivshmem/rte_ivshmem_version.map
+
# all source are stored in SRCS-y
SRCS-$(CONFIG_RTE_LIBRTE_IVSHMEM) := rte_ivshmem.c
diff --git a/lib/librte_ivshmem/rte_ivshmem_version.map b/lib/librte_ivshmem/rte_ivshmem_version.map
new file mode 100644
index 0000000..a204339
--- /dev/null
+++ b/lib/librte_ivshmem/rte_ivshmem_version.map
@@ -0,0 +1,13 @@
+DPDK_1.8 {
+ global:
+
+ rte_ivshmem_metadata_create;
+ rte_ivshmem_metadata_add_memzone;
+ rte_ivshmem_metadata_add_ring;
+ rte_ivshmem_metadata_add_mempool;
+ rte_ivshmem_metadata_cmdline_generate;
+ rte_ivshmem_metadata_dump;
+
+ local: *;
+};
+
diff --git a/lib/librte_kni/Makefile b/lib/librte_kni/Makefile
index 5267304..c119fc1 100644
--- a/lib/librte_kni/Makefile
+++ b/lib/librte_kni/Makefile
@@ -36,6 +36,8 @@ LIB = librte_kni.a
CFLAGS += $(WERROR_FLAGS) -I$(SRCDIR) -O3 -fno-strict-aliasing
+EXPORT_MAP := $(RTE_SDK)/lib/librte_kni/rte_kni_version.map
+
# all source are stored in SRCS-y
SRCS-$(CONFIG_RTE_LIBRTE_KNI) := rte_kni.c
diff --git a/lib/librte_kni/rte_kni_version.map b/lib/librte_kni/rte_kni_version.map
new file mode 100644
index 0000000..58fbc1f
--- /dev/null
+++ b/lib/librte_kni/rte_kni_version.map
@@ -0,0 +1,19 @@
+DPDK_1.8 {
+ global:
+
+ rte_kni_alloc;
+ rte_kni_create;
+ rte_kni_release;
+ rte_kni_handle_request;
+ rte_kni_rx_burst;
+ rte_kni_tx_burst;
+ rte_kni_get_port_id;
+ rte_kni_get;
+ rte_kni_info_get;
+ rte_kni_register_handlers;
+ rte_kni_unregister_handlers;
+ rte_kni_close;
+
+ local: *;
+};
+
diff --git a/lib/librte_kvargs/Makefile b/lib/librte_kvargs/Makefile
index b09359a..83a42b1 100644
--- a/lib/librte_kvargs/Makefile
+++ b/lib/librte_kvargs/Makefile
@@ -38,6 +38,8 @@ LIB = librte_kvargs.a
CFLAGS += $(WERROR_FLAGS) -I$(SRCDIR) -O3
+EXPORT_MAP := $(RTE_SDK)/lib/librte_kvargs/rte_kvargs_version.map
+
# all source are stored in SRCS-y
SRCS-$(CONFIG_RTE_LIBRTE_KVARGS) := rte_kvargs.c
diff --git a/lib/librte_kvargs/rte_kvargs_version.map b/lib/librte_kvargs/rte_kvargs_version.map
new file mode 100644
index 0000000..7873c8c
--- /dev/null
+++ b/lib/librte_kvargs/rte_kvargs_version.map
@@ -0,0 +1,10 @@
+DPDK_1.8 {
+
+ global:
+ rte_kvargs_parse;
+ rte_kvargs_free;
+ rte_kvargs_process;
+ rte_kvargs_count;
+
+ local: *;
+};
diff --git a/lib/librte_lpm/Makefile b/lib/librte_lpm/Makefile
index fa94163..05de8d9 100644
--- a/lib/librte_lpm/Makefile
+++ b/lib/librte_lpm/Makefile
@@ -37,6 +37,8 @@ LIB = librte_lpm.a
CFLAGS += -O3
CFLAGS += $(WERROR_FLAGS) -I$(SRCDIR)
+EXPORT_MAP := $(RTE_SDK)/lib/librte_lpm/rte_lpm_version.map
+
# all source are stored in SRCS-y
SRCS-$(CONFIG_RTE_LIBRTE_LPM) := rte_lpm.c rte_lpm6.c
diff --git a/lib/librte_lpm/rte_lpm_version.map b/lib/librte_lpm/rte_lpm_version.map
new file mode 100644
index 0000000..8ae9318
--- /dev/null
+++ b/lib/librte_lpm/rte_lpm_version.map
@@ -0,0 +1,24 @@
+DPDK_1.8 {
+ global:
+
+ rte_lpm_create;
+ rte_lpm_find_existing;
+ rte_lpm_free;
+ rte_lpm_add;
+ rte_lpm_is_rule_present;
+ rte_lpm_delete;
+ rte_lpm_delete_all;
+ rte_lpm6_create;
+ rte_lpm6_find_existing;
+ rte_lpm6_free;
+ rte_lpm6_add;
+ rte_lpm6_is_rule_present;
+ rte_lpm6_delete;
+ rte_lpm6_delete_bulk_func;
+ rte_lpm6_delete_all;
+ rte_lpm6_lookup;
+ rte_lpm6_lookup_bulk_func;
+
+ local: *;
+};
+
diff --git a/lib/librte_malloc/Makefile b/lib/librte_malloc/Makefile
index ba87e34..1a5c288 100644
--- a/lib/librte_malloc/Makefile
+++ b/lib/librte_malloc/Makefile
@@ -36,6 +36,8 @@ LIB = librte_malloc.a
CFLAGS += $(WERROR_FLAGS) -I$(SRCDIR) -O3
+EXPORT_MAP := $(RTE_SDK)/lib/librte_malloc/rte_malloc_version.map
+
# all source are stored in SRCS-y
SRCS-$(CONFIG_RTE_LIBRTE_MALLOC) := rte_malloc.c malloc_elem.c malloc_heap.c
diff --git a/lib/librte_malloc/rte_malloc_version.map b/lib/librte_malloc/rte_malloc_version.map
new file mode 100644
index 0000000..77db879
--- /dev/null
+++ b/lib/librte_malloc/rte_malloc_version.map
@@ -0,0 +1,19 @@
+DPDK_1.8 {
+ global:
+
+ rte_malloc;
+ rte_zmalloc;
+ rte_calloc;
+ rte_realloc;
+ rte_malloc_socket;
+ rte_zmalloc_socket;
+ rte_calloc_socket;
+ rte_free;
+ rte_malloc_validate;
+ rte_malloc_get_socket_stats;
+ rte_malloc_dump_stats;
+ rte_malloc_set_limit;
+ rte_malloc_virt2phy;
+
+ local: *;
+};
diff --git a/lib/librte_mbuf/Makefile b/lib/librte_mbuf/Makefile
index 9b45ba4..5cd4941 100644
--- a/lib/librte_mbuf/Makefile
+++ b/lib/librte_mbuf/Makefile
@@ -36,6 +36,8 @@ LIB = librte_mbuf.a
CFLAGS += $(WERROR_FLAGS) -I$(SRCDIR) -O3
+EXPORT_MAP := $(RTE_SDK)/lib/librte_mbuf/rte_mbuf_version.map
+
# all source are stored in SRCS-y
SRCS-$(CONFIG_RTE_LIBRTE_MBUF) := rte_mbuf.c
diff --git a/lib/librte_mbuf/rte_mbuf_version.map b/lib/librte_mbuf/rte_mbuf_version.map
new file mode 100644
index 0000000..55e352b
--- /dev/null
+++ b/lib/librte_mbuf/rte_mbuf_version.map
@@ -0,0 +1,12 @@
+DPDK_1.8 {
+ global:
+
+ rte_mbuf_sanity_check;
+ rte_ctrlmbuf_init;
+ rte_pktmbuf_init;
+ rte_pktmbuf_pool_init;
+ rte_pktmbuf_dump;
+
+ local: *;
+};
+
diff --git a/lib/librte_mempool/Makefile b/lib/librte_mempool/Makefile
index 9939e10..07b5b4e 100644
--- a/lib/librte_mempool/Makefile
+++ b/lib/librte_mempool/Makefile
@@ -36,6 +36,8 @@ LIB = librte_mempool.a
CFLAGS += $(WERROR_FLAGS) -I$(SRCDIR) -O3
+EXPORT_MAP := $(RTE_SDK)/lib/librte_mempool/rte_mempool_version.map
+
# all source are stored in SRCS-y
SRCS-$(CONFIG_RTE_LIBRTE_MEMPOOL) += rte_mempool.c
ifeq ($(CONFIG_RTE_LIBRTE_XEN_DOM0),y)
diff --git a/lib/librte_mempool/rte_mempool_version.map b/lib/librte_mempool/rte_mempool_version.map
new file mode 100644
index 0000000..7a19982
--- /dev/null
+++ b/lib/librte_mempool/rte_mempool_version.map
@@ -0,0 +1,18 @@
+DPDK_1.8 {
+ global:
+
+ rte_mempool_create;
+ rte_mempool_xmem_create;
+ rte_dom0_mempool_create;
+ rte_mempool_dump;
+ rte_mempool_audit;
+ rte_mempool_list_dump;
+ rte_mempool_lookup;
+ rte_mempool_calc_obj_size;
+ rte_mempool_xmem_size;
+ rte_mempool_xmem_usage;
+ rte_mempool_walk;
+ rte_mempool_count;
+
+ local: *;
+};
diff --git a/lib/librte_meter/Makefile b/lib/librte_meter/Makefile
index b25c0cc..0778690 100644
--- a/lib/librte_meter/Makefile
+++ b/lib/librte_meter/Makefile
@@ -39,6 +39,8 @@ LIB = librte_meter.a
CFLAGS += -O3
CFLAGS += $(WERROR_FLAGS)
+EXPORT_MAP := $(RTE_SDK)/lib/librte_meter/rte_meter_version.map
+
#
# all source are stored in SRCS-y
#
diff --git a/lib/librte_meter/rte_meter_version.map b/lib/librte_meter/rte_meter_version.map
new file mode 100644
index 0000000..51a73b1
--- /dev/null
+++ b/lib/librte_meter/rte_meter_version.map
@@ -0,0 +1,13 @@
+DPDK_1.8 {
+ global:
+
+ rte_meter_srtcm_config;
+ rte_meter_trtcm_config;
+ rte_meter_srtcm_color_blind_check;
+ rte_meter_srtcm_color_aware_check;
+ rte_meter_trtcm_color_blind_check;
+ rte_meter_trtcm_color_aware_check;
+
+ local: *;
+};
+
diff --git a/lib/librte_pipeline/Makefile b/lib/librte_pipeline/Makefile
index cf8fde8..5465d00 100644
--- a/lib/librte_pipeline/Makefile
+++ b/lib/librte_pipeline/Makefile
@@ -39,6 +39,8 @@ LIB = librte_pipeline.a
CFLAGS += -O3
CFLAGS += $(WERROR_FLAGS)
+EXPORT_MAP := $(RTE_SDK)/lib/librte_pipeline/rte_pipeline_version.map
+
#
# all source are stored in SRCS-y
#
diff --git a/lib/librte_pipeline/rte_pipeline_version.map b/lib/librte_pipeline/rte_pipeline_version.map
new file mode 100644
index 0000000..f868b96
--- /dev/null
+++ b/lib/librte_pipeline/rte_pipeline_version.map
@@ -0,0 +1,23 @@
+DPDK_1.8 {
+ global:
+
+ rte_pipeline_create;
+ rte_pipeline_free;
+ rte_pipeline_check;
+ rte_pipeline_run;
+ rte_pipeline_flush;
+ rte_pipeline_table_create;
+ rte_pipeline_table_default_entry_add;
+ rte_pipeline_table_default_entry_delete;
+ rte_pipeline_table_entry_add;
+ rte_pipeline_table_entry_delete;
+ rte_pipeline_port_in_create;
+ rte_pipeline_port_in_connect_to_table;
+ rte_pipeline_port_in_enable;
+ rte_pipeline_port_in_disable;
+ rte_pipeline_port_out_create;
+ rte_pipeline_port_out_packet_insert;
+
+ local: *;
+};
+
diff --git a/lib/librte_pmd_bond/Makefile b/lib/librte_pmd_bond/Makefile
index 953d75e..5b14ce2 100644
--- a/lib/librte_pmd_bond/Makefile
+++ b/lib/librte_pmd_bond/Makefile
@@ -39,6 +39,8 @@ LIB = librte_pmd_bond.a
CFLAGS += -O3
CFLAGS += $(WERROR_FLAGS)
+EXPORT_MAP := $(RTE_SDK)/lib/librte_pmd_bond/rte_eth_bond_version.map
+
#
# all source are stored in SRCS-y
#
diff --git a/lib/librte_pmd_bond/rte_eth_bond_version.map b/lib/librte_pmd_bond/rte_eth_bond_version.map
new file mode 100644
index 0000000..17f0a1f
--- /dev/null
+++ b/lib/librte_pmd_bond/rte_eth_bond_version.map
@@ -0,0 +1,20 @@
+DPDK_1.8 {
+ global:
+
+ rte_eth_bond_create;
+ rte_eth_bond_slave_add;
+ rte_eth_bond_slave_remove;
+ rte_eth_bond_mode_set;
+ rte_eth_bond_mode_get;
+ rte_eth_bond_primary_set;
+ rte_eth_bond_primary_get;
+ rte_eth_bond_slaves_get;
+ rte_eth_bond_active_slaves_get;
+ rte_eth_bond_mac_address_set;
+ rte_eth_bond_mac_address_reset;
+ rte_eth_bond_xmit_policy_set;
+ rte_eth_bond_xmit_policy_get;
+
+
+ local: *;
+};
diff --git a/lib/librte_pmd_e1000/Makefile b/lib/librte_pmd_e1000/Makefile
index 14bc4a2..e225bfe 100644
--- a/lib/librte_pmd_e1000/Makefile
+++ b/lib/librte_pmd_e1000/Makefile
@@ -39,6 +39,8 @@ LIB = librte_pmd_e1000.a
CFLAGS += -O3
CFLAGS += $(WERROR_FLAGS)
+EXPORT_MAP := $(RTE_SDK)/lib/librte_pmd_e1000/rte_pmd_e1000_version.map
+
ifeq ($(CC), icc)
#
# CFLAGS for icc
diff --git a/lib/librte_pmd_e1000/rte_pmd_e1000_version.map b/lib/librte_pmd_e1000/rte_pmd_e1000_version.map
new file mode 100644
index 0000000..cbc401f
--- /dev/null
+++ b/lib/librte_pmd_e1000/rte_pmd_e1000_version.map
@@ -0,0 +1,5 @@
+DPDK_1.8 {
+
+ local: *;
+};
+
diff --git a/lib/librte_pmd_i40e/Makefile b/lib/librte_pmd_i40e/Makefile
index 4b31675..cfbe816 100644
--- a/lib/librte_pmd_i40e/Makefile
+++ b/lib/librte_pmd_i40e/Makefile
@@ -39,6 +39,8 @@ LIB = librte_pmd_i40e.a
CFLAGS += -O3
CFLAGS += $(WERROR_FLAGS)
+EXPORT_MAP := $(RTE_SDK)/lib/librte_pmd_i40e/rte_pmd_i40e_version.map
+
#
# Add extra flags for base driver files (also known as shared code)
# to disable warnings
diff --git a/lib/librte_pmd_i40e/rte_pmd_i40e_version.map b/lib/librte_pmd_i40e/rte_pmd_i40e_version.map
new file mode 100644
index 0000000..cbc401f
--- /dev/null
+++ b/lib/librte_pmd_i40e/rte_pmd_i40e_version.map
@@ -0,0 +1,5 @@
+DPDK_1.8 {
+
+ local: *;
+};
+
diff --git a/lib/librte_pmd_ixgbe/Makefile b/lib/librte_pmd_ixgbe/Makefile
index 00ccedb..1dd14a6 100644
--- a/lib/librte_pmd_ixgbe/Makefile
+++ b/lib/librte_pmd_ixgbe/Makefile
@@ -39,6 +39,8 @@ LIB = librte_pmd_ixgbe.a
CFLAGS += -O3
CFLAGS += $(WERROR_FLAGS)
+EXPORT_MAP := $(RTE_SDK)/lib/librte_pmd_ixgbe/rte_pmd_ixgbe_version.map
+
ifeq ($(CC), icc)
#
# CFLAGS for icc
diff --git a/lib/librte_pmd_ixgbe/rte_pmd_ixgbe_version.map b/lib/librte_pmd_ixgbe/rte_pmd_ixgbe_version.map
new file mode 100644
index 0000000..cbc401f
--- /dev/null
+++ b/lib/librte_pmd_ixgbe/rte_pmd_ixgbe_version.map
@@ -0,0 +1,5 @@
+DPDK_1.8 {
+
+ local: *;
+};
+
diff --git a/lib/librte_pmd_pcap/Makefile b/lib/librte_pmd_pcap/Makefile
index c5c214d..fff5572 100644
--- a/lib/librte_pmd_pcap/Makefile
+++ b/lib/librte_pmd_pcap/Makefile
@@ -40,6 +40,8 @@ LIB = librte_pmd_pcap.a
CFLAGS += -O3
CFLAGS += $(WERROR_FLAGS)
+EXPORT_MAP := $(RTE_SDK)/lib/librte_pmd_pcap/rte_pmd_pcap_version.map
+
#
# all source are stored in SRCS-y
#
diff --git a/lib/librte_pmd_pcap/rte_pmd_pcap_version.map b/lib/librte_pmd_pcap/rte_pmd_pcap_version.map
new file mode 100644
index 0000000..cbc401f
--- /dev/null
+++ b/lib/librte_pmd_pcap/rte_pmd_pcap_version.map
@@ -0,0 +1,5 @@
+DPDK_1.8 {
+
+ local: *;
+};
+
diff --git a/lib/librte_pmd_ring/Makefile b/lib/librte_pmd_ring/Makefile
index b57e421..25ad27f 100644
--- a/lib/librte_pmd_ring/Makefile
+++ b/lib/librte_pmd_ring/Makefile
@@ -39,6 +39,8 @@ LIB = librte_pmd_ring.a
CFLAGS += -O3
CFLAGS += $(WERROR_FLAGS)
+EXPORT_MAP := $(RTE_SDK)/lib/librte_pmd_ring/rte_eth_ring_version.map
+
#
# all source are stored in SRCS-y
#
diff --git a/lib/librte_pmd_ring/rte_eth_ring.c b/lib/librte_pmd_ring/rte_eth_ring.c
index 4f1b6ed..df7b583 100644
--- a/lib/librte_pmd_ring/rte_eth_ring.c
+++ b/lib/librte_pmd_ring/rte_eth_ring.c
@@ -473,7 +473,7 @@ out:
return ret;
}
-int
+static int
rte_pmd_ring_devinit(const char *name, const char *params)
{
struct rte_kvargs *kvlist;
diff --git a/lib/librte_pmd_ring/rte_eth_ring.h b/lib/librte_pmd_ring/rte_eth_ring.h
index e6ae19e..d36489a 100644
--- a/lib/librte_pmd_ring/rte_eth_ring.h
+++ b/lib/librte_pmd_ring/rte_eth_ring.h
@@ -50,12 +50,6 @@ int rte_eth_from_rings(const char *name,
int rte_eth_ring_pair_create(const char *name, const unsigned numa_node);
int rte_eth_ring_pair_attach(const char *name, const unsigned numa_node);
-/**
- * For use by test apps only. Called as part of EAL init to set up any dummy NICs
- * configured on command line.
- */
-int rte_pmd_ring_devinit(const char *name, const char *params);
-
#ifdef __cplusplus
}
#endif
diff --git a/lib/librte_pmd_ring/rte_eth_ring_version.map b/lib/librte_pmd_ring/rte_eth_ring_version.map
new file mode 100644
index 0000000..5edaa3d
--- /dev/null
+++ b/lib/librte_pmd_ring/rte_eth_ring_version.map
@@ -0,0 +1,10 @@
+DPDK_1.8 {
+
+ global:
+
+ rte_eth_from_rings;
+ rte_eth_ring_pair_create;
+ rte_eth_ring_pair_attach;
+
+ local: *;
+};
diff --git a/lib/librte_pmd_virtio/Makefile b/lib/librte_pmd_virtio/Makefile
index 456095b..bf51bd9 100644
--- a/lib/librte_pmd_virtio/Makefile
+++ b/lib/librte_pmd_virtio/Makefile
@@ -39,6 +39,7 @@ LIB = librte_pmd_virtio_uio.a
CFLAGS += -O3
CFLAGS += $(WERROR_FLAGS)
+EXPORT_MAP := $(RTE_SDK)/lib/librte_pmd_virtio/rte_pmd_virtio_version.map
#
# all source are stored in SRCS-y
diff --git a/lib/librte_pmd_virtio/rte_pmd_virtio_version.map b/lib/librte_pmd_virtio/rte_pmd_virtio_version.map
new file mode 100644
index 0000000..cbc401f
--- /dev/null
+++ b/lib/librte_pmd_virtio/rte_pmd_virtio_version.map
@@ -0,0 +1,5 @@
+DPDK_1.8 {
+
+ local: *;
+};
+
diff --git a/lib/librte_pmd_vmxnet3/Makefile b/lib/librte_pmd_vmxnet3/Makefile
index 6872c74..e5a1c6b 100644
--- a/lib/librte_pmd_vmxnet3/Makefile
+++ b/lib/librte_pmd_vmxnet3/Makefile
@@ -66,6 +66,8 @@ endif
VPATH += $(RTE_SDK)/lib/librte_pmd_vmxnet3/vmxnet3
+EXPORT_MAP := $(RTE_SDK)/lib/librte_pmd_vmxnet3/rte_pmd_vmxnet3_version.map
+
#
# all source are stored in SRCS-y
#
diff --git a/lib/librte_pmd_vmxnet3/rte_pmd_vmxnet3_version.map b/lib/librte_pmd_vmxnet3/rte_pmd_vmxnet3_version.map
new file mode 100644
index 0000000..cbc401f
--- /dev/null
+++ b/lib/librte_pmd_vmxnet3/rte_pmd_vmxnet3_version.map
@@ -0,0 +1,5 @@
+DPDK_1.8 {
+
+ local: *;
+};
+
diff --git a/lib/librte_pmd_xenvirt/Makefile b/lib/librte_pmd_xenvirt/Makefile
index 01bfcaa..0a08b1b 100644
--- a/lib/librte_pmd_xenvirt/Makefile
+++ b/lib/librte_pmd_xenvirt/Makefile
@@ -39,6 +39,8 @@ LIB = librte_pmd_xenvirt.a
CFLAGS += -O3
CFLAGS += $(WERROR_FLAGS)
+EXPORT_MAP := $(RTE_SDK)/lib/librte_pmd_xenvirt/rte_eth_xenvirt_version.map
+
#
# all source are stored in SRCS-y
#
diff --git a/lib/librte_pmd_xenvirt/rte_eth_xenvirt_version.map b/lib/librte_pmd_xenvirt/rte_eth_xenvirt_version.map
new file mode 100644
index 0000000..66199b1
--- /dev/null
+++ b/lib/librte_pmd_xenvirt/rte_eth_xenvirt_version.map
@@ -0,0 +1,8 @@
+DPDK_1.8 {
+ global:
+
+ rte_mempool_gntalloc_create;
+
+ local: *;
+};
+
diff --git a/lib/librte_port/Makefile b/lib/librte_port/Makefile
index 28793a5..e812bda 100644
--- a/lib/librte_port/Makefile
+++ b/lib/librte_port/Makefile
@@ -39,6 +39,8 @@ LIB = librte_port.a
CFLAGS += -O3
CFLAGS += $(WERROR_FLAGS)
+EXPORT_MAP := $(RTE_SDK)/lib/librte_port/rte_port_version.map
+
#
# all source are stored in SRCS-y
#
diff --git a/lib/librte_port/rte_port_version.map b/lib/librte_port/rte_port_version.map
new file mode 100644
index 0000000..57ccaa3
--- /dev/null
+++ b/lib/librte_port/rte_port_version.map
@@ -0,0 +1,18 @@
+DPDK_1.8 {
+ global:
+ rte_port_ring_reader_ops;
+ rte_port_ring_writer_ops;
+ rte_port_ethdev_reader_ops;
+ rte_port_ethdev_writer_ops;
+ rte_port_ring_reader_ipv4_frag_ops;
+ rte_port_ring_writer_ipv4_ras_ops;
+ rte_port_ring_reader_ops;
+ rte_port_ring_writer_ops;
+ rte_port_sched_reader_ops;
+ rte_port_sched_writer_ops;
+ rte_port_source_ops;
+ rte_port_sink_ops;
+
+ local: *;
+};
+
diff --git a/lib/librte_power/Makefile b/lib/librte_power/Makefile
index 6185812..26ee542 100644
--- a/lib/librte_power/Makefile
+++ b/lib/librte_power/Makefile
@@ -36,6 +36,8 @@ LIB = librte_power.a
CFLAGS += $(WERROR_FLAGS) -I$(SRCDIR) -O3 -fno-strict-aliasing
+EXPORT_MAP := $(RTE_SDK)/lib/librte_power/rte_power_version.map
+
# all source are stored in SRCS-y
SRCS-$(CONFIG_RTE_LIBRTE_POWER) := rte_power.c
diff --git a/lib/librte_power/rte_power_version.map b/lib/librte_power/rte_power_version.map
new file mode 100644
index 0000000..3b2375a
--- /dev/null
+++ b/lib/librte_power/rte_power_version.map
@@ -0,0 +1,14 @@
+DPDK_1.8 {
+ global:
+ rte_power_init;
+ rte_power_exit;
+ rte_power_freqs;
+ rte_power_get_freq;
+ rte_power_set_freq;
+ rte_power_freq_up;
+ rte_power_freq_down;
+ rte_power_freq_max;
+ rte_power_freq_min;
+
+ local: *;
+};
diff --git a/lib/librte_ring/Makefile b/lib/librte_ring/Makefile
index 2380a43..0adaa00 100644
--- a/lib/librte_ring/Makefile
+++ b/lib/librte_ring/Makefile
@@ -36,6 +36,8 @@ LIB = librte_ring.a
CFLAGS += $(WERROR_FLAGS) -I$(SRCDIR) -O3
+EXPORT_MAP := $(RTE_SDK)/lib/librte_ring/rte_ring_version.map
+
# all source are stored in SRCS-y
SRCS-$(CONFIG_RTE_LIBRTE_RING) := rte_ring.c
diff --git a/lib/librte_ring/rte_ring_version.map b/lib/librte_ring/rte_ring_version.map
new file mode 100644
index 0000000..6c28af9
--- /dev/null
+++ b/lib/librte_ring/rte_ring_version.map
@@ -0,0 +1,12 @@
+DPDK_1.8 {
+ global:
+ rte_ring_get_memsize;
+ rte_ring_init;
+ rte_ring_create;
+ rte_ring_set_water_mark;
+ rte_ring_dump;
+ rte_ring_list_dump;
+ rte_ring_lookup;
+
+ local: *;
+};
diff --git a/lib/librte_sched/Makefile b/lib/librte_sched/Makefile
index 1a25b21..205fb7a 100644
--- a/lib/librte_sched/Makefile
+++ b/lib/librte_sched/Makefile
@@ -41,6 +41,8 @@ CFLAGS += $(WERROR_FLAGS)
CFLAGS_rte_red.o := -D_GNU_SOURCE
+EXPORT_MAP := $(RTE_SDK)/lib/librte_sched/rte_sched_version.map
+
#
# all source are stored in SRCS-y
#
diff --git a/lib/librte_sched/rte_sched_version.map b/lib/librte_sched/rte_sched_version.map
new file mode 100644
index 0000000..b5877ce
--- /dev/null
+++ b/lib/librte_sched/rte_sched_version.map
@@ -0,0 +1,22 @@
+DPDK_1.8 {
+ global:
+
+ rte_approx;
+ rte_red_rt_data_init;
+ rte_red_config_init;
+ rte_sched_port_config;
+ rte_sched_port_free;
+ rte_sched_subport_config;
+ rte_sched_pipe_config;
+ rte_sched_port_get_memory_footprint;
+ rte_sched_subport_read_stats;
+ rte_sched_queue_read_stats;
+ rte_sched_port_enqueue;
+ rte_sched_port_dequeue;
+ rte_red_log2_1_minus_Wq;
+ rte_red_pow2_frac_inv;
+ rte_red_rand_val;
+ rte_red_rand_seed;
+
+ local: *;
+};
diff --git a/lib/librte_table/Makefile b/lib/librte_table/Makefile
index dd684cc..5b54acc 100644
--- a/lib/librte_table/Makefile
+++ b/lib/librte_table/Makefile
@@ -39,6 +39,8 @@ LIB = librte_table.a
CFLAGS += -O3
CFLAGS += $(WERROR_FLAGS)
+EXPORT_MAP := $(RTE_SDK)/lib/librte_table/rte_table_version.map
+
#
# all source are stored in SRCS-y
#
diff --git a/lib/librte_table/rte_table_version.map b/lib/librte_table/rte_table_version.map
new file mode 100644
index 0000000..86f16b8
--- /dev/null
+++ b/lib/librte_table/rte_table_version.map
@@ -0,0 +1,22 @@
+DPDK_1.8 {
+ global:
+
+ rte_table_stub_ops;
+ rte_table_lpm_ops;
+ rte_table_array_ops;
+ rte_table_hash_key8_lru_ops;
+ rte_table_hash_key8_lru_dosig_ops;
+ rte_table_hash_key8_ext_ops;
+ rte_table_hash_key8_ext_dosig_ops;
+ rte_table_lpm_ipv6_ops;
+ rte_table_hash_key16_lru_ops;
+ rte_table_hash_key32_lru_ops;
+ rte_table_hash_key16_ext_ops;
+ rte_table_hash_key32_ext_ops;
+ rte_table_acl_ops;
+ rte_table_hash_lru_ops;
+ rte_table_hash_ext_ops;
+
+ local: *;
+};
+
diff --git a/lib/librte_timer/Makefile b/lib/librte_timer/Makefile
index 07eb0c6..f703e5f 100644
--- a/lib/librte_timer/Makefile
+++ b/lib/librte_timer/Makefile
@@ -36,6 +36,8 @@ LIB = librte_timer.a
CFLAGS += $(WERROR_FLAGS) -I$(SRCDIR) -O3
+EXPORT_MAP := $(RTE_SDK)/lib/librte_timer/rte_timer_version.map
+
# all source are stored in SRCS-y
SRCS-$(CONFIG_RTE_LIBRTE_TIMER) := rte_timer.c
diff --git a/lib/librte_timer/rte_timer_version.map b/lib/librte_timer/rte_timer_version.map
new file mode 100644
index 0000000..00b6b52
--- /dev/null
+++ b/lib/librte_timer/rte_timer_version.map
@@ -0,0 +1,16 @@
+DPDK_1.8 {
+ global:
+
+ rte_timer_subsystem_init;
+ rte_timer_init;
+ rte_timer_reset;
+ rte_timer_reset_sync;
+ rte_timer_stop;
+ rte_timer_stop_sync;
+ rte_timer_pending;
+ rte_timer_manage;
+ rte_timer_dump_stats;
+
+ local: *;
+};
+
--
1.9.3
^ permalink raw reply [flat|nested] 43+ messages in thread
* Re: [dpdk-dev] [PATCH 2/4] Provide initial versioning for all DPDK libraries
2014-09-15 19:23 ` [dpdk-dev] [PATCH 2/4] Provide initial versioning for all DPDK libraries Neil Horman
@ 2014-09-19 9:45 ` Bruce Richardson
2014-09-19 10:22 ` Neil Horman
2014-10-01 11:25 ` Sergio Gonzalez Monroy
1 sibling, 1 reply; 43+ messages in thread
From: Bruce Richardson @ 2014-09-19 9:45 UTC (permalink / raw)
To: Neil Horman; +Cc: dev
On Mon, Sep 15, 2014 at 03:23:49PM -0400, Neil Horman wrote:
> Add linker version script files to each DPDK library to put a stake in the
> ground from which we can start cleaning up API's
>
> Signed-off-by: Neil Horman <nhorman@tuxdriver.com>
> CC: Thomas Monjalon <thomas.monjalon@6wind.com>
> CC: "Richardson, Bruce" <bruce.richardson@intel.com>
> ---
> <... snip for brevity ...>
>
> diff --git a/lib/librte_acl/Makefile b/lib/librte_acl/Makefile
> index 65e566d..1f96645 100644
> --- a/lib/librte_acl/Makefile
> +++ b/lib/librte_acl/Makefile
> @@ -37,6 +37,8 @@ LIB = librte_acl.a
> CFLAGS += -O3
> CFLAGS += $(WERROR_FLAGS) -I$(SRCDIR)
>
> +EXPORT_MAP := $(RTE_SDK)/lib/librte_acl/rte_acl_version.map
> +
> # all source are stored in SRCS-y
> SRCS-$(CONFIG_RTE_LIBRTE_ACL) += tb_mem.c
>
> diff --git a/lib/librte_acl/rte_acl_version.map b/lib/librte_acl/rte_acl_version.map
> new file mode 100644
> index 0000000..4480690
> --- /dev/null
> +++ b/lib/librte_acl/rte_acl_version.map
> @@ -0,0 +1,19 @@
> +DPDK_1.8 {
> + global:
> + rte_acl_create;
> + rte_acl_find_existing;
> + rte_acl_free;
> + rte_acl_add_rules;
> + rte_acl_reset_rules;
> + rte_acl_build;
> + rte_acl_reset;
> + rte_acl_classify;
> + rte_acl_dump;
> + rte_acl_list_dump;
> + rte_acl_ipv4vlan_add_rules;
> + rte_acl_ipv4vlan_build;
> + rte_acl_classify_scalar;
> +
> + local: *;
> +};
> +
Looking at this versionning, it strikes me that this looks like the perfect
opportunity to go to a 2.0 version number.
My reasoning:
* We have already got fairly significant ABI and indeed API changes in this
release due to the mbuf rework. That allow makes it a logical point to
bump the Intel DPDK major version number to 2.0
* Having the API versioning start at a 2.0 looks neater than having it at
1.8, since .0 is a nice round version number to start with. Also if we
decide in the near future for whatever reasons to go to a 2.0 release, the
ABIs are probably still going to be 1.8. [Again, if we ever want to go to
2.0, now looks the perfect time]
* For the naming of the .so files, starting with them at a .2 now seems
reasonable to me, denoting a clean break with the older releases which did
have a different ABI. [Though again it makes more sense if you consider
that we may want to move to a 2.0 in future].
What do people think?
/Bruce
^ permalink raw reply [flat|nested] 43+ messages in thread
* Re: [dpdk-dev] [PATCH 2/4] Provide initial versioning for all DPDK libraries
2014-09-19 9:45 ` Bruce Richardson
@ 2014-09-19 10:22 ` Neil Horman
0 siblings, 0 replies; 43+ messages in thread
From: Neil Horman @ 2014-09-19 10:22 UTC (permalink / raw)
To: Bruce Richardson; +Cc: dev
On Fri, Sep 19, 2014 at 10:45:38AM +0100, Bruce Richardson wrote:
> On Mon, Sep 15, 2014 at 03:23:49PM -0400, Neil Horman wrote:
> > Add linker version script files to each DPDK library to put a stake in the
> > ground from which we can start cleaning up API's
> >
> > Signed-off-by: Neil Horman <nhorman@tuxdriver.com>
> > CC: Thomas Monjalon <thomas.monjalon@6wind.com>
> > CC: "Richardson, Bruce" <bruce.richardson@intel.com>
> > ---
> > <... snip for brevity ...>
> >
> > diff --git a/lib/librte_acl/Makefile b/lib/librte_acl/Makefile
> > index 65e566d..1f96645 100644
> > --- a/lib/librte_acl/Makefile
> > +++ b/lib/librte_acl/Makefile
> > @@ -37,6 +37,8 @@ LIB = librte_acl.a
> > CFLAGS += -O3
> > CFLAGS += $(WERROR_FLAGS) -I$(SRCDIR)
> >
> > +EXPORT_MAP := $(RTE_SDK)/lib/librte_acl/rte_acl_version.map
> > +
> > # all source are stored in SRCS-y
> > SRCS-$(CONFIG_RTE_LIBRTE_ACL) += tb_mem.c
> >
> > diff --git a/lib/librte_acl/rte_acl_version.map b/lib/librte_acl/rte_acl_version.map
> > new file mode 100644
> > index 0000000..4480690
> > --- /dev/null
> > +++ b/lib/librte_acl/rte_acl_version.map
> > @@ -0,0 +1,19 @@
> > +DPDK_1.8 {
> > + global:
> > + rte_acl_create;
> > + rte_acl_find_existing;
> > + rte_acl_free;
> > + rte_acl_add_rules;
> > + rte_acl_reset_rules;
> > + rte_acl_build;
> > + rte_acl_reset;
> > + rte_acl_classify;
> > + rte_acl_dump;
> > + rte_acl_list_dump;
> > + rte_acl_ipv4vlan_add_rules;
> > + rte_acl_ipv4vlan_build;
> > + rte_acl_classify_scalar;
> > +
> > + local: *;
> > +};
> > +
>
> Looking at this versionning, it strikes me that this looks like the perfect
> opportunity to go to a 2.0 version number.
>
> My reasoning:
> * We have already got fairly significant ABI and indeed API changes in this
> release due to the mbuf rework. That allow makes it a logical point to
> bump the Intel DPDK major version number to 2.0
> * Having the API versioning start at a 2.0 looks neater than having it at
> 1.8, since .0 is a nice round version number to start with. Also if we
> decide in the near future for whatever reasons to go to a 2.0 release, the
> ABIs are probably still going to be 1.8. [Again, if we ever want to go to
> 2.0, now looks the perfect time]
> * For the naming of the .so files, starting with them at a .2 now seems
> reasonable to me, denoting a clean break with the older releases which did
> have a different ABI. [Though again it makes more sense if you consider
> that we may want to move to a 2.0 in future].
>
> What do people think?
>
I'm fine with it. Just so that we're clear, this patch treats versions like
arbitrary strings (the file structure denotes version ordinality), so 1.8 vs 2.0
makes absolutely no difference as far as it goes, the exported version value is
a matter of policy, but I'm fine with making that adjustment
Neil
> /Bruce
>
^ permalink raw reply [flat|nested] 43+ messages in thread
* Re: [dpdk-dev] [PATCH 2/4] Provide initial versioning for all DPDK libraries
2014-09-15 19:23 ` [dpdk-dev] [PATCH 2/4] Provide initial versioning for all DPDK libraries Neil Horman
2014-09-19 9:45 ` Bruce Richardson
@ 2014-10-01 11:25 ` Sergio Gonzalez Monroy
2014-10-01 14:43 ` Neil Horman
1 sibling, 1 reply; 43+ messages in thread
From: Sergio Gonzalez Monroy @ 2014-10-01 11:25 UTC (permalink / raw)
To: Neil Horman; +Cc: dev
On Mon, Sep 15, 2014 at 03:23:49PM -0400, Neil Horman wrote:
> Add linker version script files to each DPDK library to put a stake in the
> ground from which we can start cleaning up API's
>
> Signed-off-by: Neil Horman <nhorman@tuxdriver.com>
> CC: Thomas Monjalon <thomas.monjalon@6wind.com>
> CC: "Richardson, Bruce" <bruce.richardson@intel.com>
> ---
> lib/librte_acl/Makefile | 2 +
> lib/librte_acl/rte_acl_version.map | 19 ++++
> lib/librte_cfgfile/Makefile | 2 +
> lib/librte_cfgfile/rte_cfgfile_version.map | 14 +++
> lib/librte_cmdline/Makefile | 2 +
> lib/librte_cmdline/rte_cmdline_version.map | 69 +++++++++++++
> lib/librte_distributor/Makefile | 2 +
> lib/librte_distributor/rte_distributor_version.map | 16 +++
> lib/librte_eal/bsdapp/eal/Makefile | 2 +
> lib/librte_eal/bsdapp/eal/rte_eal_version.map | 89 +++++++++++++++++
> lib/librte_eal/linuxapp/eal/Makefile | 2 +
> lib/librte_eal/linuxapp/eal/rte_eal_version.map | 89 +++++++++++++++++
> lib/librte_ether/Makefile | 2 +
> lib/librte_ether/rte_ether_version.map | 108 +++++++++++++++++++++
> lib/librte_hash/Makefile | 2 +
> lib/librte_hash/rte_hash_version.map | 18 ++++
> lib/librte_ip_frag/Makefile | 2 +
> lib/librte_ip_frag/rte_ipfrag_version.map | 14 +++
> lib/librte_ivshmem/Makefile | 2 +
> lib/librte_ivshmem/rte_ivshmem_version.map | 13 +++
> lib/librte_kni/Makefile | 2 +
> lib/librte_kni/rte_kni_version.map | 19 ++++
> lib/librte_kvargs/Makefile | 2 +
> lib/librte_kvargs/rte_kvargs_version.map | 10 ++
> lib/librte_lpm/Makefile | 2 +
> lib/librte_lpm/rte_lpm_version.map | 24 +++++
> lib/librte_malloc/Makefile | 2 +
> lib/librte_malloc/rte_malloc_version.map | 19 ++++
> lib/librte_mbuf/Makefile | 2 +
> lib/librte_mbuf/rte_mbuf_version.map | 12 +++
> lib/librte_mempool/Makefile | 2 +
> lib/librte_mempool/rte_mempool_version.map | 18 ++++
> lib/librte_meter/Makefile | 2 +
> lib/librte_meter/rte_meter_version.map | 13 +++
> lib/librte_pipeline/Makefile | 2 +
> lib/librte_pipeline/rte_pipeline_version.map | 23 +++++
> lib/librte_pmd_bond/Makefile | 2 +
> lib/librte_pmd_bond/rte_eth_bond_version.map | 20 ++++
> lib/librte_pmd_e1000/Makefile | 2 +
> lib/librte_pmd_e1000/rte_pmd_e1000_version.map | 5 +
> lib/librte_pmd_i40e/Makefile | 2 +
> lib/librte_pmd_i40e/rte_pmd_i40e_version.map | 5 +
> lib/librte_pmd_ixgbe/Makefile | 2 +
> lib/librte_pmd_ixgbe/rte_pmd_ixgbe_version.map | 5 +
> lib/librte_pmd_pcap/Makefile | 2 +
> lib/librte_pmd_pcap/rte_pmd_pcap_version.map | 5 +
> lib/librte_pmd_ring/Makefile | 2 +
> lib/librte_pmd_ring/rte_eth_ring.c | 2 +-
> lib/librte_pmd_ring/rte_eth_ring.h | 6 --
> lib/librte_pmd_ring/rte_eth_ring_version.map | 10 ++
> lib/librte_pmd_virtio/Makefile | 1 +
> lib/librte_pmd_virtio/rte_pmd_virtio_version.map | 5 +
> lib/librte_pmd_vmxnet3/Makefile | 2 +
> lib/librte_pmd_vmxnet3/rte_pmd_vmxnet3_version.map | 5 +
> lib/librte_pmd_xenvirt/Makefile | 2 +
> lib/librte_pmd_xenvirt/rte_eth_xenvirt_version.map | 8 ++
> lib/librte_port/Makefile | 2 +
> lib/librte_port/rte_port_version.map | 18 ++++
> lib/librte_power/Makefile | 2 +
> lib/librte_power/rte_power_version.map | 14 +++
> lib/librte_ring/Makefile | 2 +
> lib/librte_ring/rte_ring_version.map | 12 +++
> lib/librte_sched/Makefile | 2 +
> lib/librte_sched/rte_sched_version.map | 22 +++++
> lib/librte_table/Makefile | 2 +
> lib/librte_table/rte_table_version.map | 22 +++++
> lib/librte_timer/Makefile | 2 +
> lib/librte_timer/rte_timer_version.map | 16 +++
> 68 files changed, 825 insertions(+), 7 deletions(-)
> create mode 100644 lib/librte_acl/rte_acl_version.map
> create mode 100644 lib/librte_cfgfile/rte_cfgfile_version.map
> create mode 100644 lib/librte_cmdline/rte_cmdline_version.map
> create mode 100644 lib/librte_distributor/rte_distributor_version.map
> create mode 100644 lib/librte_eal/bsdapp/eal/rte_eal_version.map
> create mode 100644 lib/librte_eal/linuxapp/eal/rte_eal_version.map
> create mode 100644 lib/librte_ether/rte_ether_version.map
> create mode 100644 lib/librte_hash/rte_hash_version.map
> create mode 100644 lib/librte_ip_frag/rte_ipfrag_version.map
> create mode 100644 lib/librte_ivshmem/rte_ivshmem_version.map
> create mode 100644 lib/librte_kni/rte_kni_version.map
> create mode 100644 lib/librte_kvargs/rte_kvargs_version.map
> create mode 100644 lib/librte_lpm/rte_lpm_version.map
> create mode 100644 lib/librte_malloc/rte_malloc_version.map
> create mode 100644 lib/librte_mbuf/rte_mbuf_version.map
> create mode 100644 lib/librte_mempool/rte_mempool_version.map
> create mode 100644 lib/librte_meter/rte_meter_version.map
> create mode 100644 lib/librte_pipeline/rte_pipeline_version.map
> create mode 100644 lib/librte_pmd_bond/rte_eth_bond_version.map
> create mode 100644 lib/librte_pmd_e1000/rte_pmd_e1000_version.map
> create mode 100644 lib/librte_pmd_i40e/rte_pmd_i40e_version.map
> create mode 100644 lib/librte_pmd_ixgbe/rte_pmd_ixgbe_version.map
> create mode 100644 lib/librte_pmd_pcap/rte_pmd_pcap_version.map
> create mode 100644 lib/librte_pmd_ring/rte_eth_ring_version.map
> create mode 100644 lib/librte_pmd_virtio/rte_pmd_virtio_version.map
> create mode 100644 lib/librte_pmd_vmxnet3/rte_pmd_vmxnet3_version.map
> create mode 100644 lib/librte_pmd_xenvirt/rte_eth_xenvirt_version.map
> create mode 100644 lib/librte_port/rte_port_version.map
> create mode 100644 lib/librte_power/rte_power_version.map
> create mode 100644 lib/librte_ring/rte_ring_version.map
> create mode 100644 lib/librte_sched/rte_sched_version.map
> create mode 100644 lib/librte_table/rte_table_version.map
> create mode 100644 lib/librte_timer/rte_timer_version.map
>
> diff --git a/lib/librte_acl/Makefile b/lib/librte_acl/Makefile
> index 65e566d..1f96645 100644
> --- a/lib/librte_acl/Makefile
> +++ b/lib/librte_acl/Makefile
> @@ -37,6 +37,8 @@ LIB = librte_acl.a
> CFLAGS += -O3
> CFLAGS += $(WERROR_FLAGS) -I$(SRCDIR)
>
> +EXPORT_MAP := $(RTE_SDK)/lib/librte_acl/rte_acl_version.map
> +
> # all source are stored in SRCS-y
> SRCS-$(CONFIG_RTE_LIBRTE_ACL) += tb_mem.c
>
> diff --git a/lib/librte_acl/rte_acl_version.map b/lib/librte_acl/rte_acl_version.map
> new file mode 100644
> index 0000000..4480690
> --- /dev/null
> +++ b/lib/librte_acl/rte_acl_version.map
> @@ -0,0 +1,19 @@
> +DPDK_1.8 {
> + global:
> + rte_acl_create;
> + rte_acl_find_existing;
> + rte_acl_free;
> + rte_acl_add_rules;
> + rte_acl_reset_rules;
> + rte_acl_build;
> + rte_acl_reset;
> + rte_acl_classify;
> + rte_acl_dump;
> + rte_acl_list_dump;
> + rte_acl_ipv4vlan_add_rules;
> + rte_acl_ipv4vlan_build;
> + rte_acl_classify_scalar;
> +
> + local: *;
> +};
> +
> diff --git a/lib/librte_cfgfile/Makefile b/lib/librte_cfgfile/Makefile
> index 55e8701..e655098 100644
> --- a/lib/librte_cfgfile/Makefile
> +++ b/lib/librte_cfgfile/Makefile
> @@ -39,6 +39,8 @@ LIB = librte_cfgfile.a
> CFLAGS += -O3
> CFLAGS += $(WERROR_FLAGS)
>
> +EXPORT_MAP := $(RTE_SDK)/lib/librte_cfgfile/rte_cfgfile_version.map
> +
> #
> # all source are stored in SRCS-y
> #
> diff --git a/lib/librte_cfgfile/rte_cfgfile_version.map b/lib/librte_cfgfile/rte_cfgfile_version.map
> new file mode 100644
> index 0000000..10ecea6
> --- /dev/null
> +++ b/lib/librte_cfgfile/rte_cfgfile_version.map
> @@ -0,0 +1,14 @@
> +DPDK_1.8 {
> + global:
> + rte_cfgfile_load;
> + rte_cfgfile_num_sections;
> + rte_cfgfile_sections;
> + rte_cfgfile_has_section;
> + rte_cfgfile_section_num_entries;
> + rte_cfgfile_section_entries;
> + rte_cfgfile_get_entry;
> + rte_cfgfile_has_entry;
> + rte_cfgfile_close;
> +
> + local: *;
> +};
> diff --git a/lib/librte_cmdline/Makefile b/lib/librte_cmdline/Makefile
> index 7eae449..1a47173 100644
> --- a/lib/librte_cmdline/Makefile
> +++ b/lib/librte_cmdline/Makefile
> @@ -36,6 +36,8 @@ LIB = librte_cmdline.a
>
> CFLAGS += $(WERROR_FLAGS) -I$(SRCDIR) -O3
>
> +EXPORT_MAP := $(RTE_SDK)/lib/librte_cmdline/rte_cmdline_version.map
> +
> # all source are stored in SRCS-y
> SRCS-$(CONFIG_RTE_LIBRTE_CMDLINE) := cmdline.c
> SRCS-$(CONFIG_RTE_LIBRTE_CMDLINE) += cmdline_cirbuf.c
> diff --git a/lib/librte_cmdline/rte_cmdline_version.map b/lib/librte_cmdline/rte_cmdline_version.map
> new file mode 100644
> index 0000000..7616eff
> --- /dev/null
> +++ b/lib/librte_cmdline/rte_cmdline_version.map
> @@ -0,0 +1,69 @@
> +DPDK_1.8 {
> + global:
> + cmdline_new;
> + cmdline_set_prompt;
> + cmdline_free;
> + cmdline_printf;
> + cmdline_in;
> + cmdline_write_char;
> + cmdline_interact;
> + cmdline_quit;
> + cmdline_parse;
> + cmdline_complete;
> + cmdline_isendoftoken;
> + cmdline_parse_num;
> + cmdline_get_help_num;
> + cmdline_parse_ipaddr;
> + cmdline_get_help_ipaddr;
> + cmdline_parse_etheraddr;
> + cmdline_get_help_etheraddr;
> + cmdline_parse_string;
> + cmdline_complete_get_nb_string;
> + cmdline_complete_get_elt_string;
> + cmdline_get_help_string;
> + cmdline_parse_portlist;
> + cmdline_get_help_portlist;
> + cmdline_token_string_ops;
> + cmdline_token_num_ops;
> + cmdline_token_string_ops;
> + cmdline_token_ipaddr_ops;
> + cmdline_token_etheraddr_ops;
> + vt100_init;
> + vt100_parser;
> + cmdline_file_new;
> + cmdline_stdin_new;
> + cmdline_stdin_exit;
> + cirbuf_init;
> + cirbuf_add_head_safe;
> + cirbuf_add_head;
> + cirbuf_add_tail_safe;
> + cirbuf_add_tail;
> + cirbuf_del_head_safe;
> + cirbuf_del_head;
> + cirbuf_del_tail_safe;
> + cirbuf_del_tail;
> + cirbuf_get_head;
> + cirbuf_get_tail;
> + cirbuf_add_buf_head;
> + cirbuf_add_buf_tail;
> + cirbuf_del_buf_head;
> + cirbuf_del_buf_tail;
> + cirbuf_get_buf_head;
> + cirbuf_get_buf_tail;
> + cirbuf_align_left;
> + cirbuf_align_right;
> + rdline_init;
> + rdline_newline;
> + rdline_stop;
> + rdline_quit;
> + rdline_restart;
> + rdline_redisplay;
> + rdline_reset;
> + rdline_char_in;
> + rdline_get_buffer;
> + rdline_add_history;
> + rdline_clear_history;
> + rdline_get_history_item;
> +
> + local: *;
> +};
> diff --git a/lib/librte_distributor/Makefile b/lib/librte_distributor/Makefile
> index 36699f8..97d8bbb 100644
> --- a/lib/librte_distributor/Makefile
> +++ b/lib/librte_distributor/Makefile
> @@ -37,6 +37,8 @@ LIB = librte_distributor.a
> CFLAGS += -O3
> CFLAGS += $(WERROR_FLAGS) -I$(SRCDIR)
>
> +EXPORT_MAP := $(RTE_SDK)/lib/librte_distributor/rte_distributor_version.map
> +
> # all source are stored in SRCS-y
> SRCS-$(CONFIG_RTE_LIBRTE_DISTRIBUTOR) := rte_distributor.c
>
> diff --git a/lib/librte_distributor/rte_distributor_version.map b/lib/librte_distributor/rte_distributor_version.map
> new file mode 100644
> index 0000000..b81ddc8
> --- /dev/null
> +++ b/lib/librte_distributor/rte_distributor_version.map
> @@ -0,0 +1,16 @@
> +DPDK_1.8 {
> +
> + global:
> + rte_distributor_create;
> + rte_distributor_process;
> + rte_distributor_returned_pkts;
> + rte_distributor_flush;
> + rte_distributor_clear_returns;
> + rte_distributor_get_pkt;
> + rte_distributor_return_pkt;
> + rte_distributor_request_pkt;
> + rte_distributor_poll_pkt;
> +
> + local: *;
> +};
> +
> diff --git a/lib/librte_eal/bsdapp/eal/Makefile b/lib/librte_eal/bsdapp/eal/Makefile
> index 8f44273..2caaf00 100644
> --- a/lib/librte_eal/bsdapp/eal/Makefile
> +++ b/lib/librte_eal/bsdapp/eal/Makefile
> @@ -45,6 +45,8 @@ CFLAGS += -I$(RTE_SDK)/lib/librte_pmd_ring
> CFLAGS += -I$(RTE_SDK)/lib/librte_pmd_pcap
> CFLAGS += $(WERROR_FLAGS) -O3
>
> +EXPORT_MAP := $(RTE_SDK)/lib/librte_eal/bsdapp/eal/rte_eal_version.map
> +
> # specific to linuxapp exec-env
> SRCS-$(CONFIG_RTE_LIBRTE_EAL_BSDAPP) := eal.c
> SRCS-$(CONFIG_RTE_LIBRTE_EAL_BSDAPP) += eal_memory.c
> diff --git a/lib/librte_eal/bsdapp/eal/rte_eal_version.map b/lib/librte_eal/bsdapp/eal/rte_eal_version.map
> new file mode 100644
> index 0000000..71788e1
> --- /dev/null
> +++ b/lib/librte_eal/bsdapp/eal/rte_eal_version.map
> @@ -0,0 +1,89 @@
> +DPDK_1.8 {
> + global:
> + rte_eal_alarm_set;
> + rte_eal_alarm_cancel;
> + rte_exit;
> + rte_cpu_get_flag_enabled;
> + rte_cpu_check_supported;
> + rte_get_tsc_hz;
> + rte_get_hpet_cycles;
> + rte_get_hpet_hz;
> + rte_eal_hpet_init;
> + rte_delay_us;
> + rte_dump_stack;
> + rte_dump_registers;
> + __rte_panic;
> + rte_eal_devargs_add;
> + rte_eal_devargs_type_count;
> + rte_eal_devargs_dump;
> + rte_eal_driver_register;
> + rte_eal_driver_unregister;
> + rte_eal_dev_init;
> + rte_eal_init;
> + rte_set_application_usage_hook;
> + rte_eal_has_hugepages;
> + rte_strerror;
> + rte_hexdump;
> + rte_memdump;
> + rte_intr_callback_register;
> + rte_intr_callback_unregister;
> + rte_intr_enable;
> + rte_intr_disable;
> + rte_eal_remote_launch;
> + rte_eal_mp_remote_launch;
> + rte_eal_get_lcore_state;
> + rte_eal_wait_lcore;
> + rte_eal_mp_wait_lcore;
> + rte_openlog_stream;
> + rte_set_log_level;
> + rte_set_log_type;
> + rte_log_cur_msg_loglevel;
> + rte_log_cur_msg_logtype;
> + rte_log_set_history;
> + rte_log_dump_history;
> + rte_log_add_in_history;
> + rte_log;
> + rte_vlog;
> + rte_mem_lock_page;
> + rte_mem_virt2phy;
> + rte_eal_get_physmem_layout;
> + rte_dump_physmem_layout;
> + rte_eal_get_physmem_size;
> + rte_memory_get_nchannel;
> + rte_memory_get_nrank;
> + rte_mem_phy2mch;
> + rte_xen_dom0_memory_init;
> + rte_xen_dom0_memory_attach;
> + rte_memzone_reserve;
> + rte_memzone_reserve_aligned;
> + rte_memzone_reserve_bounded;
> + rte_memzone_lookup;
> + rte_memzone_dump;
> + rte_memzone_walk;
> + rte_eal_pci_probe;
> + rte_eal_pci_dump;
> + rte_eal_pci_register;
> + rte_eal_pci_unregister;
> + rte_snprintf;
> + rte_strsplit;
> + rte_eal_tailq_reserve;
> + rte_eal_tailq_reserve_by_idx;
> + rte_dump_tailq;
> + rte_eal_tailq_lookup;
> + rte_eal_tailq_lookup_by_idx;
> + lcore_config;
> + per_lcore__lcore_id;
> + eal_timer_source;
> + rte_cycles_vmware_tsc_map;
> + rte_eal_get_configuration;
> + rte_logs;
> + rte_eal_lcore_role;
> + test_mp_secondary;
> + rte_eal_process_type;
> + per_lcore__rte_errno;
> + pci_device_list;
> + devargs_list;
> + eal_parse_sysfs_value;
> +
> + local: *;
> +};
> diff --git a/lib/librte_eal/linuxapp/eal/Makefile b/lib/librte_eal/linuxapp/eal/Makefile
> index 756d6b0..254d59c 100644
> --- a/lib/librte_eal/linuxapp/eal/Makefile
> +++ b/lib/librte_eal/linuxapp/eal/Makefile
> @@ -33,6 +33,8 @@ include $(RTE_SDK)/mk/rte.vars.mk
>
> LIB = librte_eal.a
>
> +EXPORT_MAP := $(RTE_SDK)/lib/librte_eal/linuxapp/eal/rte_eal_version.map
> +
> VPATH += $(RTE_SDK)/lib/librte_eal/common
>
> CFLAGS += -I$(SRCDIR)/include
> diff --git a/lib/librte_eal/linuxapp/eal/rte_eal_version.map b/lib/librte_eal/linuxapp/eal/rte_eal_version.map
> new file mode 100644
> index 0000000..71788e1
> --- /dev/null
> +++ b/lib/librte_eal/linuxapp/eal/rte_eal_version.map
> @@ -0,0 +1,89 @@
> +DPDK_1.8 {
> + global:
> + rte_eal_alarm_set;
> + rte_eal_alarm_cancel;
> + rte_exit;
> + rte_cpu_get_flag_enabled;
> + rte_cpu_check_supported;
> + rte_get_tsc_hz;
> + rte_get_hpet_cycles;
> + rte_get_hpet_hz;
> + rte_eal_hpet_init;
> + rte_delay_us;
> + rte_dump_stack;
> + rte_dump_registers;
> + __rte_panic;
> + rte_eal_devargs_add;
> + rte_eal_devargs_type_count;
> + rte_eal_devargs_dump;
> + rte_eal_driver_register;
> + rte_eal_driver_unregister;
> + rte_eal_dev_init;
> + rte_eal_init;
> + rte_set_application_usage_hook;
> + rte_eal_has_hugepages;
> + rte_strerror;
> + rte_hexdump;
> + rte_memdump;
> + rte_intr_callback_register;
> + rte_intr_callback_unregister;
> + rte_intr_enable;
> + rte_intr_disable;
> + rte_eal_remote_launch;
> + rte_eal_mp_remote_launch;
> + rte_eal_get_lcore_state;
> + rte_eal_wait_lcore;
> + rte_eal_mp_wait_lcore;
> + rte_openlog_stream;
> + rte_set_log_level;
> + rte_set_log_type;
> + rte_log_cur_msg_loglevel;
> + rte_log_cur_msg_logtype;
> + rte_log_set_history;
> + rte_log_dump_history;
> + rte_log_add_in_history;
> + rte_log;
> + rte_vlog;
> + rte_mem_lock_page;
> + rte_mem_virt2phy;
> + rte_eal_get_physmem_layout;
> + rte_dump_physmem_layout;
> + rte_eal_get_physmem_size;
> + rte_memory_get_nchannel;
> + rte_memory_get_nrank;
> + rte_mem_phy2mch;
> + rte_xen_dom0_memory_init;
> + rte_xen_dom0_memory_attach;
> + rte_memzone_reserve;
> + rte_memzone_reserve_aligned;
> + rte_memzone_reserve_bounded;
> + rte_memzone_lookup;
> + rte_memzone_dump;
> + rte_memzone_walk;
> + rte_eal_pci_probe;
> + rte_eal_pci_dump;
> + rte_eal_pci_register;
> + rte_eal_pci_unregister;
> + rte_snprintf;
> + rte_strsplit;
> + rte_eal_tailq_reserve;
> + rte_eal_tailq_reserve_by_idx;
> + rte_dump_tailq;
> + rte_eal_tailq_lookup;
> + rte_eal_tailq_lookup_by_idx;
> + lcore_config;
> + per_lcore__lcore_id;
> + eal_timer_source;
> + rte_cycles_vmware_tsc_map;
> + rte_eal_get_configuration;
> + rte_logs;
> + rte_eal_lcore_role;
> + test_mp_secondary;
> + rte_eal_process_type;
> + per_lcore__rte_errno;
> + pci_device_list;
> + devargs_list;
> + eal_parse_sysfs_value;
> +
> + local: *;
> +};
> diff --git a/lib/librte_ether/Makefile b/lib/librte_ether/Makefile
> index b310f8b..f40b5cc 100644
> --- a/lib/librte_ether/Makefile
> +++ b/lib/librte_ether/Makefile
> @@ -39,6 +39,8 @@ LIB = libethdev.a
> CFLAGS += -O3
> CFLAGS += $(WERROR_FLAGS)
>
> +EXPORT_MAP := $(RTE_SDK)/lib/librte_ether/rte_ether_version.map
> +
> SRCS-y += rte_ethdev.c
>
> #
> diff --git a/lib/librte_ether/rte_ether_version.map b/lib/librte_ether/rte_ether_version.map
> new file mode 100644
> index 0000000..41952ab
> --- /dev/null
> +++ b/lib/librte_ether/rte_ether_version.map
> @@ -0,0 +1,108 @@
> +DPDK_1.8 {
> + global:
> + rte_eth_driver_register;
> + rte_eth_dev_configure;
> + rte_eth_rx_queue_setup;
> + rte_eth_tx_queue_setup;
> + rte_eth_dev_socket_id;
> + rte_eth_dev_rx_queue_start;
> + rte_eth_dev_rx_queue_stop;
> + rte_eth_dev_tx_queue_start;
> + rte_eth_dev_tx_queue_stop;
> + rte_eth_dev_start;
> + rte_eth_dev_stop;
> + rte_eth_dev_set_link_up;
> + rte_eth_dev_set_link_down;
> + rte_eth_dev_close;
> + rte_eth_promiscuous_enable;
> + rte_eth_promiscuous_disable;
> + rte_eth_promiscuous_get;
> + rte_eth_allmulticast_enable;
> + rte_eth_allmulticast_disable;
> + rte_eth_allmulticast_get;
> + rte_eth_link;
> + rte_eth_link_get_nowait;
> + rte_eth_stats;
> + rte_eth_stats_reset;
> + rte_eth_dev_set_tx_queue_stats_mapping;
> + rte_eth_dev_set_rx_queue_stats_mapping;
> + rte_eth_macaddr_get;
> + rte_eth_dev_info_get;
> + rte_eth_dev_get_mtu;
> + rte_eth_dev_set_mtu;
> + rte_eth_dev_vlan_filter;
> + rte_eth_dev_set_vlan_strip_on_queue;
> + rte_eth_dev_set_vlan_ether_type;
> + rte_eth_dev_set_vlan_offload;
> + rte_eth_dev_get_vlan_offload;
> + rte_eth_dev_set_vlan_pvid;
> + rte_eth_rx_burst;
> + rte_eth_rx_queue_count;
> + rte_eth_rx_descriptor_done;
> + rte_eth_tx_burst;
> + rte_eth_dev_fdir_add_signature_filter;
> + rte_eth_dev_fdir_update_signature_filter;
> + rte_eth_dev_fdir_remove_signature_filter;
> + rte_eth_dev_fdir_get_infos;
> + rte_eth_dev_fdir_add_perfect_filter;
> + rte_eth_dev_fdir_update_perfect_filter;
> + rte_eth_dev_fdir_remove_perfect_filter;
> + rte_eth_dev_fdir_set_masks;
> + rte_eth_dev_callback_register;
> + rte_eth_dev_callback_unregister;
> + rte_eth_dev_callback_process;
> + rte_eth_led_on;
> + rte_eth_led_off;
> + rte_eth_dev_flow_ctrl_get;
> + rte_eth_dev_flow_ctrl_set;
> + rte_eth_dev_priority_flow_ctrl_set;
> + rte_eth_dev_mac_addr_add;
> + rte_eth_dev_mac_addr_remove;
> + rte_eth_dev_rss_reta_update;
> + rte_eth_dev_rss_reta_query;
> + rte_eth_dev_uc_hash_table_set;
> + rte_eth_dev_uc_all_hash_table_set;
> + rte_eth_dev_set_vf_rxmode;
> + rte_eth_dev_set_vf_tx;
> + rte_eth_dev_set_vf_rx;
> + rte_eth_dev_set_vf_vlan_filter;
> + rte_eth_mirror_rule_set;
> + rte_eth_mirror_rule_reset;
> + rte_eth_set_queue_rate_limit;
> + rte_eth_set_vf_rate_limit;
> + rte_eth_dev_bypass_init;
> + rte_eth_dev_bypass_state_show;
> + rte_eth_dev_bypass_state_set;
> + rte_eth_dev_bypass_event_show;
> + rte_eth_dev_bypass_event_store;
> + rte_eth_dev_wd_timeout_store;
> + rte_eth_dev_bypass_ver_show;
> + rte_eth_dev_bypass_wd_timeout_show;
> + rte_eth_dev_bypass_wd_reset;
> + rte_eth_dev_rss_hash_update;
> + rte_eth_dev_rss_hash_conf_get;
> + rte_eth_dev_add_syn_filter;
> + rte_eth_dev_remove_syn_filter;
> + rte_eth_dev_get_syn_filter;
> + rte_eth_dev_add_ethertype_filter;
> + rte_eth_dev_remove_ethertype_filter;
> + rte_eth_dev_get_ethertype_filter;
> + rte_eth_dev_add_2tuple_filter;
> + rte_eth_dev_remove_2tuple_filter;
> + rte_eth_dev_get_2tuple_filter;
> + rte_eth_dev_add_5tuple_filter;
> + rte_eth_dev_remove_5tuple_filter;
> + rte_eth_dev_get_5tuple_filter;
> + rte_eth_dev_add_flex_filter;
> + rte_eth_dev_remove_flex_filter;
> + rte_eth_dev_get_flex_filter;
> + rte_eth_dev_count;
> + rte_eth_link_get;
> + rte_eth_devices;
> + rte_eth_stats_get;
> + rte_eth_dev_allocate;
> + _rte_eth_dev_callback_process;
> +
> + local: *;
> +};
> +
> diff --git a/lib/librte_hash/Makefile b/lib/librte_hash/Makefile
> index 95e4c09..a449ec2 100644
> --- a/lib/librte_hash/Makefile
> +++ b/lib/librte_hash/Makefile
> @@ -37,6 +37,8 @@ LIB = librte_hash.a
> CFLAGS += -O3
> CFLAGS += $(WERROR_FLAGS) -I$(SRCDIR)
>
> +EXPORT_MAP := $(RTE_SDK)/lib/librte_hash/rte_hash_version.map
> +
> # all source are stored in SRCS-y
> SRCS-$(CONFIG_RTE_LIBRTE_HASH) := rte_hash.c
> SRCS-$(CONFIG_RTE_LIBRTE_HASH) += rte_fbk_hash.c
> diff --git a/lib/librte_hash/rte_hash_version.map b/lib/librte_hash/rte_hash_version.map
> new file mode 100644
> index 0000000..2a34313
> --- /dev/null
> +++ b/lib/librte_hash/rte_hash_version.map
> @@ -0,0 +1,18 @@
> +DPDK_1.8 {
> + global:
> + rte_fbk_hash_find_existing;
> + rte_fbk_hash_create;
> + rte_fbk_hash_free;
> + rte_hash_create;
> + rte_hash_find_existing;
> + rte_hash_free;
> + rte_hash_add_key;
> + rte_hash_add_key_with_hash;
> + rte_hash_del_key;
> + rte_hash_del_key_with_hash;
> + rte_hash_lookup;
> + rte_hash_lookup_with_hash;
> + rte_hash_lookup_bulk;
> +
> + local: *;
> +};
> diff --git a/lib/librte_ip_frag/Makefile b/lib/librte_ip_frag/Makefile
> index 2265c93..ede5a89 100644
> --- a/lib/librte_ip_frag/Makefile
> +++ b/lib/librte_ip_frag/Makefile
> @@ -37,6 +37,8 @@ LIB = librte_ip_frag.a
> CFLAGS += -O3
> CFLAGS += $(WERROR_FLAGS) -I$(SRCDIR)
>
> +EXPORT_MAP := $(RTE_SDK)/lib/librte_ip_frag/rte_ipfrag_version.map
> +
> #source files
> SRCS-$(CONFIG_RTE_LIBRTE_IP_FRAG) += rte_ipv4_fragmentation.c
> SRCS-$(CONFIG_RTE_LIBRTE_IP_FRAG) += rte_ipv4_reassembly.c
> diff --git a/lib/librte_ip_frag/rte_ipfrag_version.map b/lib/librte_ip_frag/rte_ipfrag_version.map
> new file mode 100644
> index 0000000..afe1a0b
> --- /dev/null
> +++ b/lib/librte_ip_frag/rte_ipfrag_version.map
> @@ -0,0 +1,14 @@
> +DPDK_1.8 {
> + global:
> +
> + rte_ip_frag_table_create;
> + rte_ipv6_fragment_packet;
> + rte_ipv6_frag_reassemble_packet;
> + rte_ipv4_fragment_packet;
> + rte_ipv4_frag_reassemble_packet;
> + rte_ip_frag_free_death_row;
> + rte_ip_frag_table_statistics_dump;
> +
> + local: *;
> +};
> +
> diff --git a/lib/librte_ivshmem/Makefile b/lib/librte_ivshmem/Makefile
> index 536814c..be6f21a 100644
> --- a/lib/librte_ivshmem/Makefile
> +++ b/lib/librte_ivshmem/Makefile
> @@ -36,6 +36,8 @@ LIB = librte_ivshmem.a
>
> CFLAGS += $(WERROR_FLAGS) -I$(SRCDIR) -O3
>
> +EXPORT_MAPS := $(RTE_SDK)/lib/librte_ivshmem/rte_ivshmem_version.map
> +
> # all source are stored in SRCS-y
> SRCS-$(CONFIG_RTE_LIBRTE_IVSHMEM) := rte_ivshmem.c
>
> diff --git a/lib/librte_ivshmem/rte_ivshmem_version.map b/lib/librte_ivshmem/rte_ivshmem_version.map
> new file mode 100644
> index 0000000..a204339
> --- /dev/null
> +++ b/lib/librte_ivshmem/rte_ivshmem_version.map
> @@ -0,0 +1,13 @@
> +DPDK_1.8 {
> + global:
> +
> + rte_ivshmem_metadata_create;
> + rte_ivshmem_metadata_add_memzone;
> + rte_ivshmem_metadata_add_ring;
> + rte_ivshmem_metadata_add_mempool;
> + rte_ivshmem_metadata_cmdline_generate;
> + rte_ivshmem_metadata_dump;
> +
> + local: *;
> +};
> +
> diff --git a/lib/librte_kni/Makefile b/lib/librte_kni/Makefile
> index 5267304..c119fc1 100644
> --- a/lib/librte_kni/Makefile
> +++ b/lib/librte_kni/Makefile
> @@ -36,6 +36,8 @@ LIB = librte_kni.a
>
> CFLAGS += $(WERROR_FLAGS) -I$(SRCDIR) -O3 -fno-strict-aliasing
>
> +EXPORT_MAP := $(RTE_SDK)/lib/librte_kni/rte_kni_version.map
> +
> # all source are stored in SRCS-y
> SRCS-$(CONFIG_RTE_LIBRTE_KNI) := rte_kni.c
>
> diff --git a/lib/librte_kni/rte_kni_version.map b/lib/librte_kni/rte_kni_version.map
> new file mode 100644
> index 0000000..58fbc1f
> --- /dev/null
> +++ b/lib/librte_kni/rte_kni_version.map
> @@ -0,0 +1,19 @@
> +DPDK_1.8 {
> + global:
> +
> + rte_kni_alloc;
> + rte_kni_create;
> + rte_kni_release;
> + rte_kni_handle_request;
> + rte_kni_rx_burst;
> + rte_kni_tx_burst;
> + rte_kni_get_port_id;
> + rte_kni_get;
> + rte_kni_info_get;
> + rte_kni_register_handlers;
> + rte_kni_unregister_handlers;
> + rte_kni_close;
> +
> + local: *;
> +};
> +
> diff --git a/lib/librte_kvargs/Makefile b/lib/librte_kvargs/Makefile
> index b09359a..83a42b1 100644
> --- a/lib/librte_kvargs/Makefile
> +++ b/lib/librte_kvargs/Makefile
> @@ -38,6 +38,8 @@ LIB = librte_kvargs.a
>
> CFLAGS += $(WERROR_FLAGS) -I$(SRCDIR) -O3
>
> +EXPORT_MAP := $(RTE_SDK)/lib/librte_kvargs/rte_kvargs_version.map
> +
> # all source are stored in SRCS-y
> SRCS-$(CONFIG_RTE_LIBRTE_KVARGS) := rte_kvargs.c
>
> diff --git a/lib/librte_kvargs/rte_kvargs_version.map b/lib/librte_kvargs/rte_kvargs_version.map
> new file mode 100644
> index 0000000..7873c8c
> --- /dev/null
> +++ b/lib/librte_kvargs/rte_kvargs_version.map
> @@ -0,0 +1,10 @@
> +DPDK_1.8 {
> +
> + global:
> + rte_kvargs_parse;
> + rte_kvargs_free;
> + rte_kvargs_process;
> + rte_kvargs_count;
> +
> + local: *;
> +};
> diff --git a/lib/librte_lpm/Makefile b/lib/librte_lpm/Makefile
> index fa94163..05de8d9 100644
> --- a/lib/librte_lpm/Makefile
> +++ b/lib/librte_lpm/Makefile
> @@ -37,6 +37,8 @@ LIB = librte_lpm.a
> CFLAGS += -O3
> CFLAGS += $(WERROR_FLAGS) -I$(SRCDIR)
>
> +EXPORT_MAP := $(RTE_SDK)/lib/librte_lpm/rte_lpm_version.map
> +
> # all source are stored in SRCS-y
> SRCS-$(CONFIG_RTE_LIBRTE_LPM) := rte_lpm.c rte_lpm6.c
>
> diff --git a/lib/librte_lpm/rte_lpm_version.map b/lib/librte_lpm/rte_lpm_version.map
> new file mode 100644
> index 0000000..8ae9318
> --- /dev/null
> +++ b/lib/librte_lpm/rte_lpm_version.map
> @@ -0,0 +1,24 @@
> +DPDK_1.8 {
> + global:
> +
> + rte_lpm_create;
> + rte_lpm_find_existing;
> + rte_lpm_free;
> + rte_lpm_add;
> + rte_lpm_is_rule_present;
> + rte_lpm_delete;
> + rte_lpm_delete_all;
> + rte_lpm6_create;
> + rte_lpm6_find_existing;
> + rte_lpm6_free;
> + rte_lpm6_add;
> + rte_lpm6_is_rule_present;
> + rte_lpm6_delete;
> + rte_lpm6_delete_bulk_func;
> + rte_lpm6_delete_all;
> + rte_lpm6_lookup;
> + rte_lpm6_lookup_bulk_func;
> +
> + local: *;
> +};
> +
> diff --git a/lib/librte_malloc/Makefile b/lib/librte_malloc/Makefile
> index ba87e34..1a5c288 100644
> --- a/lib/librte_malloc/Makefile
> +++ b/lib/librte_malloc/Makefile
> @@ -36,6 +36,8 @@ LIB = librte_malloc.a
>
> CFLAGS += $(WERROR_FLAGS) -I$(SRCDIR) -O3
>
> +EXPORT_MAP := $(RTE_SDK)/lib/librte_malloc/rte_malloc_version.map
> +
> # all source are stored in SRCS-y
> SRCS-$(CONFIG_RTE_LIBRTE_MALLOC) := rte_malloc.c malloc_elem.c malloc_heap.c
>
> diff --git a/lib/librte_malloc/rte_malloc_version.map b/lib/librte_malloc/rte_malloc_version.map
> new file mode 100644
> index 0000000..77db879
> --- /dev/null
> +++ b/lib/librte_malloc/rte_malloc_version.map
> @@ -0,0 +1,19 @@
> +DPDK_1.8 {
> + global:
> +
> + rte_malloc;
> + rte_zmalloc;
> + rte_calloc;
> + rte_realloc;
> + rte_malloc_socket;
> + rte_zmalloc_socket;
> + rte_calloc_socket;
> + rte_free;
> + rte_malloc_validate;
> + rte_malloc_get_socket_stats;
> + rte_malloc_dump_stats;
> + rte_malloc_set_limit;
> + rte_malloc_virt2phy;
> +
> + local: *;
> +};
> diff --git a/lib/librte_mbuf/Makefile b/lib/librte_mbuf/Makefile
> index 9b45ba4..5cd4941 100644
> --- a/lib/librte_mbuf/Makefile
> +++ b/lib/librte_mbuf/Makefile
> @@ -36,6 +36,8 @@ LIB = librte_mbuf.a
>
> CFLAGS += $(WERROR_FLAGS) -I$(SRCDIR) -O3
>
> +EXPORT_MAP := $(RTE_SDK)/lib/librte_mbuf/rte_mbuf_version.map
> +
> # all source are stored in SRCS-y
> SRCS-$(CONFIG_RTE_LIBRTE_MBUF) := rte_mbuf.c
>
> diff --git a/lib/librte_mbuf/rte_mbuf_version.map b/lib/librte_mbuf/rte_mbuf_version.map
> new file mode 100644
> index 0000000..55e352b
> --- /dev/null
> +++ b/lib/librte_mbuf/rte_mbuf_version.map
> @@ -0,0 +1,12 @@
> +DPDK_1.8 {
> + global:
> +
> + rte_mbuf_sanity_check;
> + rte_ctrlmbuf_init;
> + rte_pktmbuf_init;
> + rte_pktmbuf_pool_init;
> + rte_pktmbuf_dump;
> +
> + local: *;
> +};
> +
> diff --git a/lib/librte_mempool/Makefile b/lib/librte_mempool/Makefile
> index 9939e10..07b5b4e 100644
> --- a/lib/librte_mempool/Makefile
> +++ b/lib/librte_mempool/Makefile
> @@ -36,6 +36,8 @@ LIB = librte_mempool.a
>
> CFLAGS += $(WERROR_FLAGS) -I$(SRCDIR) -O3
>
> +EXPORT_MAP := $(RTE_SDK)/lib/librte_mempool/rte_mempool_version.map
> +
> # all source are stored in SRCS-y
> SRCS-$(CONFIG_RTE_LIBRTE_MEMPOOL) += rte_mempool.c
> ifeq ($(CONFIG_RTE_LIBRTE_XEN_DOM0),y)
> diff --git a/lib/librte_mempool/rte_mempool_version.map b/lib/librte_mempool/rte_mempool_version.map
> new file mode 100644
> index 0000000..7a19982
> --- /dev/null
> +++ b/lib/librte_mempool/rte_mempool_version.map
> @@ -0,0 +1,18 @@
> +DPDK_1.8 {
> + global:
> +
> + rte_mempool_create;
> + rte_mempool_xmem_create;
> + rte_dom0_mempool_create;
> + rte_mempool_dump;
> + rte_mempool_audit;
> + rte_mempool_list_dump;
> + rte_mempool_lookup;
> + rte_mempool_calc_obj_size;
> + rte_mempool_xmem_size;
> + rte_mempool_xmem_usage;
> + rte_mempool_walk;
> + rte_mempool_count;
> +
> + local: *;
> +};
> diff --git a/lib/librte_meter/Makefile b/lib/librte_meter/Makefile
> index b25c0cc..0778690 100644
> --- a/lib/librte_meter/Makefile
> +++ b/lib/librte_meter/Makefile
> @@ -39,6 +39,8 @@ LIB = librte_meter.a
> CFLAGS += -O3
> CFLAGS += $(WERROR_FLAGS)
>
> +EXPORT_MAP := $(RTE_SDK)/lib/librte_meter/rte_meter_version.map
> +
> #
> # all source are stored in SRCS-y
> #
> diff --git a/lib/librte_meter/rte_meter_version.map b/lib/librte_meter/rte_meter_version.map
> new file mode 100644
> index 0000000..51a73b1
> --- /dev/null
> +++ b/lib/librte_meter/rte_meter_version.map
> @@ -0,0 +1,13 @@
> +DPDK_1.8 {
> + global:
> +
> + rte_meter_srtcm_config;
> + rte_meter_trtcm_config;
> + rte_meter_srtcm_color_blind_check;
> + rte_meter_srtcm_color_aware_check;
> + rte_meter_trtcm_color_blind_check;
> + rte_meter_trtcm_color_aware_check;
> +
> + local: *;
> +};
> +
> diff --git a/lib/librte_pipeline/Makefile b/lib/librte_pipeline/Makefile
> index cf8fde8..5465d00 100644
> --- a/lib/librte_pipeline/Makefile
> +++ b/lib/librte_pipeline/Makefile
> @@ -39,6 +39,8 @@ LIB = librte_pipeline.a
> CFLAGS += -O3
> CFLAGS += $(WERROR_FLAGS)
>
> +EXPORT_MAP := $(RTE_SDK)/lib/librte_pipeline/rte_pipeline_version.map
> +
> #
> # all source are stored in SRCS-y
> #
> diff --git a/lib/librte_pipeline/rte_pipeline_version.map b/lib/librte_pipeline/rte_pipeline_version.map
> new file mode 100644
> index 0000000..f868b96
> --- /dev/null
> +++ b/lib/librte_pipeline/rte_pipeline_version.map
> @@ -0,0 +1,23 @@
> +DPDK_1.8 {
> + global:
> +
> + rte_pipeline_create;
> + rte_pipeline_free;
> + rte_pipeline_check;
> + rte_pipeline_run;
> + rte_pipeline_flush;
> + rte_pipeline_table_create;
> + rte_pipeline_table_default_entry_add;
> + rte_pipeline_table_default_entry_delete;
> + rte_pipeline_table_entry_add;
> + rte_pipeline_table_entry_delete;
> + rte_pipeline_port_in_create;
> + rte_pipeline_port_in_connect_to_table;
> + rte_pipeline_port_in_enable;
> + rte_pipeline_port_in_disable;
> + rte_pipeline_port_out_create;
> + rte_pipeline_port_out_packet_insert;
> +
> + local: *;
> +};
> +
> diff --git a/lib/librte_pmd_bond/Makefile b/lib/librte_pmd_bond/Makefile
> index 953d75e..5b14ce2 100644
> --- a/lib/librte_pmd_bond/Makefile
> +++ b/lib/librte_pmd_bond/Makefile
> @@ -39,6 +39,8 @@ LIB = librte_pmd_bond.a
> CFLAGS += -O3
> CFLAGS += $(WERROR_FLAGS)
>
> +EXPORT_MAP := $(RTE_SDK)/lib/librte_pmd_bond/rte_eth_bond_version.map
> +
> #
> # all source are stored in SRCS-y
> #
> diff --git a/lib/librte_pmd_bond/rte_eth_bond_version.map b/lib/librte_pmd_bond/rte_eth_bond_version.map
> new file mode 100644
> index 0000000..17f0a1f
> --- /dev/null
> +++ b/lib/librte_pmd_bond/rte_eth_bond_version.map
> @@ -0,0 +1,20 @@
> +DPDK_1.8 {
> + global:
> +
> + rte_eth_bond_create;
> + rte_eth_bond_slave_add;
> + rte_eth_bond_slave_remove;
> + rte_eth_bond_mode_set;
> + rte_eth_bond_mode_get;
> + rte_eth_bond_primary_set;
> + rte_eth_bond_primary_get;
> + rte_eth_bond_slaves_get;
> + rte_eth_bond_active_slaves_get;
> + rte_eth_bond_mac_address_set;
> + rte_eth_bond_mac_address_reset;
> + rte_eth_bond_xmit_policy_set;
> + rte_eth_bond_xmit_policy_get;
> +
> +
> + local: *;
> +};
> diff --git a/lib/librte_pmd_e1000/Makefile b/lib/librte_pmd_e1000/Makefile
> index 14bc4a2..e225bfe 100644
> --- a/lib/librte_pmd_e1000/Makefile
> +++ b/lib/librte_pmd_e1000/Makefile
> @@ -39,6 +39,8 @@ LIB = librte_pmd_e1000.a
> CFLAGS += -O3
> CFLAGS += $(WERROR_FLAGS)
>
> +EXPORT_MAP := $(RTE_SDK)/lib/librte_pmd_e1000/rte_pmd_e1000_version.map
> +
> ifeq ($(CC), icc)
> #
> # CFLAGS for icc
> diff --git a/lib/librte_pmd_e1000/rte_pmd_e1000_version.map b/lib/librte_pmd_e1000/rte_pmd_e1000_version.map
> new file mode 100644
> index 0000000..cbc401f
> --- /dev/null
> +++ b/lib/librte_pmd_e1000/rte_pmd_e1000_version.map
> @@ -0,0 +1,5 @@
> +DPDK_1.8 {
> +
> + local: *;
> +};
> +
> diff --git a/lib/librte_pmd_i40e/Makefile b/lib/librte_pmd_i40e/Makefile
> index 4b31675..cfbe816 100644
> --- a/lib/librte_pmd_i40e/Makefile
> +++ b/lib/librte_pmd_i40e/Makefile
> @@ -39,6 +39,8 @@ LIB = librte_pmd_i40e.a
> CFLAGS += -O3
> CFLAGS += $(WERROR_FLAGS)
>
> +EXPORT_MAP := $(RTE_SDK)/lib/librte_pmd_i40e/rte_pmd_i40e_version.map
> +
> #
> # Add extra flags for base driver files (also known as shared code)
> # to disable warnings
> diff --git a/lib/librte_pmd_i40e/rte_pmd_i40e_version.map b/lib/librte_pmd_i40e/rte_pmd_i40e_version.map
> new file mode 100644
> index 0000000..cbc401f
> --- /dev/null
> +++ b/lib/librte_pmd_i40e/rte_pmd_i40e_version.map
> @@ -0,0 +1,5 @@
> +DPDK_1.8 {
> +
> + local: *;
> +};
> +
> diff --git a/lib/librte_pmd_ixgbe/Makefile b/lib/librte_pmd_ixgbe/Makefile
> index 00ccedb..1dd14a6 100644
> --- a/lib/librte_pmd_ixgbe/Makefile
> +++ b/lib/librte_pmd_ixgbe/Makefile
> @@ -39,6 +39,8 @@ LIB = librte_pmd_ixgbe.a
> CFLAGS += -O3
> CFLAGS += $(WERROR_FLAGS)
>
> +EXPORT_MAP := $(RTE_SDK)/lib/librte_pmd_ixgbe/rte_pmd_ixgbe_version.map
> +
> ifeq ($(CC), icc)
> #
> # CFLAGS for icc
> diff --git a/lib/librte_pmd_ixgbe/rte_pmd_ixgbe_version.map b/lib/librte_pmd_ixgbe/rte_pmd_ixgbe_version.map
> new file mode 100644
> index 0000000..cbc401f
> --- /dev/null
> +++ b/lib/librte_pmd_ixgbe/rte_pmd_ixgbe_version.map
> @@ -0,0 +1,5 @@
> +DPDK_1.8 {
> +
> + local: *;
> +};
> +
> diff --git a/lib/librte_pmd_pcap/Makefile b/lib/librte_pmd_pcap/Makefile
> index c5c214d..fff5572 100644
> --- a/lib/librte_pmd_pcap/Makefile
> +++ b/lib/librte_pmd_pcap/Makefile
> @@ -40,6 +40,8 @@ LIB = librte_pmd_pcap.a
> CFLAGS += -O3
> CFLAGS += $(WERROR_FLAGS)
>
> +EXPORT_MAP := $(RTE_SDK)/lib/librte_pmd_pcap/rte_pmd_pcap_version.map
> +
> #
> # all source are stored in SRCS-y
> #
> diff --git a/lib/librte_pmd_pcap/rte_pmd_pcap_version.map b/lib/librte_pmd_pcap/rte_pmd_pcap_version.map
> new file mode 100644
> index 0000000..cbc401f
> --- /dev/null
> +++ b/lib/librte_pmd_pcap/rte_pmd_pcap_version.map
> @@ -0,0 +1,5 @@
> +DPDK_1.8 {
> +
> + local: *;
> +};
> +
> diff --git a/lib/librte_pmd_ring/Makefile b/lib/librte_pmd_ring/Makefile
> index b57e421..25ad27f 100644
> --- a/lib/librte_pmd_ring/Makefile
> +++ b/lib/librte_pmd_ring/Makefile
> @@ -39,6 +39,8 @@ LIB = librte_pmd_ring.a
> CFLAGS += -O3
> CFLAGS += $(WERROR_FLAGS)
>
> +EXPORT_MAP := $(RTE_SDK)/lib/librte_pmd_ring/rte_eth_ring_version.map
> +
> #
> # all source are stored in SRCS-y
> #
> diff --git a/lib/librte_pmd_ring/rte_eth_ring.c b/lib/librte_pmd_ring/rte_eth_ring.c
> index 4f1b6ed..df7b583 100644
> --- a/lib/librte_pmd_ring/rte_eth_ring.c
> +++ b/lib/librte_pmd_ring/rte_eth_ring.c
> @@ -473,7 +473,7 @@ out:
> return ret;
> }
>
> -int
> +static int
> rte_pmd_ring_devinit(const char *name, const char *params)
> {
> struct rte_kvargs *kvlist;
> diff --git a/lib/librte_pmd_ring/rte_eth_ring.h b/lib/librte_pmd_ring/rte_eth_ring.h
> index e6ae19e..d36489a 100644
> --- a/lib/librte_pmd_ring/rte_eth_ring.h
> +++ b/lib/librte_pmd_ring/rte_eth_ring.h
> @@ -50,12 +50,6 @@ int rte_eth_from_rings(const char *name,
> int rte_eth_ring_pair_create(const char *name, const unsigned numa_node);
> int rte_eth_ring_pair_attach(const char *name, const unsigned numa_node);
>
> -/**
> - * For use by test apps only. Called as part of EAL init to set up any dummy NICs
> - * configured on command line.
> - */
> -int rte_pmd_ring_devinit(const char *name, const char *params);
> -
> #ifdef __cplusplus
> }
> #endif
> diff --git a/lib/librte_pmd_ring/rte_eth_ring_version.map b/lib/librte_pmd_ring/rte_eth_ring_version.map
> new file mode 100644
> index 0000000..5edaa3d
> --- /dev/null
> +++ b/lib/librte_pmd_ring/rte_eth_ring_version.map
> @@ -0,0 +1,10 @@
> +DPDK_1.8 {
> +
> + global:
> +
> + rte_eth_from_rings;
> + rte_eth_ring_pair_create;
> + rte_eth_ring_pair_attach;
> +
> + local: *;
> +};
> diff --git a/lib/librte_pmd_virtio/Makefile b/lib/librte_pmd_virtio/Makefile
> index 456095b..bf51bd9 100644
> --- a/lib/librte_pmd_virtio/Makefile
> +++ b/lib/librte_pmd_virtio/Makefile
> @@ -39,6 +39,7 @@ LIB = librte_pmd_virtio_uio.a
> CFLAGS += -O3
> CFLAGS += $(WERROR_FLAGS)
>
> +EXPORT_MAP := $(RTE_SDK)/lib/librte_pmd_virtio/rte_pmd_virtio_version.map
>
> #
> # all source are stored in SRCS-y
> diff --git a/lib/librte_pmd_virtio/rte_pmd_virtio_version.map b/lib/librte_pmd_virtio/rte_pmd_virtio_version.map
> new file mode 100644
> index 0000000..cbc401f
> --- /dev/null
> +++ b/lib/librte_pmd_virtio/rte_pmd_virtio_version.map
> @@ -0,0 +1,5 @@
> +DPDK_1.8 {
> +
> + local: *;
> +};
> +
> diff --git a/lib/librte_pmd_vmxnet3/Makefile b/lib/librte_pmd_vmxnet3/Makefile
> index 6872c74..e5a1c6b 100644
> --- a/lib/librte_pmd_vmxnet3/Makefile
> +++ b/lib/librte_pmd_vmxnet3/Makefile
> @@ -66,6 +66,8 @@ endif
>
> VPATH += $(RTE_SDK)/lib/librte_pmd_vmxnet3/vmxnet3
>
> +EXPORT_MAP := $(RTE_SDK)/lib/librte_pmd_vmxnet3/rte_pmd_vmxnet3_version.map
> +
> #
> # all source are stored in SRCS-y
> #
> diff --git a/lib/librte_pmd_vmxnet3/rte_pmd_vmxnet3_version.map b/lib/librte_pmd_vmxnet3/rte_pmd_vmxnet3_version.map
> new file mode 100644
> index 0000000..cbc401f
> --- /dev/null
> +++ b/lib/librte_pmd_vmxnet3/rte_pmd_vmxnet3_version.map
> @@ -0,0 +1,5 @@
> +DPDK_1.8 {
> +
> + local: *;
> +};
> +
> diff --git a/lib/librte_pmd_xenvirt/Makefile b/lib/librte_pmd_xenvirt/Makefile
> index 01bfcaa..0a08b1b 100644
> --- a/lib/librte_pmd_xenvirt/Makefile
> +++ b/lib/librte_pmd_xenvirt/Makefile
> @@ -39,6 +39,8 @@ LIB = librte_pmd_xenvirt.a
> CFLAGS += -O3
> CFLAGS += $(WERROR_FLAGS)
>
> +EXPORT_MAP := $(RTE_SDK)/lib/librte_pmd_xenvirt/rte_eth_xenvirt_version.map
> +
> #
> # all source are stored in SRCS-y
> #
> diff --git a/lib/librte_pmd_xenvirt/rte_eth_xenvirt_version.map b/lib/librte_pmd_xenvirt/rte_eth_xenvirt_version.map
> new file mode 100644
> index 0000000..66199b1
> --- /dev/null
> +++ b/lib/librte_pmd_xenvirt/rte_eth_xenvirt_version.map
> @@ -0,0 +1,8 @@
> +DPDK_1.8 {
> + global:
> +
> + rte_mempool_gntalloc_create;
> +
> + local: *;
> +};
> +
> diff --git a/lib/librte_port/Makefile b/lib/librte_port/Makefile
> index 28793a5..e812bda 100644
> --- a/lib/librte_port/Makefile
> +++ b/lib/librte_port/Makefile
> @@ -39,6 +39,8 @@ LIB = librte_port.a
> CFLAGS += -O3
> CFLAGS += $(WERROR_FLAGS)
>
> +EXPORT_MAP := $(RTE_SDK)/lib/librte_port/rte_port_version.map
> +
> #
> # all source are stored in SRCS-y
> #
> diff --git a/lib/librte_port/rte_port_version.map b/lib/librte_port/rte_port_version.map
> new file mode 100644
> index 0000000..57ccaa3
> --- /dev/null
> +++ b/lib/librte_port/rte_port_version.map
> @@ -0,0 +1,18 @@
> +DPDK_1.8 {
> + global:
> + rte_port_ring_reader_ops;
> + rte_port_ring_writer_ops;
> + rte_port_ethdev_reader_ops;
> + rte_port_ethdev_writer_ops;
> + rte_port_ring_reader_ipv4_frag_ops;
> + rte_port_ring_writer_ipv4_ras_ops;
> + rte_port_ring_reader_ops;
> + rte_port_ring_writer_ops;
> + rte_port_sched_reader_ops;
> + rte_port_sched_writer_ops;
> + rte_port_source_ops;
> + rte_port_sink_ops;
> +
> + local: *;
> +};
> +
> diff --git a/lib/librte_power/Makefile b/lib/librte_power/Makefile
> index 6185812..26ee542 100644
> --- a/lib/librte_power/Makefile
> +++ b/lib/librte_power/Makefile
> @@ -36,6 +36,8 @@ LIB = librte_power.a
>
> CFLAGS += $(WERROR_FLAGS) -I$(SRCDIR) -O3 -fno-strict-aliasing
>
> +EXPORT_MAP := $(RTE_SDK)/lib/librte_power/rte_power_version.map
> +
> # all source are stored in SRCS-y
> SRCS-$(CONFIG_RTE_LIBRTE_POWER) := rte_power.c
>
> diff --git a/lib/librte_power/rte_power_version.map b/lib/librte_power/rte_power_version.map
> new file mode 100644
> index 0000000..3b2375a
> --- /dev/null
> +++ b/lib/librte_power/rte_power_version.map
> @@ -0,0 +1,14 @@
> +DPDK_1.8 {
> + global:
> + rte_power_init;
> + rte_power_exit;
> + rte_power_freqs;
> + rte_power_get_freq;
> + rte_power_set_freq;
> + rte_power_freq_up;
> + rte_power_freq_down;
> + rte_power_freq_max;
> + rte_power_freq_min;
> +
> + local: *;
> +};
> diff --git a/lib/librte_ring/Makefile b/lib/librte_ring/Makefile
> index 2380a43..0adaa00 100644
> --- a/lib/librte_ring/Makefile
> +++ b/lib/librte_ring/Makefile
> @@ -36,6 +36,8 @@ LIB = librte_ring.a
>
> CFLAGS += $(WERROR_FLAGS) -I$(SRCDIR) -O3
>
> +EXPORT_MAP := $(RTE_SDK)/lib/librte_ring/rte_ring_version.map
> +
> # all source are stored in SRCS-y
> SRCS-$(CONFIG_RTE_LIBRTE_RING) := rte_ring.c
>
> diff --git a/lib/librte_ring/rte_ring_version.map b/lib/librte_ring/rte_ring_version.map
> new file mode 100644
> index 0000000..6c28af9
> --- /dev/null
> +++ b/lib/librte_ring/rte_ring_version.map
> @@ -0,0 +1,12 @@
> +DPDK_1.8 {
> + global:
> + rte_ring_get_memsize;
> + rte_ring_init;
> + rte_ring_create;
> + rte_ring_set_water_mark;
> + rte_ring_dump;
> + rte_ring_list_dump;
> + rte_ring_lookup;
> +
> + local: *;
> +};
> diff --git a/lib/librte_sched/Makefile b/lib/librte_sched/Makefile
> index 1a25b21..205fb7a 100644
> --- a/lib/librte_sched/Makefile
> +++ b/lib/librte_sched/Makefile
> @@ -41,6 +41,8 @@ CFLAGS += $(WERROR_FLAGS)
>
> CFLAGS_rte_red.o := -D_GNU_SOURCE
>
> +EXPORT_MAP := $(RTE_SDK)/lib/librte_sched/rte_sched_version.map
> +
> #
> # all source are stored in SRCS-y
> #
> diff --git a/lib/librte_sched/rte_sched_version.map b/lib/librte_sched/rte_sched_version.map
> new file mode 100644
> index 0000000..b5877ce
> --- /dev/null
> +++ b/lib/librte_sched/rte_sched_version.map
> @@ -0,0 +1,22 @@
> +DPDK_1.8 {
> + global:
> +
> + rte_approx;
> + rte_red_rt_data_init;
> + rte_red_config_init;
> + rte_sched_port_config;
> + rte_sched_port_free;
> + rte_sched_subport_config;
> + rte_sched_pipe_config;
> + rte_sched_port_get_memory_footprint;
> + rte_sched_subport_read_stats;
> + rte_sched_queue_read_stats;
> + rte_sched_port_enqueue;
> + rte_sched_port_dequeue;
> + rte_red_log2_1_minus_Wq;
> + rte_red_pow2_frac_inv;
> + rte_red_rand_val;
> + rte_red_rand_seed;
> +
> + local: *;
> +};
> diff --git a/lib/librte_table/Makefile b/lib/librte_table/Makefile
> index dd684cc..5b54acc 100644
> --- a/lib/librte_table/Makefile
> +++ b/lib/librte_table/Makefile
> @@ -39,6 +39,8 @@ LIB = librte_table.a
> CFLAGS += -O3
> CFLAGS += $(WERROR_FLAGS)
>
> +EXPORT_MAP := $(RTE_SDK)/lib/librte_table/rte_table_version.map
> +
> #
> # all source are stored in SRCS-y
> #
> diff --git a/lib/librte_table/rte_table_version.map b/lib/librte_table/rte_table_version.map
> new file mode 100644
> index 0000000..86f16b8
> --- /dev/null
> +++ b/lib/librte_table/rte_table_version.map
> @@ -0,0 +1,22 @@
> +DPDK_1.8 {
> + global:
> +
> + rte_table_stub_ops;
> + rte_table_lpm_ops;
> + rte_table_array_ops;
> + rte_table_hash_key8_lru_ops;
> + rte_table_hash_key8_lru_dosig_ops;
> + rte_table_hash_key8_ext_ops;
> + rte_table_hash_key8_ext_dosig_ops;
> + rte_table_lpm_ipv6_ops;
> + rte_table_hash_key16_lru_ops;
> + rte_table_hash_key32_lru_ops;
> + rte_table_hash_key16_ext_ops;
> + rte_table_hash_key32_ext_ops;
> + rte_table_acl_ops;
> + rte_table_hash_lru_ops;
> + rte_table_hash_ext_ops;
> +
> + local: *;
> +};
> +
> diff --git a/lib/librte_timer/Makefile b/lib/librte_timer/Makefile
> index 07eb0c6..f703e5f 100644
> --- a/lib/librte_timer/Makefile
> +++ b/lib/librte_timer/Makefile
> @@ -36,6 +36,8 @@ LIB = librte_timer.a
>
> CFLAGS += $(WERROR_FLAGS) -I$(SRCDIR) -O3
>
> +EXPORT_MAP := $(RTE_SDK)/lib/librte_timer/rte_timer_version.map
> +
> # all source are stored in SRCS-y
> SRCS-$(CONFIG_RTE_LIBRTE_TIMER) := rte_timer.c
>
> diff --git a/lib/librte_timer/rte_timer_version.map b/lib/librte_timer/rte_timer_version.map
> new file mode 100644
> index 0000000..00b6b52
> --- /dev/null
> +++ b/lib/librte_timer/rte_timer_version.map
> @@ -0,0 +1,16 @@
> +DPDK_1.8 {
> + global:
> +
> + rte_timer_subsystem_init;
> + rte_timer_init;
> + rte_timer_reset;
> + rte_timer_reset_sync;
> + rte_timer_stop;
> + rte_timer_stop_sync;
> + rte_timer_pending;
> + rte_timer_manage;
> + rte_timer_dump_stats;
> +
> + local: *;
> +};
> +
> --
> 1.9.3
>
May need to update some of the version maps with new functions in head.
Acked-by: Sergio Gonzalez Monroy <sergio.gonzalez.monroy@intel.com>
^ permalink raw reply [flat|nested] 43+ messages in thread
* Re: [dpdk-dev] [PATCH 2/4] Provide initial versioning for all DPDK libraries
2014-10-01 11:25 ` Sergio Gonzalez Monroy
@ 2014-10-01 14:43 ` Neil Horman
0 siblings, 0 replies; 43+ messages in thread
From: Neil Horman @ 2014-10-01 14:43 UTC (permalink / raw)
To: Sergio Gonzalez Monroy; +Cc: dev
On Wed, Oct 01, 2014 at 12:25:52PM +0100, Sergio Gonzalez Monroy wrote:
> On Mon, Sep 15, 2014 at 03:23:49PM -0400, Neil Horman wrote:
> > Add linker version script files to each DPDK library to put a stake in the
> > ground from which we can start cleaning up API's
> >
> > Signed-off-by: Neil Horman <nhorman@tuxdriver.com>
> > CC: Thomas Monjalon <thomas.monjalon@6wind.com>
> > CC: "Richardson, Bruce" <bruce.richardson@intel.com>
> > ---
> > lib/librte_acl/Makefile | 2 +
> > lib/librte_acl/rte_acl_version.map | 19 ++++
> > lib/librte_cfgfile/Makefile | 2 +
> > lib/librte_cfgfile/rte_cfgfile_version.map | 14 +++
> > lib/librte_cmdline/Makefile | 2 +
> > lib/librte_cmdline/rte_cmdline_version.map | 69 +++++++++++++
> > lib/librte_distributor/Makefile | 2 +
> > lib/librte_distributor/rte_distributor_version.map | 16 +++
> > lib/librte_eal/bsdapp/eal/Makefile | 2 +
> > lib/librte_eal/bsdapp/eal/rte_eal_version.map | 89 +++++++++++++++++
> > lib/librte_eal/linuxapp/eal/Makefile | 2 +
> > lib/librte_eal/linuxapp/eal/rte_eal_version.map | 89 +++++++++++++++++
> > lib/librte_ether/Makefile | 2 +
> > lib/librte_ether/rte_ether_version.map | 108 +++++++++++++++++++++
> > lib/librte_hash/Makefile | 2 +
> > lib/librte_hash/rte_hash_version.map | 18 ++++
> > lib/librte_ip_frag/Makefile | 2 +
> > lib/librte_ip_frag/rte_ipfrag_version.map | 14 +++
> > lib/librte_ivshmem/Makefile | 2 +
> > lib/librte_ivshmem/rte_ivshmem_version.map | 13 +++
> > lib/librte_kni/Makefile | 2 +
> > lib/librte_kni/rte_kni_version.map | 19 ++++
> > lib/librte_kvargs/Makefile | 2 +
> > lib/librte_kvargs/rte_kvargs_version.map | 10 ++
> > lib/librte_lpm/Makefile | 2 +
> > lib/librte_lpm/rte_lpm_version.map | 24 +++++
> > lib/librte_malloc/Makefile | 2 +
> > lib/librte_malloc/rte_malloc_version.map | 19 ++++
> > lib/librte_mbuf/Makefile | 2 +
> > lib/librte_mbuf/rte_mbuf_version.map | 12 +++
> > lib/librte_mempool/Makefile | 2 +
> > lib/librte_mempool/rte_mempool_version.map | 18 ++++
> > lib/librte_meter/Makefile | 2 +
> > lib/librte_meter/rte_meter_version.map | 13 +++
> > lib/librte_pipeline/Makefile | 2 +
> > lib/librte_pipeline/rte_pipeline_version.map | 23 +++++
> > lib/librte_pmd_bond/Makefile | 2 +
> > lib/librte_pmd_bond/rte_eth_bond_version.map | 20 ++++
> > lib/librte_pmd_e1000/Makefile | 2 +
> > lib/librte_pmd_e1000/rte_pmd_e1000_version.map | 5 +
> > lib/librte_pmd_i40e/Makefile | 2 +
> > lib/librte_pmd_i40e/rte_pmd_i40e_version.map | 5 +
> > lib/librte_pmd_ixgbe/Makefile | 2 +
> > lib/librte_pmd_ixgbe/rte_pmd_ixgbe_version.map | 5 +
> > lib/librte_pmd_pcap/Makefile | 2 +
> > lib/librte_pmd_pcap/rte_pmd_pcap_version.map | 5 +
> > lib/librte_pmd_ring/Makefile | 2 +
> > lib/librte_pmd_ring/rte_eth_ring.c | 2 +-
> > lib/librte_pmd_ring/rte_eth_ring.h | 6 --
> > lib/librte_pmd_ring/rte_eth_ring_version.map | 10 ++
> > lib/librte_pmd_virtio/Makefile | 1 +
> > lib/librte_pmd_virtio/rte_pmd_virtio_version.map | 5 +
> > lib/librte_pmd_vmxnet3/Makefile | 2 +
> > lib/librte_pmd_vmxnet3/rte_pmd_vmxnet3_version.map | 5 +
> > lib/librte_pmd_xenvirt/Makefile | 2 +
> > lib/librte_pmd_xenvirt/rte_eth_xenvirt_version.map | 8 ++
> > lib/librte_port/Makefile | 2 +
> > lib/librte_port/rte_port_version.map | 18 ++++
> > lib/librte_power/Makefile | 2 +
> > lib/librte_power/rte_power_version.map | 14 +++
> > lib/librte_ring/Makefile | 2 +
> > lib/librte_ring/rte_ring_version.map | 12 +++
> > lib/librte_sched/Makefile | 2 +
> > lib/librte_sched/rte_sched_version.map | 22 +++++
> > lib/librte_table/Makefile | 2 +
> > lib/librte_table/rte_table_version.map | 22 +++++
> > lib/librte_timer/Makefile | 2 +
> > lib/librte_timer/rte_timer_version.map | 16 +++
> > 68 files changed, 825 insertions(+), 7 deletions(-)
> > create mode 100644 lib/librte_acl/rte_acl_version.map
> > create mode 100644 lib/librte_cfgfile/rte_cfgfile_version.map
> > create mode 100644 lib/librte_cmdline/rte_cmdline_version.map
> > create mode 100644 lib/librte_distributor/rte_distributor_version.map
> > create mode 100644 lib/librte_eal/bsdapp/eal/rte_eal_version.map
> > create mode 100644 lib/librte_eal/linuxapp/eal/rte_eal_version.map
> > create mode 100644 lib/librte_ether/rte_ether_version.map
> > create mode 100644 lib/librte_hash/rte_hash_version.map
> > create mode 100644 lib/librte_ip_frag/rte_ipfrag_version.map
> > create mode 100644 lib/librte_ivshmem/rte_ivshmem_version.map
> > create mode 100644 lib/librte_kni/rte_kni_version.map
> > create mode 100644 lib/librte_kvargs/rte_kvargs_version.map
> > create mode 100644 lib/librte_lpm/rte_lpm_version.map
> > create mode 100644 lib/librte_malloc/rte_malloc_version.map
> > create mode 100644 lib/librte_mbuf/rte_mbuf_version.map
> > create mode 100644 lib/librte_mempool/rte_mempool_version.map
> > create mode 100644 lib/librte_meter/rte_meter_version.map
> > create mode 100644 lib/librte_pipeline/rte_pipeline_version.map
> > create mode 100644 lib/librte_pmd_bond/rte_eth_bond_version.map
> > create mode 100644 lib/librte_pmd_e1000/rte_pmd_e1000_version.map
> > create mode 100644 lib/librte_pmd_i40e/rte_pmd_i40e_version.map
> > create mode 100644 lib/librte_pmd_ixgbe/rte_pmd_ixgbe_version.map
> > create mode 100644 lib/librte_pmd_pcap/rte_pmd_pcap_version.map
> > create mode 100644 lib/librte_pmd_ring/rte_eth_ring_version.map
> > create mode 100644 lib/librte_pmd_virtio/rte_pmd_virtio_version.map
> > create mode 100644 lib/librte_pmd_vmxnet3/rte_pmd_vmxnet3_version.map
> > create mode 100644 lib/librte_pmd_xenvirt/rte_eth_xenvirt_version.map
> > create mode 100644 lib/librte_port/rte_port_version.map
> > create mode 100644 lib/librte_power/rte_power_version.map
> > create mode 100644 lib/librte_ring/rte_ring_version.map
> > create mode 100644 lib/librte_sched/rte_sched_version.map
> > create mode 100644 lib/librte_table/rte_table_version.map
> > create mode 100644 lib/librte_timer/rte_timer_version.map
> >
> > diff --git a/lib/librte_acl/Makefile b/lib/librte_acl/Makefile
> > index 65e566d..1f96645 100644
> > --- a/lib/librte_acl/Makefile
> > +++ b/lib/librte_acl/Makefile
> > @@ -37,6 +37,8 @@ LIB = librte_acl.a
> > CFLAGS += -O3
> > CFLAGS += $(WERROR_FLAGS) -I$(SRCDIR)
> >
> > +EXPORT_MAP := $(RTE_SDK)/lib/librte_acl/rte_acl_version.map
> > +
> > # all source are stored in SRCS-y
> > SRCS-$(CONFIG_RTE_LIBRTE_ACL) += tb_mem.c
> >
> > diff --git a/lib/librte_acl/rte_acl_version.map b/lib/librte_acl/rte_acl_version.map
> > new file mode 100644
> > index 0000000..4480690
> > --- /dev/null
> > +++ b/lib/librte_acl/rte_acl_version.map
> > @@ -0,0 +1,19 @@
> > +DPDK_1.8 {
> > + global:
> > + rte_acl_create;
> > + rte_acl_find_existing;
> > + rte_acl_free;
> > + rte_acl_add_rules;
> > + rte_acl_reset_rules;
> > + rte_acl_build;
> > + rte_acl_reset;
> > + rte_acl_classify;
> > + rte_acl_dump;
> > + rte_acl_list_dump;
> > + rte_acl_ipv4vlan_add_rules;
> > + rte_acl_ipv4vlan_build;
> > + rte_acl_classify_scalar;
> > +
> > + local: *;
> > +};
> > +
> > diff --git a/lib/librte_cfgfile/Makefile b/lib/librte_cfgfile/Makefile
> > index 55e8701..e655098 100644
> > --- a/lib/librte_cfgfile/Makefile
> > +++ b/lib/librte_cfgfile/Makefile
> > @@ -39,6 +39,8 @@ LIB = librte_cfgfile.a
> > CFLAGS += -O3
> > CFLAGS += $(WERROR_FLAGS)
> >
> > +EXPORT_MAP := $(RTE_SDK)/lib/librte_cfgfile/rte_cfgfile_version.map
> > +
> > #
> > # all source are stored in SRCS-y
> > #
> > diff --git a/lib/librte_cfgfile/rte_cfgfile_version.map b/lib/librte_cfgfile/rte_cfgfile_version.map
> > new file mode 100644
> > index 0000000..10ecea6
> > --- /dev/null
> > +++ b/lib/librte_cfgfile/rte_cfgfile_version.map
> > @@ -0,0 +1,14 @@
> > +DPDK_1.8 {
> > + global:
> > + rte_cfgfile_load;
> > + rte_cfgfile_num_sections;
> > + rte_cfgfile_sections;
> > + rte_cfgfile_has_section;
> > + rte_cfgfile_section_num_entries;
> > + rte_cfgfile_section_entries;
> > + rte_cfgfile_get_entry;
> > + rte_cfgfile_has_entry;
> > + rte_cfgfile_close;
> > +
> > + local: *;
> > +};
> > diff --git a/lib/librte_cmdline/Makefile b/lib/librte_cmdline/Makefile
> > index 7eae449..1a47173 100644
> > --- a/lib/librte_cmdline/Makefile
> > +++ b/lib/librte_cmdline/Makefile
> > @@ -36,6 +36,8 @@ LIB = librte_cmdline.a
> >
> > CFLAGS += $(WERROR_FLAGS) -I$(SRCDIR) -O3
> >
> > +EXPORT_MAP := $(RTE_SDK)/lib/librte_cmdline/rte_cmdline_version.map
> > +
> > # all source are stored in SRCS-y
> > SRCS-$(CONFIG_RTE_LIBRTE_CMDLINE) := cmdline.c
> > SRCS-$(CONFIG_RTE_LIBRTE_CMDLINE) += cmdline_cirbuf.c
> > diff --git a/lib/librte_cmdline/rte_cmdline_version.map b/lib/librte_cmdline/rte_cmdline_version.map
> > new file mode 100644
> > index 0000000..7616eff
> > --- /dev/null
> > +++ b/lib/librte_cmdline/rte_cmdline_version.map
> > @@ -0,0 +1,69 @@
> > +DPDK_1.8 {
> > + global:
> > + cmdline_new;
> > + cmdline_set_prompt;
> > + cmdline_free;
> > + cmdline_printf;
> > + cmdline_in;
> > + cmdline_write_char;
> > + cmdline_interact;
> > + cmdline_quit;
> > + cmdline_parse;
> > + cmdline_complete;
> > + cmdline_isendoftoken;
> > + cmdline_parse_num;
> > + cmdline_get_help_num;
> > + cmdline_parse_ipaddr;
> > + cmdline_get_help_ipaddr;
> > + cmdline_parse_etheraddr;
> > + cmdline_get_help_etheraddr;
> > + cmdline_parse_string;
> > + cmdline_complete_get_nb_string;
> > + cmdline_complete_get_elt_string;
> > + cmdline_get_help_string;
> > + cmdline_parse_portlist;
> > + cmdline_get_help_portlist;
> > + cmdline_token_string_ops;
> > + cmdline_token_num_ops;
> > + cmdline_token_string_ops;
> > + cmdline_token_ipaddr_ops;
> > + cmdline_token_etheraddr_ops;
> > + vt100_init;
> > + vt100_parser;
> > + cmdline_file_new;
> > + cmdline_stdin_new;
> > + cmdline_stdin_exit;
> > + cirbuf_init;
> > + cirbuf_add_head_safe;
> > + cirbuf_add_head;
> > + cirbuf_add_tail_safe;
> > + cirbuf_add_tail;
> > + cirbuf_del_head_safe;
> > + cirbuf_del_head;
> > + cirbuf_del_tail_safe;
> > + cirbuf_del_tail;
> > + cirbuf_get_head;
> > + cirbuf_get_tail;
> > + cirbuf_add_buf_head;
> > + cirbuf_add_buf_tail;
> > + cirbuf_del_buf_head;
> > + cirbuf_del_buf_tail;
> > + cirbuf_get_buf_head;
> > + cirbuf_get_buf_tail;
> > + cirbuf_align_left;
> > + cirbuf_align_right;
> > + rdline_init;
> > + rdline_newline;
> > + rdline_stop;
> > + rdline_quit;
> > + rdline_restart;
> > + rdline_redisplay;
> > + rdline_reset;
> > + rdline_char_in;
> > + rdline_get_buffer;
> > + rdline_add_history;
> > + rdline_clear_history;
> > + rdline_get_history_item;
> > +
> > + local: *;
> > +};
> > diff --git a/lib/librte_distributor/Makefile b/lib/librte_distributor/Makefile
> > index 36699f8..97d8bbb 100644
> > --- a/lib/librte_distributor/Makefile
> > +++ b/lib/librte_distributor/Makefile
> > @@ -37,6 +37,8 @@ LIB = librte_distributor.a
> > CFLAGS += -O3
> > CFLAGS += $(WERROR_FLAGS) -I$(SRCDIR)
> >
> > +EXPORT_MAP := $(RTE_SDK)/lib/librte_distributor/rte_distributor_version.map
> > +
> > # all source are stored in SRCS-y
> > SRCS-$(CONFIG_RTE_LIBRTE_DISTRIBUTOR) := rte_distributor.c
> >
> > diff --git a/lib/librte_distributor/rte_distributor_version.map b/lib/librte_distributor/rte_distributor_version.map
> > new file mode 100644
> > index 0000000..b81ddc8
> > --- /dev/null
> > +++ b/lib/librte_distributor/rte_distributor_version.map
> > @@ -0,0 +1,16 @@
> > +DPDK_1.8 {
> > +
> > + global:
> > + rte_distributor_create;
> > + rte_distributor_process;
> > + rte_distributor_returned_pkts;
> > + rte_distributor_flush;
> > + rte_distributor_clear_returns;
> > + rte_distributor_get_pkt;
> > + rte_distributor_return_pkt;
> > + rte_distributor_request_pkt;
> > + rte_distributor_poll_pkt;
> > +
> > + local: *;
> > +};
> > +
> > diff --git a/lib/librte_eal/bsdapp/eal/Makefile b/lib/librte_eal/bsdapp/eal/Makefile
> > index 8f44273..2caaf00 100644
> > --- a/lib/librte_eal/bsdapp/eal/Makefile
> > +++ b/lib/librte_eal/bsdapp/eal/Makefile
> > @@ -45,6 +45,8 @@ CFLAGS += -I$(RTE_SDK)/lib/librte_pmd_ring
> > CFLAGS += -I$(RTE_SDK)/lib/librte_pmd_pcap
> > CFLAGS += $(WERROR_FLAGS) -O3
> >
> > +EXPORT_MAP := $(RTE_SDK)/lib/librte_eal/bsdapp/eal/rte_eal_version.map
> > +
> > # specific to linuxapp exec-env
> > SRCS-$(CONFIG_RTE_LIBRTE_EAL_BSDAPP) := eal.c
> > SRCS-$(CONFIG_RTE_LIBRTE_EAL_BSDAPP) += eal_memory.c
> > diff --git a/lib/librte_eal/bsdapp/eal/rte_eal_version.map b/lib/librte_eal/bsdapp/eal/rte_eal_version.map
> > new file mode 100644
> > index 0000000..71788e1
> > --- /dev/null
> > +++ b/lib/librte_eal/bsdapp/eal/rte_eal_version.map
> > @@ -0,0 +1,89 @@
> > +DPDK_1.8 {
> > + global:
> > + rte_eal_alarm_set;
> > + rte_eal_alarm_cancel;
> > + rte_exit;
> > + rte_cpu_get_flag_enabled;
> > + rte_cpu_check_supported;
> > + rte_get_tsc_hz;
> > + rte_get_hpet_cycles;
> > + rte_get_hpet_hz;
> > + rte_eal_hpet_init;
> > + rte_delay_us;
> > + rte_dump_stack;
> > + rte_dump_registers;
> > + __rte_panic;
> > + rte_eal_devargs_add;
> > + rte_eal_devargs_type_count;
> > + rte_eal_devargs_dump;
> > + rte_eal_driver_register;
> > + rte_eal_driver_unregister;
> > + rte_eal_dev_init;
> > + rte_eal_init;
> > + rte_set_application_usage_hook;
> > + rte_eal_has_hugepages;
> > + rte_strerror;
> > + rte_hexdump;
> > + rte_memdump;
> > + rte_intr_callback_register;
> > + rte_intr_callback_unregister;
> > + rte_intr_enable;
> > + rte_intr_disable;
> > + rte_eal_remote_launch;
> > + rte_eal_mp_remote_launch;
> > + rte_eal_get_lcore_state;
> > + rte_eal_wait_lcore;
> > + rte_eal_mp_wait_lcore;
> > + rte_openlog_stream;
> > + rte_set_log_level;
> > + rte_set_log_type;
> > + rte_log_cur_msg_loglevel;
> > + rte_log_cur_msg_logtype;
> > + rte_log_set_history;
> > + rte_log_dump_history;
> > + rte_log_add_in_history;
> > + rte_log;
> > + rte_vlog;
> > + rte_mem_lock_page;
> > + rte_mem_virt2phy;
> > + rte_eal_get_physmem_layout;
> > + rte_dump_physmem_layout;
> > + rte_eal_get_physmem_size;
> > + rte_memory_get_nchannel;
> > + rte_memory_get_nrank;
> > + rte_mem_phy2mch;
> > + rte_xen_dom0_memory_init;
> > + rte_xen_dom0_memory_attach;
> > + rte_memzone_reserve;
> > + rte_memzone_reserve_aligned;
> > + rte_memzone_reserve_bounded;
> > + rte_memzone_lookup;
> > + rte_memzone_dump;
> > + rte_memzone_walk;
> > + rte_eal_pci_probe;
> > + rte_eal_pci_dump;
> > + rte_eal_pci_register;
> > + rte_eal_pci_unregister;
> > + rte_snprintf;
> > + rte_strsplit;
> > + rte_eal_tailq_reserve;
> > + rte_eal_tailq_reserve_by_idx;
> > + rte_dump_tailq;
> > + rte_eal_tailq_lookup;
> > + rte_eal_tailq_lookup_by_idx;
> > + lcore_config;
> > + per_lcore__lcore_id;
> > + eal_timer_source;
> > + rte_cycles_vmware_tsc_map;
> > + rte_eal_get_configuration;
> > + rte_logs;
> > + rte_eal_lcore_role;
> > + test_mp_secondary;
> > + rte_eal_process_type;
> > + per_lcore__rte_errno;
> > + pci_device_list;
> > + devargs_list;
> > + eal_parse_sysfs_value;
> > +
> > + local: *;
> > +};
> > diff --git a/lib/librte_eal/linuxapp/eal/Makefile b/lib/librte_eal/linuxapp/eal/Makefile
> > index 756d6b0..254d59c 100644
> > --- a/lib/librte_eal/linuxapp/eal/Makefile
> > +++ b/lib/librte_eal/linuxapp/eal/Makefile
> > @@ -33,6 +33,8 @@ include $(RTE_SDK)/mk/rte.vars.mk
> >
> > LIB = librte_eal.a
> >
> > +EXPORT_MAP := $(RTE_SDK)/lib/librte_eal/linuxapp/eal/rte_eal_version.map
> > +
> > VPATH += $(RTE_SDK)/lib/librte_eal/common
> >
> > CFLAGS += -I$(SRCDIR)/include
> > diff --git a/lib/librte_eal/linuxapp/eal/rte_eal_version.map b/lib/librte_eal/linuxapp/eal/rte_eal_version.map
> > new file mode 100644
> > index 0000000..71788e1
> > --- /dev/null
> > +++ b/lib/librte_eal/linuxapp/eal/rte_eal_version.map
> > @@ -0,0 +1,89 @@
> > +DPDK_1.8 {
> > + global:
> > + rte_eal_alarm_set;
> > + rte_eal_alarm_cancel;
> > + rte_exit;
> > + rte_cpu_get_flag_enabled;
> > + rte_cpu_check_supported;
> > + rte_get_tsc_hz;
> > + rte_get_hpet_cycles;
> > + rte_get_hpet_hz;
> > + rte_eal_hpet_init;
> > + rte_delay_us;
> > + rte_dump_stack;
> > + rte_dump_registers;
> > + __rte_panic;
> > + rte_eal_devargs_add;
> > + rte_eal_devargs_type_count;
> > + rte_eal_devargs_dump;
> > + rte_eal_driver_register;
> > + rte_eal_driver_unregister;
> > + rte_eal_dev_init;
> > + rte_eal_init;
> > + rte_set_application_usage_hook;
> > + rte_eal_has_hugepages;
> > + rte_strerror;
> > + rte_hexdump;
> > + rte_memdump;
> > + rte_intr_callback_register;
> > + rte_intr_callback_unregister;
> > + rte_intr_enable;
> > + rte_intr_disable;
> > + rte_eal_remote_launch;
> > + rte_eal_mp_remote_launch;
> > + rte_eal_get_lcore_state;
> > + rte_eal_wait_lcore;
> > + rte_eal_mp_wait_lcore;
> > + rte_openlog_stream;
> > + rte_set_log_level;
> > + rte_set_log_type;
> > + rte_log_cur_msg_loglevel;
> > + rte_log_cur_msg_logtype;
> > + rte_log_set_history;
> > + rte_log_dump_history;
> > + rte_log_add_in_history;
> > + rte_log;
> > + rte_vlog;
> > + rte_mem_lock_page;
> > + rte_mem_virt2phy;
> > + rte_eal_get_physmem_layout;
> > + rte_dump_physmem_layout;
> > + rte_eal_get_physmem_size;
> > + rte_memory_get_nchannel;
> > + rte_memory_get_nrank;
> > + rte_mem_phy2mch;
> > + rte_xen_dom0_memory_init;
> > + rte_xen_dom0_memory_attach;
> > + rte_memzone_reserve;
> > + rte_memzone_reserve_aligned;
> > + rte_memzone_reserve_bounded;
> > + rte_memzone_lookup;
> > + rte_memzone_dump;
> > + rte_memzone_walk;
> > + rte_eal_pci_probe;
> > + rte_eal_pci_dump;
> > + rte_eal_pci_register;
> > + rte_eal_pci_unregister;
> > + rte_snprintf;
> > + rte_strsplit;
> > + rte_eal_tailq_reserve;
> > + rte_eal_tailq_reserve_by_idx;
> > + rte_dump_tailq;
> > + rte_eal_tailq_lookup;
> > + rte_eal_tailq_lookup_by_idx;
> > + lcore_config;
> > + per_lcore__lcore_id;
> > + eal_timer_source;
> > + rte_cycles_vmware_tsc_map;
> > + rte_eal_get_configuration;
> > + rte_logs;
> > + rte_eal_lcore_role;
> > + test_mp_secondary;
> > + rte_eal_process_type;
> > + per_lcore__rte_errno;
> > + pci_device_list;
> > + devargs_list;
> > + eal_parse_sysfs_value;
> > +
> > + local: *;
> > +};
> > diff --git a/lib/librte_ether/Makefile b/lib/librte_ether/Makefile
> > index b310f8b..f40b5cc 100644
> > --- a/lib/librte_ether/Makefile
> > +++ b/lib/librte_ether/Makefile
> > @@ -39,6 +39,8 @@ LIB = libethdev.a
> > CFLAGS += -O3
> > CFLAGS += $(WERROR_FLAGS)
> >
> > +EXPORT_MAP := $(RTE_SDK)/lib/librte_ether/rte_ether_version.map
> > +
> > SRCS-y += rte_ethdev.c
> >
> > #
> > diff --git a/lib/librte_ether/rte_ether_version.map b/lib/librte_ether/rte_ether_version.map
> > new file mode 100644
> > index 0000000..41952ab
> > --- /dev/null
> > +++ b/lib/librte_ether/rte_ether_version.map
> > @@ -0,0 +1,108 @@
> > +DPDK_1.8 {
> > + global:
> > + rte_eth_driver_register;
> > + rte_eth_dev_configure;
> > + rte_eth_rx_queue_setup;
> > + rte_eth_tx_queue_setup;
> > + rte_eth_dev_socket_id;
> > + rte_eth_dev_rx_queue_start;
> > + rte_eth_dev_rx_queue_stop;
> > + rte_eth_dev_tx_queue_start;
> > + rte_eth_dev_tx_queue_stop;
> > + rte_eth_dev_start;
> > + rte_eth_dev_stop;
> > + rte_eth_dev_set_link_up;
> > + rte_eth_dev_set_link_down;
> > + rte_eth_dev_close;
> > + rte_eth_promiscuous_enable;
> > + rte_eth_promiscuous_disable;
> > + rte_eth_promiscuous_get;
> > + rte_eth_allmulticast_enable;
> > + rte_eth_allmulticast_disable;
> > + rte_eth_allmulticast_get;
> > + rte_eth_link;
> > + rte_eth_link_get_nowait;
> > + rte_eth_stats;
> > + rte_eth_stats_reset;
> > + rte_eth_dev_set_tx_queue_stats_mapping;
> > + rte_eth_dev_set_rx_queue_stats_mapping;
> > + rte_eth_macaddr_get;
> > + rte_eth_dev_info_get;
> > + rte_eth_dev_get_mtu;
> > + rte_eth_dev_set_mtu;
> > + rte_eth_dev_vlan_filter;
> > + rte_eth_dev_set_vlan_strip_on_queue;
> > + rte_eth_dev_set_vlan_ether_type;
> > + rte_eth_dev_set_vlan_offload;
> > + rte_eth_dev_get_vlan_offload;
> > + rte_eth_dev_set_vlan_pvid;
> > + rte_eth_rx_burst;
> > + rte_eth_rx_queue_count;
> > + rte_eth_rx_descriptor_done;
> > + rte_eth_tx_burst;
> > + rte_eth_dev_fdir_add_signature_filter;
> > + rte_eth_dev_fdir_update_signature_filter;
> > + rte_eth_dev_fdir_remove_signature_filter;
> > + rte_eth_dev_fdir_get_infos;
> > + rte_eth_dev_fdir_add_perfect_filter;
> > + rte_eth_dev_fdir_update_perfect_filter;
> > + rte_eth_dev_fdir_remove_perfect_filter;
> > + rte_eth_dev_fdir_set_masks;
> > + rte_eth_dev_callback_register;
> > + rte_eth_dev_callback_unregister;
> > + rte_eth_dev_callback_process;
> > + rte_eth_led_on;
> > + rte_eth_led_off;
> > + rte_eth_dev_flow_ctrl_get;
> > + rte_eth_dev_flow_ctrl_set;
> > + rte_eth_dev_priority_flow_ctrl_set;
> > + rte_eth_dev_mac_addr_add;
> > + rte_eth_dev_mac_addr_remove;
> > + rte_eth_dev_rss_reta_update;
> > + rte_eth_dev_rss_reta_query;
> > + rte_eth_dev_uc_hash_table_set;
> > + rte_eth_dev_uc_all_hash_table_set;
> > + rte_eth_dev_set_vf_rxmode;
> > + rte_eth_dev_set_vf_tx;
> > + rte_eth_dev_set_vf_rx;
> > + rte_eth_dev_set_vf_vlan_filter;
> > + rte_eth_mirror_rule_set;
> > + rte_eth_mirror_rule_reset;
> > + rte_eth_set_queue_rate_limit;
> > + rte_eth_set_vf_rate_limit;
> > + rte_eth_dev_bypass_init;
> > + rte_eth_dev_bypass_state_show;
> > + rte_eth_dev_bypass_state_set;
> > + rte_eth_dev_bypass_event_show;
> > + rte_eth_dev_bypass_event_store;
> > + rte_eth_dev_wd_timeout_store;
> > + rte_eth_dev_bypass_ver_show;
> > + rte_eth_dev_bypass_wd_timeout_show;
> > + rte_eth_dev_bypass_wd_reset;
> > + rte_eth_dev_rss_hash_update;
> > + rte_eth_dev_rss_hash_conf_get;
> > + rte_eth_dev_add_syn_filter;
> > + rte_eth_dev_remove_syn_filter;
> > + rte_eth_dev_get_syn_filter;
> > + rte_eth_dev_add_ethertype_filter;
> > + rte_eth_dev_remove_ethertype_filter;
> > + rte_eth_dev_get_ethertype_filter;
> > + rte_eth_dev_add_2tuple_filter;
> > + rte_eth_dev_remove_2tuple_filter;
> > + rte_eth_dev_get_2tuple_filter;
> > + rte_eth_dev_add_5tuple_filter;
> > + rte_eth_dev_remove_5tuple_filter;
> > + rte_eth_dev_get_5tuple_filter;
> > + rte_eth_dev_add_flex_filter;
> > + rte_eth_dev_remove_flex_filter;
> > + rte_eth_dev_get_flex_filter;
> > + rte_eth_dev_count;
> > + rte_eth_link_get;
> > + rte_eth_devices;
> > + rte_eth_stats_get;
> > + rte_eth_dev_allocate;
> > + _rte_eth_dev_callback_process;
> > +
> > + local: *;
> > +};
> > +
> > diff --git a/lib/librte_hash/Makefile b/lib/librte_hash/Makefile
> > index 95e4c09..a449ec2 100644
> > --- a/lib/librte_hash/Makefile
> > +++ b/lib/librte_hash/Makefile
> > @@ -37,6 +37,8 @@ LIB = librte_hash.a
> > CFLAGS += -O3
> > CFLAGS += $(WERROR_FLAGS) -I$(SRCDIR)
> >
> > +EXPORT_MAP := $(RTE_SDK)/lib/librte_hash/rte_hash_version.map
> > +
> > # all source are stored in SRCS-y
> > SRCS-$(CONFIG_RTE_LIBRTE_HASH) := rte_hash.c
> > SRCS-$(CONFIG_RTE_LIBRTE_HASH) += rte_fbk_hash.c
> > diff --git a/lib/librte_hash/rte_hash_version.map b/lib/librte_hash/rte_hash_version.map
> > new file mode 100644
> > index 0000000..2a34313
> > --- /dev/null
> > +++ b/lib/librte_hash/rte_hash_version.map
> > @@ -0,0 +1,18 @@
> > +DPDK_1.8 {
> > + global:
> > + rte_fbk_hash_find_existing;
> > + rte_fbk_hash_create;
> > + rte_fbk_hash_free;
> > + rte_hash_create;
> > + rte_hash_find_existing;
> > + rte_hash_free;
> > + rte_hash_add_key;
> > + rte_hash_add_key_with_hash;
> > + rte_hash_del_key;
> > + rte_hash_del_key_with_hash;
> > + rte_hash_lookup;
> > + rte_hash_lookup_with_hash;
> > + rte_hash_lookup_bulk;
> > +
> > + local: *;
> > +};
> > diff --git a/lib/librte_ip_frag/Makefile b/lib/librte_ip_frag/Makefile
> > index 2265c93..ede5a89 100644
> > --- a/lib/librte_ip_frag/Makefile
> > +++ b/lib/librte_ip_frag/Makefile
> > @@ -37,6 +37,8 @@ LIB = librte_ip_frag.a
> > CFLAGS += -O3
> > CFLAGS += $(WERROR_FLAGS) -I$(SRCDIR)
> >
> > +EXPORT_MAP := $(RTE_SDK)/lib/librte_ip_frag/rte_ipfrag_version.map
> > +
> > #source files
> > SRCS-$(CONFIG_RTE_LIBRTE_IP_FRAG) += rte_ipv4_fragmentation.c
> > SRCS-$(CONFIG_RTE_LIBRTE_IP_FRAG) += rte_ipv4_reassembly.c
> > diff --git a/lib/librte_ip_frag/rte_ipfrag_version.map b/lib/librte_ip_frag/rte_ipfrag_version.map
> > new file mode 100644
> > index 0000000..afe1a0b
> > --- /dev/null
> > +++ b/lib/librte_ip_frag/rte_ipfrag_version.map
> > @@ -0,0 +1,14 @@
> > +DPDK_1.8 {
> > + global:
> > +
> > + rte_ip_frag_table_create;
> > + rte_ipv6_fragment_packet;
> > + rte_ipv6_frag_reassemble_packet;
> > + rte_ipv4_fragment_packet;
> > + rte_ipv4_frag_reassemble_packet;
> > + rte_ip_frag_free_death_row;
> > + rte_ip_frag_table_statistics_dump;
> > +
> > + local: *;
> > +};
> > +
> > diff --git a/lib/librte_ivshmem/Makefile b/lib/librte_ivshmem/Makefile
> > index 536814c..be6f21a 100644
> > --- a/lib/librte_ivshmem/Makefile
> > +++ b/lib/librte_ivshmem/Makefile
> > @@ -36,6 +36,8 @@ LIB = librte_ivshmem.a
> >
> > CFLAGS += $(WERROR_FLAGS) -I$(SRCDIR) -O3
> >
> > +EXPORT_MAPS := $(RTE_SDK)/lib/librte_ivshmem/rte_ivshmem_version.map
> > +
> > # all source are stored in SRCS-y
> > SRCS-$(CONFIG_RTE_LIBRTE_IVSHMEM) := rte_ivshmem.c
> >
> > diff --git a/lib/librte_ivshmem/rte_ivshmem_version.map b/lib/librte_ivshmem/rte_ivshmem_version.map
> > new file mode 100644
> > index 0000000..a204339
> > --- /dev/null
> > +++ b/lib/librte_ivshmem/rte_ivshmem_version.map
> > @@ -0,0 +1,13 @@
> > +DPDK_1.8 {
> > + global:
> > +
> > + rte_ivshmem_metadata_create;
> > + rte_ivshmem_metadata_add_memzone;
> > + rte_ivshmem_metadata_add_ring;
> > + rte_ivshmem_metadata_add_mempool;
> > + rte_ivshmem_metadata_cmdline_generate;
> > + rte_ivshmem_metadata_dump;
> > +
> > + local: *;
> > +};
> > +
> > diff --git a/lib/librte_kni/Makefile b/lib/librte_kni/Makefile
> > index 5267304..c119fc1 100644
> > --- a/lib/librte_kni/Makefile
> > +++ b/lib/librte_kni/Makefile
> > @@ -36,6 +36,8 @@ LIB = librte_kni.a
> >
> > CFLAGS += $(WERROR_FLAGS) -I$(SRCDIR) -O3 -fno-strict-aliasing
> >
> > +EXPORT_MAP := $(RTE_SDK)/lib/librte_kni/rte_kni_version.map
> > +
> > # all source are stored in SRCS-y
> > SRCS-$(CONFIG_RTE_LIBRTE_KNI) := rte_kni.c
> >
> > diff --git a/lib/librte_kni/rte_kni_version.map b/lib/librte_kni/rte_kni_version.map
> > new file mode 100644
> > index 0000000..58fbc1f
> > --- /dev/null
> > +++ b/lib/librte_kni/rte_kni_version.map
> > @@ -0,0 +1,19 @@
> > +DPDK_1.8 {
> > + global:
> > +
> > + rte_kni_alloc;
> > + rte_kni_create;
> > + rte_kni_release;
> > + rte_kni_handle_request;
> > + rte_kni_rx_burst;
> > + rte_kni_tx_burst;
> > + rte_kni_get_port_id;
> > + rte_kni_get;
> > + rte_kni_info_get;
> > + rte_kni_register_handlers;
> > + rte_kni_unregister_handlers;
> > + rte_kni_close;
> > +
> > + local: *;
> > +};
> > +
> > diff --git a/lib/librte_kvargs/Makefile b/lib/librte_kvargs/Makefile
> > index b09359a..83a42b1 100644
> > --- a/lib/librte_kvargs/Makefile
> > +++ b/lib/librte_kvargs/Makefile
> > @@ -38,6 +38,8 @@ LIB = librte_kvargs.a
> >
> > CFLAGS += $(WERROR_FLAGS) -I$(SRCDIR) -O3
> >
> > +EXPORT_MAP := $(RTE_SDK)/lib/librte_kvargs/rte_kvargs_version.map
> > +
> > # all source are stored in SRCS-y
> > SRCS-$(CONFIG_RTE_LIBRTE_KVARGS) := rte_kvargs.c
> >
> > diff --git a/lib/librte_kvargs/rte_kvargs_version.map b/lib/librte_kvargs/rte_kvargs_version.map
> > new file mode 100644
> > index 0000000..7873c8c
> > --- /dev/null
> > +++ b/lib/librte_kvargs/rte_kvargs_version.map
> > @@ -0,0 +1,10 @@
> > +DPDK_1.8 {
> > +
> > + global:
> > + rte_kvargs_parse;
> > + rte_kvargs_free;
> > + rte_kvargs_process;
> > + rte_kvargs_count;
> > +
> > + local: *;
> > +};
> > diff --git a/lib/librte_lpm/Makefile b/lib/librte_lpm/Makefile
> > index fa94163..05de8d9 100644
> > --- a/lib/librte_lpm/Makefile
> > +++ b/lib/librte_lpm/Makefile
> > @@ -37,6 +37,8 @@ LIB = librte_lpm.a
> > CFLAGS += -O3
> > CFLAGS += $(WERROR_FLAGS) -I$(SRCDIR)
> >
> > +EXPORT_MAP := $(RTE_SDK)/lib/librte_lpm/rte_lpm_version.map
> > +
> > # all source are stored in SRCS-y
> > SRCS-$(CONFIG_RTE_LIBRTE_LPM) := rte_lpm.c rte_lpm6.c
> >
> > diff --git a/lib/librte_lpm/rte_lpm_version.map b/lib/librte_lpm/rte_lpm_version.map
> > new file mode 100644
> > index 0000000..8ae9318
> > --- /dev/null
> > +++ b/lib/librte_lpm/rte_lpm_version.map
> > @@ -0,0 +1,24 @@
> > +DPDK_1.8 {
> > + global:
> > +
> > + rte_lpm_create;
> > + rte_lpm_find_existing;
> > + rte_lpm_free;
> > + rte_lpm_add;
> > + rte_lpm_is_rule_present;
> > + rte_lpm_delete;
> > + rte_lpm_delete_all;
> > + rte_lpm6_create;
> > + rte_lpm6_find_existing;
> > + rte_lpm6_free;
> > + rte_lpm6_add;
> > + rte_lpm6_is_rule_present;
> > + rte_lpm6_delete;
> > + rte_lpm6_delete_bulk_func;
> > + rte_lpm6_delete_all;
> > + rte_lpm6_lookup;
> > + rte_lpm6_lookup_bulk_func;
> > +
> > + local: *;
> > +};
> > +
> > diff --git a/lib/librte_malloc/Makefile b/lib/librte_malloc/Makefile
> > index ba87e34..1a5c288 100644
> > --- a/lib/librte_malloc/Makefile
> > +++ b/lib/librte_malloc/Makefile
> > @@ -36,6 +36,8 @@ LIB = librte_malloc.a
> >
> > CFLAGS += $(WERROR_FLAGS) -I$(SRCDIR) -O3
> >
> > +EXPORT_MAP := $(RTE_SDK)/lib/librte_malloc/rte_malloc_version.map
> > +
> > # all source are stored in SRCS-y
> > SRCS-$(CONFIG_RTE_LIBRTE_MALLOC) := rte_malloc.c malloc_elem.c malloc_heap.c
> >
> > diff --git a/lib/librte_malloc/rte_malloc_version.map b/lib/librte_malloc/rte_malloc_version.map
> > new file mode 100644
> > index 0000000..77db879
> > --- /dev/null
> > +++ b/lib/librte_malloc/rte_malloc_version.map
> > @@ -0,0 +1,19 @@
> > +DPDK_1.8 {
> > + global:
> > +
> > + rte_malloc;
> > + rte_zmalloc;
> > + rte_calloc;
> > + rte_realloc;
> > + rte_malloc_socket;
> > + rte_zmalloc_socket;
> > + rte_calloc_socket;
> > + rte_free;
> > + rte_malloc_validate;
> > + rte_malloc_get_socket_stats;
> > + rte_malloc_dump_stats;
> > + rte_malloc_set_limit;
> > + rte_malloc_virt2phy;
> > +
> > + local: *;
> > +};
> > diff --git a/lib/librte_mbuf/Makefile b/lib/librte_mbuf/Makefile
> > index 9b45ba4..5cd4941 100644
> > --- a/lib/librte_mbuf/Makefile
> > +++ b/lib/librte_mbuf/Makefile
> > @@ -36,6 +36,8 @@ LIB = librte_mbuf.a
> >
> > CFLAGS += $(WERROR_FLAGS) -I$(SRCDIR) -O3
> >
> > +EXPORT_MAP := $(RTE_SDK)/lib/librte_mbuf/rte_mbuf_version.map
> > +
> > # all source are stored in SRCS-y
> > SRCS-$(CONFIG_RTE_LIBRTE_MBUF) := rte_mbuf.c
> >
> > diff --git a/lib/librte_mbuf/rte_mbuf_version.map b/lib/librte_mbuf/rte_mbuf_version.map
> > new file mode 100644
> > index 0000000..55e352b
> > --- /dev/null
> > +++ b/lib/librte_mbuf/rte_mbuf_version.map
> > @@ -0,0 +1,12 @@
> > +DPDK_1.8 {
> > + global:
> > +
> > + rte_mbuf_sanity_check;
> > + rte_ctrlmbuf_init;
> > + rte_pktmbuf_init;
> > + rte_pktmbuf_pool_init;
> > + rte_pktmbuf_dump;
> > +
> > + local: *;
> > +};
> > +
> > diff --git a/lib/librte_mempool/Makefile b/lib/librte_mempool/Makefile
> > index 9939e10..07b5b4e 100644
> > --- a/lib/librte_mempool/Makefile
> > +++ b/lib/librte_mempool/Makefile
> > @@ -36,6 +36,8 @@ LIB = librte_mempool.a
> >
> > CFLAGS += $(WERROR_FLAGS) -I$(SRCDIR) -O3
> >
> > +EXPORT_MAP := $(RTE_SDK)/lib/librte_mempool/rte_mempool_version.map
> > +
> > # all source are stored in SRCS-y
> > SRCS-$(CONFIG_RTE_LIBRTE_MEMPOOL) += rte_mempool.c
> > ifeq ($(CONFIG_RTE_LIBRTE_XEN_DOM0),y)
> > diff --git a/lib/librte_mempool/rte_mempool_version.map b/lib/librte_mempool/rte_mempool_version.map
> > new file mode 100644
> > index 0000000..7a19982
> > --- /dev/null
> > +++ b/lib/librte_mempool/rte_mempool_version.map
> > @@ -0,0 +1,18 @@
> > +DPDK_1.8 {
> > + global:
> > +
> > + rte_mempool_create;
> > + rte_mempool_xmem_create;
> > + rte_dom0_mempool_create;
> > + rte_mempool_dump;
> > + rte_mempool_audit;
> > + rte_mempool_list_dump;
> > + rte_mempool_lookup;
> > + rte_mempool_calc_obj_size;
> > + rte_mempool_xmem_size;
> > + rte_mempool_xmem_usage;
> > + rte_mempool_walk;
> > + rte_mempool_count;
> > +
> > + local: *;
> > +};
> > diff --git a/lib/librte_meter/Makefile b/lib/librte_meter/Makefile
> > index b25c0cc..0778690 100644
> > --- a/lib/librte_meter/Makefile
> > +++ b/lib/librte_meter/Makefile
> > @@ -39,6 +39,8 @@ LIB = librte_meter.a
> > CFLAGS += -O3
> > CFLAGS += $(WERROR_FLAGS)
> >
> > +EXPORT_MAP := $(RTE_SDK)/lib/librte_meter/rte_meter_version.map
> > +
> > #
> > # all source are stored in SRCS-y
> > #
> > diff --git a/lib/librte_meter/rte_meter_version.map b/lib/librte_meter/rte_meter_version.map
> > new file mode 100644
> > index 0000000..51a73b1
> > --- /dev/null
> > +++ b/lib/librte_meter/rte_meter_version.map
> > @@ -0,0 +1,13 @@
> > +DPDK_1.8 {
> > + global:
> > +
> > + rte_meter_srtcm_config;
> > + rte_meter_trtcm_config;
> > + rte_meter_srtcm_color_blind_check;
> > + rte_meter_srtcm_color_aware_check;
> > + rte_meter_trtcm_color_blind_check;
> > + rte_meter_trtcm_color_aware_check;
> > +
> > + local: *;
> > +};
> > +
> > diff --git a/lib/librte_pipeline/Makefile b/lib/librte_pipeline/Makefile
> > index cf8fde8..5465d00 100644
> > --- a/lib/librte_pipeline/Makefile
> > +++ b/lib/librte_pipeline/Makefile
> > @@ -39,6 +39,8 @@ LIB = librte_pipeline.a
> > CFLAGS += -O3
> > CFLAGS += $(WERROR_FLAGS)
> >
> > +EXPORT_MAP := $(RTE_SDK)/lib/librte_pipeline/rte_pipeline_version.map
> > +
> > #
> > # all source are stored in SRCS-y
> > #
> > diff --git a/lib/librte_pipeline/rte_pipeline_version.map b/lib/librte_pipeline/rte_pipeline_version.map
> > new file mode 100644
> > index 0000000..f868b96
> > --- /dev/null
> > +++ b/lib/librte_pipeline/rte_pipeline_version.map
> > @@ -0,0 +1,23 @@
> > +DPDK_1.8 {
> > + global:
> > +
> > + rte_pipeline_create;
> > + rte_pipeline_free;
> > + rte_pipeline_check;
> > + rte_pipeline_run;
> > + rte_pipeline_flush;
> > + rte_pipeline_table_create;
> > + rte_pipeline_table_default_entry_add;
> > + rte_pipeline_table_default_entry_delete;
> > + rte_pipeline_table_entry_add;
> > + rte_pipeline_table_entry_delete;
> > + rte_pipeline_port_in_create;
> > + rte_pipeline_port_in_connect_to_table;
> > + rte_pipeline_port_in_enable;
> > + rte_pipeline_port_in_disable;
> > + rte_pipeline_port_out_create;
> > + rte_pipeline_port_out_packet_insert;
> > +
> > + local: *;
> > +};
> > +
> > diff --git a/lib/librte_pmd_bond/Makefile b/lib/librte_pmd_bond/Makefile
> > index 953d75e..5b14ce2 100644
> > --- a/lib/librte_pmd_bond/Makefile
> > +++ b/lib/librte_pmd_bond/Makefile
> > @@ -39,6 +39,8 @@ LIB = librte_pmd_bond.a
> > CFLAGS += -O3
> > CFLAGS += $(WERROR_FLAGS)
> >
> > +EXPORT_MAP := $(RTE_SDK)/lib/librte_pmd_bond/rte_eth_bond_version.map
> > +
> > #
> > # all source are stored in SRCS-y
> > #
> > diff --git a/lib/librte_pmd_bond/rte_eth_bond_version.map b/lib/librte_pmd_bond/rte_eth_bond_version.map
> > new file mode 100644
> > index 0000000..17f0a1f
> > --- /dev/null
> > +++ b/lib/librte_pmd_bond/rte_eth_bond_version.map
> > @@ -0,0 +1,20 @@
> > +DPDK_1.8 {
> > + global:
> > +
> > + rte_eth_bond_create;
> > + rte_eth_bond_slave_add;
> > + rte_eth_bond_slave_remove;
> > + rte_eth_bond_mode_set;
> > + rte_eth_bond_mode_get;
> > + rte_eth_bond_primary_set;
> > + rte_eth_bond_primary_get;
> > + rte_eth_bond_slaves_get;
> > + rte_eth_bond_active_slaves_get;
> > + rte_eth_bond_mac_address_set;
> > + rte_eth_bond_mac_address_reset;
> > + rte_eth_bond_xmit_policy_set;
> > + rte_eth_bond_xmit_policy_get;
> > +
> > +
> > + local: *;
> > +};
> > diff --git a/lib/librte_pmd_e1000/Makefile b/lib/librte_pmd_e1000/Makefile
> > index 14bc4a2..e225bfe 100644
> > --- a/lib/librte_pmd_e1000/Makefile
> > +++ b/lib/librte_pmd_e1000/Makefile
> > @@ -39,6 +39,8 @@ LIB = librte_pmd_e1000.a
> > CFLAGS += -O3
> > CFLAGS += $(WERROR_FLAGS)
> >
> > +EXPORT_MAP := $(RTE_SDK)/lib/librte_pmd_e1000/rte_pmd_e1000_version.map
> > +
> > ifeq ($(CC), icc)
> > #
> > # CFLAGS for icc
> > diff --git a/lib/librte_pmd_e1000/rte_pmd_e1000_version.map b/lib/librte_pmd_e1000/rte_pmd_e1000_version.map
> > new file mode 100644
> > index 0000000..cbc401f
> > --- /dev/null
> > +++ b/lib/librte_pmd_e1000/rte_pmd_e1000_version.map
> > @@ -0,0 +1,5 @@
> > +DPDK_1.8 {
> > +
> > + local: *;
> > +};
> > +
> > diff --git a/lib/librte_pmd_i40e/Makefile b/lib/librte_pmd_i40e/Makefile
> > index 4b31675..cfbe816 100644
> > --- a/lib/librte_pmd_i40e/Makefile
> > +++ b/lib/librte_pmd_i40e/Makefile
> > @@ -39,6 +39,8 @@ LIB = librte_pmd_i40e.a
> > CFLAGS += -O3
> > CFLAGS += $(WERROR_FLAGS)
> >
> > +EXPORT_MAP := $(RTE_SDK)/lib/librte_pmd_i40e/rte_pmd_i40e_version.map
> > +
> > #
> > # Add extra flags for base driver files (also known as shared code)
> > # to disable warnings
> > diff --git a/lib/librte_pmd_i40e/rte_pmd_i40e_version.map b/lib/librte_pmd_i40e/rte_pmd_i40e_version.map
> > new file mode 100644
> > index 0000000..cbc401f
> > --- /dev/null
> > +++ b/lib/librte_pmd_i40e/rte_pmd_i40e_version.map
> > @@ -0,0 +1,5 @@
> > +DPDK_1.8 {
> > +
> > + local: *;
> > +};
> > +
> > diff --git a/lib/librte_pmd_ixgbe/Makefile b/lib/librte_pmd_ixgbe/Makefile
> > index 00ccedb..1dd14a6 100644
> > --- a/lib/librte_pmd_ixgbe/Makefile
> > +++ b/lib/librte_pmd_ixgbe/Makefile
> > @@ -39,6 +39,8 @@ LIB = librte_pmd_ixgbe.a
> > CFLAGS += -O3
> > CFLAGS += $(WERROR_FLAGS)
> >
> > +EXPORT_MAP := $(RTE_SDK)/lib/librte_pmd_ixgbe/rte_pmd_ixgbe_version.map
> > +
> > ifeq ($(CC), icc)
> > #
> > # CFLAGS for icc
> > diff --git a/lib/librte_pmd_ixgbe/rte_pmd_ixgbe_version.map b/lib/librte_pmd_ixgbe/rte_pmd_ixgbe_version.map
> > new file mode 100644
> > index 0000000..cbc401f
> > --- /dev/null
> > +++ b/lib/librte_pmd_ixgbe/rte_pmd_ixgbe_version.map
> > @@ -0,0 +1,5 @@
> > +DPDK_1.8 {
> > +
> > + local: *;
> > +};
> > +
> > diff --git a/lib/librte_pmd_pcap/Makefile b/lib/librte_pmd_pcap/Makefile
> > index c5c214d..fff5572 100644
> > --- a/lib/librte_pmd_pcap/Makefile
> > +++ b/lib/librte_pmd_pcap/Makefile
> > @@ -40,6 +40,8 @@ LIB = librte_pmd_pcap.a
> > CFLAGS += -O3
> > CFLAGS += $(WERROR_FLAGS)
> >
> > +EXPORT_MAP := $(RTE_SDK)/lib/librte_pmd_pcap/rte_pmd_pcap_version.map
> > +
> > #
> > # all source are stored in SRCS-y
> > #
> > diff --git a/lib/librte_pmd_pcap/rte_pmd_pcap_version.map b/lib/librte_pmd_pcap/rte_pmd_pcap_version.map
> > new file mode 100644
> > index 0000000..cbc401f
> > --- /dev/null
> > +++ b/lib/librte_pmd_pcap/rte_pmd_pcap_version.map
> > @@ -0,0 +1,5 @@
> > +DPDK_1.8 {
> > +
> > + local: *;
> > +};
> > +
> > diff --git a/lib/librte_pmd_ring/Makefile b/lib/librte_pmd_ring/Makefile
> > index b57e421..25ad27f 100644
> > --- a/lib/librte_pmd_ring/Makefile
> > +++ b/lib/librte_pmd_ring/Makefile
> > @@ -39,6 +39,8 @@ LIB = librte_pmd_ring.a
> > CFLAGS += -O3
> > CFLAGS += $(WERROR_FLAGS)
> >
> > +EXPORT_MAP := $(RTE_SDK)/lib/librte_pmd_ring/rte_eth_ring_version.map
> > +
> > #
> > # all source are stored in SRCS-y
> > #
> > diff --git a/lib/librte_pmd_ring/rte_eth_ring.c b/lib/librte_pmd_ring/rte_eth_ring.c
> > index 4f1b6ed..df7b583 100644
> > --- a/lib/librte_pmd_ring/rte_eth_ring.c
> > +++ b/lib/librte_pmd_ring/rte_eth_ring.c
> > @@ -473,7 +473,7 @@ out:
> > return ret;
> > }
> >
> > -int
> > +static int
> > rte_pmd_ring_devinit(const char *name, const char *params)
> > {
> > struct rte_kvargs *kvlist;
> > diff --git a/lib/librte_pmd_ring/rte_eth_ring.h b/lib/librte_pmd_ring/rte_eth_ring.h
> > index e6ae19e..d36489a 100644
> > --- a/lib/librte_pmd_ring/rte_eth_ring.h
> > +++ b/lib/librte_pmd_ring/rte_eth_ring.h
> > @@ -50,12 +50,6 @@ int rte_eth_from_rings(const char *name,
> > int rte_eth_ring_pair_create(const char *name, const unsigned numa_node);
> > int rte_eth_ring_pair_attach(const char *name, const unsigned numa_node);
> >
> > -/**
> > - * For use by test apps only. Called as part of EAL init to set up any dummy NICs
> > - * configured on command line.
> > - */
> > -int rte_pmd_ring_devinit(const char *name, const char *params);
> > -
> > #ifdef __cplusplus
> > }
> > #endif
> > diff --git a/lib/librte_pmd_ring/rte_eth_ring_version.map b/lib/librte_pmd_ring/rte_eth_ring_version.map
> > new file mode 100644
> > index 0000000..5edaa3d
> > --- /dev/null
> > +++ b/lib/librte_pmd_ring/rte_eth_ring_version.map
> > @@ -0,0 +1,10 @@
> > +DPDK_1.8 {
> > +
> > + global:
> > +
> > + rte_eth_from_rings;
> > + rte_eth_ring_pair_create;
> > + rte_eth_ring_pair_attach;
> > +
> > + local: *;
> > +};
> > diff --git a/lib/librte_pmd_virtio/Makefile b/lib/librte_pmd_virtio/Makefile
> > index 456095b..bf51bd9 100644
> > --- a/lib/librte_pmd_virtio/Makefile
> > +++ b/lib/librte_pmd_virtio/Makefile
> > @@ -39,6 +39,7 @@ LIB = librte_pmd_virtio_uio.a
> > CFLAGS += -O3
> > CFLAGS += $(WERROR_FLAGS)
> >
> > +EXPORT_MAP := $(RTE_SDK)/lib/librte_pmd_virtio/rte_pmd_virtio_version.map
> >
> > #
> > # all source are stored in SRCS-y
> > diff --git a/lib/librte_pmd_virtio/rte_pmd_virtio_version.map b/lib/librte_pmd_virtio/rte_pmd_virtio_version.map
> > new file mode 100644
> > index 0000000..cbc401f
> > --- /dev/null
> > +++ b/lib/librte_pmd_virtio/rte_pmd_virtio_version.map
> > @@ -0,0 +1,5 @@
> > +DPDK_1.8 {
> > +
> > + local: *;
> > +};
> > +
> > diff --git a/lib/librte_pmd_vmxnet3/Makefile b/lib/librte_pmd_vmxnet3/Makefile
> > index 6872c74..e5a1c6b 100644
> > --- a/lib/librte_pmd_vmxnet3/Makefile
> > +++ b/lib/librte_pmd_vmxnet3/Makefile
> > @@ -66,6 +66,8 @@ endif
> >
> > VPATH += $(RTE_SDK)/lib/librte_pmd_vmxnet3/vmxnet3
> >
> > +EXPORT_MAP := $(RTE_SDK)/lib/librte_pmd_vmxnet3/rte_pmd_vmxnet3_version.map
> > +
> > #
> > # all source are stored in SRCS-y
> > #
> > diff --git a/lib/librte_pmd_vmxnet3/rte_pmd_vmxnet3_version.map b/lib/librte_pmd_vmxnet3/rte_pmd_vmxnet3_version.map
> > new file mode 100644
> > index 0000000..cbc401f
> > --- /dev/null
> > +++ b/lib/librte_pmd_vmxnet3/rte_pmd_vmxnet3_version.map
> > @@ -0,0 +1,5 @@
> > +DPDK_1.8 {
> > +
> > + local: *;
> > +};
> > +
> > diff --git a/lib/librte_pmd_xenvirt/Makefile b/lib/librte_pmd_xenvirt/Makefile
> > index 01bfcaa..0a08b1b 100644
> > --- a/lib/librte_pmd_xenvirt/Makefile
> > +++ b/lib/librte_pmd_xenvirt/Makefile
> > @@ -39,6 +39,8 @@ LIB = librte_pmd_xenvirt.a
> > CFLAGS += -O3
> > CFLAGS += $(WERROR_FLAGS)
> >
> > +EXPORT_MAP := $(RTE_SDK)/lib/librte_pmd_xenvirt/rte_eth_xenvirt_version.map
> > +
> > #
> > # all source are stored in SRCS-y
> > #
> > diff --git a/lib/librte_pmd_xenvirt/rte_eth_xenvirt_version.map b/lib/librte_pmd_xenvirt/rte_eth_xenvirt_version.map
> > new file mode 100644
> > index 0000000..66199b1
> > --- /dev/null
> > +++ b/lib/librte_pmd_xenvirt/rte_eth_xenvirt_version.map
> > @@ -0,0 +1,8 @@
> > +DPDK_1.8 {
> > + global:
> > +
> > + rte_mempool_gntalloc_create;
> > +
> > + local: *;
> > +};
> > +
> > diff --git a/lib/librte_port/Makefile b/lib/librte_port/Makefile
> > index 28793a5..e812bda 100644
> > --- a/lib/librte_port/Makefile
> > +++ b/lib/librte_port/Makefile
> > @@ -39,6 +39,8 @@ LIB = librte_port.a
> > CFLAGS += -O3
> > CFLAGS += $(WERROR_FLAGS)
> >
> > +EXPORT_MAP := $(RTE_SDK)/lib/librte_port/rte_port_version.map
> > +
> > #
> > # all source are stored in SRCS-y
> > #
> > diff --git a/lib/librte_port/rte_port_version.map b/lib/librte_port/rte_port_version.map
> > new file mode 100644
> > index 0000000..57ccaa3
> > --- /dev/null
> > +++ b/lib/librte_port/rte_port_version.map
> > @@ -0,0 +1,18 @@
> > +DPDK_1.8 {
> > + global:
> > + rte_port_ring_reader_ops;
> > + rte_port_ring_writer_ops;
> > + rte_port_ethdev_reader_ops;
> > + rte_port_ethdev_writer_ops;
> > + rte_port_ring_reader_ipv4_frag_ops;
> > + rte_port_ring_writer_ipv4_ras_ops;
> > + rte_port_ring_reader_ops;
> > + rte_port_ring_writer_ops;
> > + rte_port_sched_reader_ops;
> > + rte_port_sched_writer_ops;
> > + rte_port_source_ops;
> > + rte_port_sink_ops;
> > +
> > + local: *;
> > +};
> > +
> > diff --git a/lib/librte_power/Makefile b/lib/librte_power/Makefile
> > index 6185812..26ee542 100644
> > --- a/lib/librte_power/Makefile
> > +++ b/lib/librte_power/Makefile
> > @@ -36,6 +36,8 @@ LIB = librte_power.a
> >
> > CFLAGS += $(WERROR_FLAGS) -I$(SRCDIR) -O3 -fno-strict-aliasing
> >
> > +EXPORT_MAP := $(RTE_SDK)/lib/librte_power/rte_power_version.map
> > +
> > # all source are stored in SRCS-y
> > SRCS-$(CONFIG_RTE_LIBRTE_POWER) := rte_power.c
> >
> > diff --git a/lib/librte_power/rte_power_version.map b/lib/librte_power/rte_power_version.map
> > new file mode 100644
> > index 0000000..3b2375a
> > --- /dev/null
> > +++ b/lib/librte_power/rte_power_version.map
> > @@ -0,0 +1,14 @@
> > +DPDK_1.8 {
> > + global:
> > + rte_power_init;
> > + rte_power_exit;
> > + rte_power_freqs;
> > + rte_power_get_freq;
> > + rte_power_set_freq;
> > + rte_power_freq_up;
> > + rte_power_freq_down;
> > + rte_power_freq_max;
> > + rte_power_freq_min;
> > +
> > + local: *;
> > +};
> > diff --git a/lib/librte_ring/Makefile b/lib/librte_ring/Makefile
> > index 2380a43..0adaa00 100644
> > --- a/lib/librte_ring/Makefile
> > +++ b/lib/librte_ring/Makefile
> > @@ -36,6 +36,8 @@ LIB = librte_ring.a
> >
> > CFLAGS += $(WERROR_FLAGS) -I$(SRCDIR) -O3
> >
> > +EXPORT_MAP := $(RTE_SDK)/lib/librte_ring/rte_ring_version.map
> > +
> > # all source are stored in SRCS-y
> > SRCS-$(CONFIG_RTE_LIBRTE_RING) := rte_ring.c
> >
> > diff --git a/lib/librte_ring/rte_ring_version.map b/lib/librte_ring/rte_ring_version.map
> > new file mode 100644
> > index 0000000..6c28af9
> > --- /dev/null
> > +++ b/lib/librte_ring/rte_ring_version.map
> > @@ -0,0 +1,12 @@
> > +DPDK_1.8 {
> > + global:
> > + rte_ring_get_memsize;
> > + rte_ring_init;
> > + rte_ring_create;
> > + rte_ring_set_water_mark;
> > + rte_ring_dump;
> > + rte_ring_list_dump;
> > + rte_ring_lookup;
> > +
> > + local: *;
> > +};
> > diff --git a/lib/librte_sched/Makefile b/lib/librte_sched/Makefile
> > index 1a25b21..205fb7a 100644
> > --- a/lib/librte_sched/Makefile
> > +++ b/lib/librte_sched/Makefile
> > @@ -41,6 +41,8 @@ CFLAGS += $(WERROR_FLAGS)
> >
> > CFLAGS_rte_red.o := -D_GNU_SOURCE
> >
> > +EXPORT_MAP := $(RTE_SDK)/lib/librte_sched/rte_sched_version.map
> > +
> > #
> > # all source are stored in SRCS-y
> > #
> > diff --git a/lib/librte_sched/rte_sched_version.map b/lib/librte_sched/rte_sched_version.map
> > new file mode 100644
> > index 0000000..b5877ce
> > --- /dev/null
> > +++ b/lib/librte_sched/rte_sched_version.map
> > @@ -0,0 +1,22 @@
> > +DPDK_1.8 {
> > + global:
> > +
> > + rte_approx;
> > + rte_red_rt_data_init;
> > + rte_red_config_init;
> > + rte_sched_port_config;
> > + rte_sched_port_free;
> > + rte_sched_subport_config;
> > + rte_sched_pipe_config;
> > + rte_sched_port_get_memory_footprint;
> > + rte_sched_subport_read_stats;
> > + rte_sched_queue_read_stats;
> > + rte_sched_port_enqueue;
> > + rte_sched_port_dequeue;
> > + rte_red_log2_1_minus_Wq;
> > + rte_red_pow2_frac_inv;
> > + rte_red_rand_val;
> > + rte_red_rand_seed;
> > +
> > + local: *;
> > +};
> > diff --git a/lib/librte_table/Makefile b/lib/librte_table/Makefile
> > index dd684cc..5b54acc 100644
> > --- a/lib/librte_table/Makefile
> > +++ b/lib/librte_table/Makefile
> > @@ -39,6 +39,8 @@ LIB = librte_table.a
> > CFLAGS += -O3
> > CFLAGS += $(WERROR_FLAGS)
> >
> > +EXPORT_MAP := $(RTE_SDK)/lib/librte_table/rte_table_version.map
> > +
> > #
> > # all source are stored in SRCS-y
> > #
> > diff --git a/lib/librte_table/rte_table_version.map b/lib/librte_table/rte_table_version.map
> > new file mode 100644
> > index 0000000..86f16b8
> > --- /dev/null
> > +++ b/lib/librte_table/rte_table_version.map
> > @@ -0,0 +1,22 @@
> > +DPDK_1.8 {
> > + global:
> > +
> > + rte_table_stub_ops;
> > + rte_table_lpm_ops;
> > + rte_table_array_ops;
> > + rte_table_hash_key8_lru_ops;
> > + rte_table_hash_key8_lru_dosig_ops;
> > + rte_table_hash_key8_ext_ops;
> > + rte_table_hash_key8_ext_dosig_ops;
> > + rte_table_lpm_ipv6_ops;
> > + rte_table_hash_key16_lru_ops;
> > + rte_table_hash_key32_lru_ops;
> > + rte_table_hash_key16_ext_ops;
> > + rte_table_hash_key32_ext_ops;
> > + rte_table_acl_ops;
> > + rte_table_hash_lru_ops;
> > + rte_table_hash_ext_ops;
> > +
> > + local: *;
> > +};
> > +
> > diff --git a/lib/librte_timer/Makefile b/lib/librte_timer/Makefile
> > index 07eb0c6..f703e5f 100644
> > --- a/lib/librte_timer/Makefile
> > +++ b/lib/librte_timer/Makefile
> > @@ -36,6 +36,8 @@ LIB = librte_timer.a
> >
> > CFLAGS += $(WERROR_FLAGS) -I$(SRCDIR) -O3
> >
> > +EXPORT_MAP := $(RTE_SDK)/lib/librte_timer/rte_timer_version.map
> > +
> > # all source are stored in SRCS-y
> > SRCS-$(CONFIG_RTE_LIBRTE_TIMER) := rte_timer.c
> >
> > diff --git a/lib/librte_timer/rte_timer_version.map b/lib/librte_timer/rte_timer_version.map
> > new file mode 100644
> > index 0000000..00b6b52
> > --- /dev/null
> > +++ b/lib/librte_timer/rte_timer_version.map
> > @@ -0,0 +1,16 @@
> > +DPDK_1.8 {
> > + global:
> > +
> > + rte_timer_subsystem_init;
> > + rte_timer_init;
> > + rte_timer_reset;
> > + rte_timer_reset_sync;
> > + rte_timer_stop;
> > + rte_timer_stop_sync;
> > + rte_timer_pending;
> > + rte_timer_manage;
> > + rte_timer_dump_stats;
> > +
> > + local: *;
> > +};
> > +
> > --
> > 1.9.3
> >
>
> May need to update some of the version maps with new functions in head.
>
I'm certain we will, but thats a trivial matter once this is integrated.
Neil
> Acked-by: Sergio Gonzalez Monroy <sergio.gonzalez.monroy@intel.com>
>
^ permalink raw reply [flat|nested] 43+ messages in thread
* [dpdk-dev] [PATCH 3/4] Add library version extenstion
2014-09-15 19:23 [dpdk-dev] [PATCH 0/4] Add DSO symbol versioning to support backwards compatibility Neil Horman
2014-09-15 19:23 ` [dpdk-dev] [PATCH 1/4] compat: Add infrastructure to support symbol versioning Neil Horman
2014-09-15 19:23 ` [dpdk-dev] [PATCH 2/4] Provide initial versioning for all DPDK libraries Neil Horman
@ 2014-09-15 19:23 ` Neil Horman
2014-10-01 11:27 ` Sergio Gonzalez Monroy
2014-09-15 19:23 ` [dpdk-dev] [PATCH 4/4] docs: Add ABI documentation Neil Horman
2014-09-18 18:23 ` [dpdk-dev] [PATCH 0/4] Add DSO symbol versioning to support backwards compatibility Thomas Monjalon
4 siblings, 1 reply; 43+ messages in thread
From: Neil Horman @ 2014-09-15 19:23 UTC (permalink / raw)
To: dev
To differentiate libraries that break ABI, we add a library version number
suffix to the library, which must be incremented when a given libraries ABI is
broken. This patch enforces that addition, sets the initial abi soname
extension to 1 for each library and creates a symlink to the base SONAME so that
the test applications will link properly.
Signed-off-by: Neil Horman <nhorman@tuxdriver.com>
CC: Thomas Monjalon <thomas.monjalon@6wind.com>
CC: "Richardson, Bruce" <bruce.richardson@intel.com>
---
lib/librte_acl/Makefile | 2 ++
lib/librte_cfgfile/Makefile | 2 ++
lib/librte_cmdline/Makefile | 2 ++
lib/librte_compat/Makefile | 2 ++
lib/librte_distributor/Makefile | 2 ++
lib/librte_eal/bsdapp/eal/Makefile | 2 ++
lib/librte_eal/linuxapp/eal/Makefile | 2 ++
lib/librte_ether/Makefile | 2 ++
lib/librte_hash/Makefile | 2 ++
lib/librte_ip_frag/Makefile | 2 ++
lib/librte_ivshmem/Makefile | 2 ++
lib/librte_kni/Makefile | 2 ++
lib/librte_kvargs/Makefile | 2 ++
lib/librte_lpm/Makefile | 2 ++
lib/librte_malloc/Makefile | 2 ++
lib/librte_mbuf/Makefile | 2 ++
lib/librte_mempool/Makefile | 2 ++
lib/librte_meter/Makefile | 2 ++
lib/librte_pipeline/Makefile | 2 ++
lib/librte_pmd_bond/Makefile | 2 ++
lib/librte_pmd_e1000/Makefile | 2 ++
lib/librte_pmd_i40e/Makefile | 2 ++
lib/librte_pmd_ixgbe/Makefile | 2 ++
lib/librte_pmd_pcap/Makefile | 2 ++
lib/librte_pmd_ring/Makefile | 2 ++
lib/librte_pmd_virtio/Makefile | 2 ++
lib/librte_pmd_vmxnet3/Makefile | 2 ++
lib/librte_pmd_xenvirt/Makefile | 2 ++
lib/librte_port/Makefile | 2 ++
lib/librte_power/Makefile | 2 ++
lib/librte_ring/Makefile | 2 ++
lib/librte_sched/Makefile | 2 ++
lib/librte_table/Makefile | 2 ++
lib/librte_timer/Makefile | 2 ++
mk/rte.lib.mk | 12 +++++++++---
35 files changed, 77 insertions(+), 3 deletions(-)
diff --git a/lib/librte_acl/Makefile b/lib/librte_acl/Makefile
index 1f96645..4db403b 100644
--- a/lib/librte_acl/Makefile
+++ b/lib/librte_acl/Makefile
@@ -39,6 +39,8 @@ CFLAGS += $(WERROR_FLAGS) -I$(SRCDIR)
EXPORT_MAP := $(RTE_SDK)/lib/librte_acl/rte_acl_version.map
+LIBABIVER := 1
+
# all source are stored in SRCS-y
SRCS-$(CONFIG_RTE_LIBRTE_ACL) += tb_mem.c
diff --git a/lib/librte_cfgfile/Makefile b/lib/librte_cfgfile/Makefile
index e655098..1c81579 100644
--- a/lib/librte_cfgfile/Makefile
+++ b/lib/librte_cfgfile/Makefile
@@ -41,6 +41,8 @@ CFLAGS += $(WERROR_FLAGS)
EXPORT_MAP := $(RTE_SDK)/lib/librte_cfgfile/rte_cfgfile_version.map
+LIBABIVER := 1
+
#
# all source are stored in SRCS-y
#
diff --git a/lib/librte_cmdline/Makefile b/lib/librte_cmdline/Makefile
index 1a47173..b0ab5b6 100644
--- a/lib/librte_cmdline/Makefile
+++ b/lib/librte_cmdline/Makefile
@@ -38,6 +38,8 @@ CFLAGS += $(WERROR_FLAGS) -I$(SRCDIR) -O3
EXPORT_MAP := $(RTE_SDK)/lib/librte_cmdline/rte_cmdline_version.map
+LIBABIVER := 1
+
# all source are stored in SRCS-y
SRCS-$(CONFIG_RTE_LIBRTE_CMDLINE) := cmdline.c
SRCS-$(CONFIG_RTE_LIBRTE_CMDLINE) += cmdline_cirbuf.c
diff --git a/lib/librte_compat/Makefile b/lib/librte_compat/Makefile
index a61511a..5f369e5 100644
--- a/lib/librte_compat/Makefile
+++ b/lib/librte_compat/Makefile
@@ -32,6 +32,8 @@
include $(RTE_SDK)/mk/rte.vars.mk
+LIBABIVER := 1
+
# install includes
SYMLINK-y-include := rte_compat.h
diff --git a/lib/librte_distributor/Makefile b/lib/librte_distributor/Makefile
index 97d8bbb..12d9df1 100644
--- a/lib/librte_distributor/Makefile
+++ b/lib/librte_distributor/Makefile
@@ -39,6 +39,8 @@ CFLAGS += $(WERROR_FLAGS) -I$(SRCDIR)
EXPORT_MAP := $(RTE_SDK)/lib/librte_distributor/rte_distributor_version.map
+LIBABIVER := 1
+
# all source are stored in SRCS-y
SRCS-$(CONFIG_RTE_LIBRTE_DISTRIBUTOR) := rte_distributor.c
diff --git a/lib/librte_eal/bsdapp/eal/Makefile b/lib/librte_eal/bsdapp/eal/Makefile
index 2caaf00..2edd880 100644
--- a/lib/librte_eal/bsdapp/eal/Makefile
+++ b/lib/librte_eal/bsdapp/eal/Makefile
@@ -47,6 +47,8 @@ CFLAGS += $(WERROR_FLAGS) -O3
EXPORT_MAP := $(RTE_SDK)/lib/librte_eal/bsdapp/eal/rte_eal_version.map
+LIBABIVER := 1
+
# specific to linuxapp exec-env
SRCS-$(CONFIG_RTE_LIBRTE_EAL_BSDAPP) := eal.c
SRCS-$(CONFIG_RTE_LIBRTE_EAL_BSDAPP) += eal_memory.c
diff --git a/lib/librte_eal/linuxapp/eal/Makefile b/lib/librte_eal/linuxapp/eal/Makefile
index 254d59c..267f2c7 100644
--- a/lib/librte_eal/linuxapp/eal/Makefile
+++ b/lib/librte_eal/linuxapp/eal/Makefile
@@ -35,6 +35,8 @@ LIB = librte_eal.a
EXPORT_MAP := $(RTE_SDK)/lib/librte_eal/linuxapp/eal/rte_eal_version.map
+LIBABIVER := 1
+
VPATH += $(RTE_SDK)/lib/librte_eal/common
CFLAGS += -I$(SRCDIR)/include
diff --git a/lib/librte_ether/Makefile b/lib/librte_ether/Makefile
index f40b5cc..62bcf0c 100644
--- a/lib/librte_ether/Makefile
+++ b/lib/librte_ether/Makefile
@@ -41,6 +41,8 @@ CFLAGS += $(WERROR_FLAGS)
EXPORT_MAP := $(RTE_SDK)/lib/librte_ether/rte_ether_version.map
+LIBABIVER := 1
+
SRCS-y += rte_ethdev.c
#
diff --git a/lib/librte_hash/Makefile b/lib/librte_hash/Makefile
index a449ec2..17778ba 100644
--- a/lib/librte_hash/Makefile
+++ b/lib/librte_hash/Makefile
@@ -39,6 +39,8 @@ CFLAGS += $(WERROR_FLAGS) -I$(SRCDIR)
EXPORT_MAP := $(RTE_SDK)/lib/librte_hash/rte_hash_version.map
+LIBABIVER := 1
+
# all source are stored in SRCS-y
SRCS-$(CONFIG_RTE_LIBRTE_HASH) := rte_hash.c
SRCS-$(CONFIG_RTE_LIBRTE_HASH) += rte_fbk_hash.c
diff --git a/lib/librte_ip_frag/Makefile b/lib/librte_ip_frag/Makefile
index ede5a89..6b496dc 100644
--- a/lib/librte_ip_frag/Makefile
+++ b/lib/librte_ip_frag/Makefile
@@ -39,6 +39,8 @@ CFLAGS += $(WERROR_FLAGS) -I$(SRCDIR)
EXPORT_MAP := $(RTE_SDK)/lib/librte_ip_frag/rte_ipfrag_version.map
+LIBABIVER := 1
+
#source files
SRCS-$(CONFIG_RTE_LIBRTE_IP_FRAG) += rte_ipv4_fragmentation.c
SRCS-$(CONFIG_RTE_LIBRTE_IP_FRAG) += rte_ipv4_reassembly.c
diff --git a/lib/librte_ivshmem/Makefile b/lib/librte_ivshmem/Makefile
index be6f21a..7c8dc17 100644
--- a/lib/librte_ivshmem/Makefile
+++ b/lib/librte_ivshmem/Makefile
@@ -38,6 +38,8 @@ CFLAGS += $(WERROR_FLAGS) -I$(SRCDIR) -O3
EXPORT_MAPS := $(RTE_SDK)/lib/librte_ivshmem/rte_ivshmem_version.map
+LIBABIVER := 1
+
# all source are stored in SRCS-y
SRCS-$(CONFIG_RTE_LIBRTE_IVSHMEM) := rte_ivshmem.c
diff --git a/lib/librte_kni/Makefile b/lib/librte_kni/Makefile
index c119fc1..59abd85 100644
--- a/lib/librte_kni/Makefile
+++ b/lib/librte_kni/Makefile
@@ -38,6 +38,8 @@ CFLAGS += $(WERROR_FLAGS) -I$(SRCDIR) -O3 -fno-strict-aliasing
EXPORT_MAP := $(RTE_SDK)/lib/librte_kni/rte_kni_version.map
+LIBABIVER := 1
+
# all source are stored in SRCS-y
SRCS-$(CONFIG_RTE_LIBRTE_KNI) := rte_kni.c
diff --git a/lib/librte_kvargs/Makefile b/lib/librte_kvargs/Makefile
index 83a42b1..10713db 100644
--- a/lib/librte_kvargs/Makefile
+++ b/lib/librte_kvargs/Makefile
@@ -40,6 +40,8 @@ CFLAGS += $(WERROR_FLAGS) -I$(SRCDIR) -O3
EXPORT_MAP := $(RTE_SDK)/lib/librte_kvargs/rte_kvargs_version.map
+LIBABIVER := 1
+
# all source are stored in SRCS-y
SRCS-$(CONFIG_RTE_LIBRTE_KVARGS) := rte_kvargs.c
diff --git a/lib/librte_lpm/Makefile b/lib/librte_lpm/Makefile
index 05de8d9..c99bfbd 100644
--- a/lib/librte_lpm/Makefile
+++ b/lib/librte_lpm/Makefile
@@ -39,6 +39,8 @@ CFLAGS += $(WERROR_FLAGS) -I$(SRCDIR)
EXPORT_MAP := $(RTE_SDK)/lib/librte_lpm/rte_lpm_version.map
+LIBABIVER := 1
+
# all source are stored in SRCS-y
SRCS-$(CONFIG_RTE_LIBRTE_LPM) := rte_lpm.c rte_lpm6.c
diff --git a/lib/librte_malloc/Makefile b/lib/librte_malloc/Makefile
index 1a5c288..3bb7a99 100644
--- a/lib/librte_malloc/Makefile
+++ b/lib/librte_malloc/Makefile
@@ -34,6 +34,8 @@ include $(RTE_SDK)/mk/rte.vars.mk
# library name
LIB = librte_malloc.a
+LIBABIVER := 1
+
CFLAGS += $(WERROR_FLAGS) -I$(SRCDIR) -O3
EXPORT_MAP := $(RTE_SDK)/lib/librte_malloc/rte_malloc_version.map
diff --git a/lib/librte_mbuf/Makefile b/lib/librte_mbuf/Makefile
index 5cd4941..3cf94d1 100644
--- a/lib/librte_mbuf/Makefile
+++ b/lib/librte_mbuf/Makefile
@@ -38,6 +38,8 @@ CFLAGS += $(WERROR_FLAGS) -I$(SRCDIR) -O3
EXPORT_MAP := $(RTE_SDK)/lib/librte_mbuf/rte_mbuf_version.map
+LIBABIVER := 1
+
# all source are stored in SRCS-y
SRCS-$(CONFIG_RTE_LIBRTE_MBUF) := rte_mbuf.c
diff --git a/lib/librte_mempool/Makefile b/lib/librte_mempool/Makefile
index 07b5b4e..2c2a6e8 100644
--- a/lib/librte_mempool/Makefile
+++ b/lib/librte_mempool/Makefile
@@ -38,6 +38,8 @@ CFLAGS += $(WERROR_FLAGS) -I$(SRCDIR) -O3
EXPORT_MAP := $(RTE_SDK)/lib/librte_mempool/rte_mempool_version.map
+LIBABIVER := 1
+
# all source are stored in SRCS-y
SRCS-$(CONFIG_RTE_LIBRTE_MEMPOOL) += rte_mempool.c
ifeq ($(CONFIG_RTE_LIBRTE_XEN_DOM0),y)
diff --git a/lib/librte_meter/Makefile b/lib/librte_meter/Makefile
index 0778690..f58822e 100644
--- a/lib/librte_meter/Makefile
+++ b/lib/librte_meter/Makefile
@@ -41,6 +41,8 @@ CFLAGS += $(WERROR_FLAGS)
EXPORT_MAP := $(RTE_SDK)/lib/librte_meter/rte_meter_version.map
+LIBABIVER := 1
+
#
# all source are stored in SRCS-y
#
diff --git a/lib/librte_pipeline/Makefile b/lib/librte_pipeline/Makefile
index 5465d00..df44f51 100644
--- a/lib/librte_pipeline/Makefile
+++ b/lib/librte_pipeline/Makefile
@@ -41,6 +41,8 @@ CFLAGS += $(WERROR_FLAGS)
EXPORT_MAP := $(RTE_SDK)/lib/librte_pipeline/rte_pipeline_version.map
+LIBABIVER := 1
+
#
# all source are stored in SRCS-y
#
diff --git a/lib/librte_pmd_bond/Makefile b/lib/librte_pmd_bond/Makefile
index 5b14ce2..2f1e83b 100644
--- a/lib/librte_pmd_bond/Makefile
+++ b/lib/librte_pmd_bond/Makefile
@@ -41,6 +41,8 @@ CFLAGS += $(WERROR_FLAGS)
EXPORT_MAP := $(RTE_SDK)/lib/librte_pmd_bond/rte_eth_bond_version.map
+LIBABIVER := 1
+
#
# all source are stored in SRCS-y
#
diff --git a/lib/librte_pmd_e1000/Makefile b/lib/librte_pmd_e1000/Makefile
index e225bfe..a5e3b66 100644
--- a/lib/librte_pmd_e1000/Makefile
+++ b/lib/librte_pmd_e1000/Makefile
@@ -41,6 +41,8 @@ CFLAGS += $(WERROR_FLAGS)
EXPORT_MAP := $(RTE_SDK)/lib/librte_pmd_e1000/rte_pmd_e1000_version.map
+LIBABIVER := 1
+
ifeq ($(CC), icc)
#
# CFLAGS for icc
diff --git a/lib/librte_pmd_i40e/Makefile b/lib/librte_pmd_i40e/Makefile
index cfbe816..d59967a 100644
--- a/lib/librte_pmd_i40e/Makefile
+++ b/lib/librte_pmd_i40e/Makefile
@@ -41,6 +41,8 @@ CFLAGS += $(WERROR_FLAGS)
EXPORT_MAP := $(RTE_SDK)/lib/librte_pmd_i40e/rte_pmd_i40e_version.map
+LIBABIVER := 1
+
#
# Add extra flags for base driver files (also known as shared code)
# to disable warnings
diff --git a/lib/librte_pmd_ixgbe/Makefile b/lib/librte_pmd_ixgbe/Makefile
index 1dd14a6..fd17c09 100644
--- a/lib/librte_pmd_ixgbe/Makefile
+++ b/lib/librte_pmd_ixgbe/Makefile
@@ -41,6 +41,8 @@ CFLAGS += $(WERROR_FLAGS)
EXPORT_MAP := $(RTE_SDK)/lib/librte_pmd_ixgbe/rte_pmd_ixgbe_version.map
+LIBABIVER := 1
+
ifeq ($(CC), icc)
#
# CFLAGS for icc
diff --git a/lib/librte_pmd_pcap/Makefile b/lib/librte_pmd_pcap/Makefile
index fff5572..8f05c2c 100644
--- a/lib/librte_pmd_pcap/Makefile
+++ b/lib/librte_pmd_pcap/Makefile
@@ -42,6 +42,8 @@ CFLAGS += $(WERROR_FLAGS)
EXPORT_MAP := $(RTE_SDK)/lib/librte_pmd_pcap/rte_pmd_pcap_version.map
+LIBABIVER := 1
+
#
# all source are stored in SRCS-y
#
diff --git a/lib/librte_pmd_ring/Makefile b/lib/librte_pmd_ring/Makefile
index 25ad27f..24c57fc 100644
--- a/lib/librte_pmd_ring/Makefile
+++ b/lib/librte_pmd_ring/Makefile
@@ -41,6 +41,8 @@ CFLAGS += $(WERROR_FLAGS)
EXPORT_MAP := $(RTE_SDK)/lib/librte_pmd_ring/rte_eth_ring_version.map
+LIBABIVER := 1
+
#
# all source are stored in SRCS-y
#
diff --git a/lib/librte_pmd_virtio/Makefile b/lib/librte_pmd_virtio/Makefile
index bf51bd9..d0bec84 100644
--- a/lib/librte_pmd_virtio/Makefile
+++ b/lib/librte_pmd_virtio/Makefile
@@ -41,6 +41,8 @@ CFLAGS += $(WERROR_FLAGS)
EXPORT_MAP := $(RTE_SDK)/lib/librte_pmd_virtio/rte_pmd_virtio_version.map
+LIBABIVER := 1
+
#
# all source are stored in SRCS-y
#
diff --git a/lib/librte_pmd_vmxnet3/Makefile b/lib/librte_pmd_vmxnet3/Makefile
index e5a1c6b..2b418f4 100644
--- a/lib/librte_pmd_vmxnet3/Makefile
+++ b/lib/librte_pmd_vmxnet3/Makefile
@@ -68,6 +68,8 @@ VPATH += $(RTE_SDK)/lib/librte_pmd_vmxnet3/vmxnet3
EXPORT_MAP := $(RTE_SDK)/lib/librte_pmd_vmxnet3/rte_pmd_vmxnet3_version.map
+LIBABIVER := 1
+
#
# all source are stored in SRCS-y
#
diff --git a/lib/librte_pmd_xenvirt/Makefile b/lib/librte_pmd_xenvirt/Makefile
index 0a08b1b..6132c1c 100644
--- a/lib/librte_pmd_xenvirt/Makefile
+++ b/lib/librte_pmd_xenvirt/Makefile
@@ -41,6 +41,8 @@ CFLAGS += $(WERROR_FLAGS)
EXPORT_MAP := $(RTE_SDK)/lib/librte_pmd_xenvirt/rte_eth_xenvirt_version.map
+LIBABIVER := 1
+
#
# all source are stored in SRCS-y
#
diff --git a/lib/librte_port/Makefile b/lib/librte_port/Makefile
index e812bda..828692f 100644
--- a/lib/librte_port/Makefile
+++ b/lib/librte_port/Makefile
@@ -41,6 +41,8 @@ CFLAGS += $(WERROR_FLAGS)
EXPORT_MAP := $(RTE_SDK)/lib/librte_port/rte_port_version.map
+LIBABIVER := 1
+
#
# all source are stored in SRCS-y
#
diff --git a/lib/librte_power/Makefile b/lib/librte_power/Makefile
index 26ee542..3261176 100644
--- a/lib/librte_power/Makefile
+++ b/lib/librte_power/Makefile
@@ -38,6 +38,8 @@ CFLAGS += $(WERROR_FLAGS) -I$(SRCDIR) -O3 -fno-strict-aliasing
EXPORT_MAP := $(RTE_SDK)/lib/librte_power/rte_power_version.map
+LIBABIVER := 1
+
# all source are stored in SRCS-y
SRCS-$(CONFIG_RTE_LIBRTE_POWER) := rte_power.c
diff --git a/lib/librte_ring/Makefile b/lib/librte_ring/Makefile
index 0adaa00..fa697ea 100644
--- a/lib/librte_ring/Makefile
+++ b/lib/librte_ring/Makefile
@@ -38,6 +38,8 @@ CFLAGS += $(WERROR_FLAGS) -I$(SRCDIR) -O3
EXPORT_MAP := $(RTE_SDK)/lib/librte_ring/rte_ring_version.map
+LIBABIVER := 1
+
# all source are stored in SRCS-y
SRCS-$(CONFIG_RTE_LIBRTE_RING) := rte_ring.c
diff --git a/lib/librte_sched/Makefile b/lib/librte_sched/Makefile
index 205fb7a..1a54bf9 100644
--- a/lib/librte_sched/Makefile
+++ b/lib/librte_sched/Makefile
@@ -43,6 +43,8 @@ CFLAGS_rte_red.o := -D_GNU_SOURCE
EXPORT_MAP := $(RTE_SDK)/lib/librte_sched/rte_sched_version.map
+LIBABIVER := 1
+
#
# all source are stored in SRCS-y
#
diff --git a/lib/librte_table/Makefile b/lib/librte_table/Makefile
index 5b54acc..29b768c 100644
--- a/lib/librte_table/Makefile
+++ b/lib/librte_table/Makefile
@@ -41,6 +41,8 @@ CFLAGS += $(WERROR_FLAGS)
EXPORT_MAP := $(RTE_SDK)/lib/librte_table/rte_table_version.map
+LIBABIVER := 1
+
#
# all source are stored in SRCS-y
#
diff --git a/lib/librte_timer/Makefile b/lib/librte_timer/Makefile
index f703e5f..01772c7 100644
--- a/lib/librte_timer/Makefile
+++ b/lib/librte_timer/Makefile
@@ -38,6 +38,8 @@ CFLAGS += $(WERROR_FLAGS) -I$(SRCDIR) -O3
EXPORT_MAP := $(RTE_SDK)/lib/librte_timer/rte_timer_version.map
+LIBABIVER := 1
+
# all source are stored in SRCS-y
SRCS-$(CONFIG_RTE_LIBRTE_TIMER) := rte_timer.c
diff --git a/mk/rte.lib.mk b/mk/rte.lib.mk
index 82ac309..4d55cc9 100644
--- a/mk/rte.lib.mk
+++ b/mk/rte.lib.mk
@@ -37,10 +37,8 @@ include $(RTE_SDK)/mk/internal/rte.depdirs-pre.mk
# VPATH contains at least SRCDIR
VPATH += $(SRCDIR)
-
ifeq ($(RTE_BUILD_SHARED_LIB),y)
-LIB := $(patsubst %.a,%.so,$(LIB))
-
+LIB := $(patsubst %.a,%.so.$(LIBABIVER),$(LIB))
CPU_LDFLAGS += --version-script=$(EXPORT_MAP)
endif
@@ -63,6 +61,7 @@ build: _postbuild
exe2cmd = $(strip $(call dotfile,$(patsubst %,%.cmd,$(1))))
+
ifeq ($(LINK_USING_CC),1)
# Override the definition of LD here, since we're linking with CC
LD := $(CC)
@@ -112,6 +111,10 @@ lib_dir = [ -d $(RTE_OUTPUT)/lib ] || mkdir -p $(RTE_OUTPUT)/lib;
#
ifeq ($(RTE_BUILD_SHARED_LIB),y)
$(LIB): $(OBJS-y) $(DEP_$(LIB)) FORCE
+ifeq ($(LIBABIVER),)
+ @echo "Must Specify a $(LIB) ABI version"
+ @exit 1
+endif
@[ -d $(dir $@) ] || mkdir -p $(dir $@)
$(if $(D),\
@echo -n "$< -> $@ " ; \
@@ -125,6 +128,7 @@ $(LIB): $(OBJS-y) $(DEP_$(LIB)) FORCE
$(depfile_missing),\
$(depfile_newer)),\
$(O_TO_S_DO))
+
ifeq ($(RTE_BUILD_COMBINE_LIBS),y)
$(if $(or \
$(file_missing),\
@@ -162,10 +166,12 @@ endif
# install lib in $(RTE_OUTPUT)/lib
#
$(RTE_OUTPUT)/lib/$(LIB): $(LIB)
+ $(eval LIBSONAME := $(basename $(LIB)))
@echo " INSTALL-LIB $(LIB)"
@[ -d $(RTE_OUTPUT)/lib ] || mkdir -p $(RTE_OUTPUT)/lib
ifneq ($(LIB),)
$(Q)cp -f $(LIB) $(RTE_OUTPUT)/lib
+ $(Q)ln -s -f $(RTE_OUTPUT)/lib/$(LIB) $(RTE_OUTPUT)/lib/$(LIBSONAME)
endif
#
--
1.9.3
^ permalink raw reply [flat|nested] 43+ messages in thread
* Re: [dpdk-dev] [PATCH 3/4] Add library version extenstion
2014-09-15 19:23 ` [dpdk-dev] [PATCH 3/4] Add library version extenstion Neil Horman
@ 2014-10-01 11:27 ` Sergio Gonzalez Monroy
0 siblings, 0 replies; 43+ messages in thread
From: Sergio Gonzalez Monroy @ 2014-10-01 11:27 UTC (permalink / raw)
To: Neil Horman; +Cc: dev
Acked-by: Sergio Gonzalez Monroy <sergio.gonzalez.monroy@intel.com>
On Mon, Sep 15, 2014 at 03:23:50PM -0400, Neil Horman wrote:
> To differentiate libraries that break ABI, we add a library version number
> suffix to the library, which must be incremented when a given libraries ABI is
> broken. This patch enforces that addition, sets the initial abi soname
> extension to 1 for each library and creates a symlink to the base SONAME so that
> the test applications will link properly.
>
> Signed-off-by: Neil Horman <nhorman@tuxdriver.com>
> CC: Thomas Monjalon <thomas.monjalon@6wind.com>
> CC: "Richardson, Bruce" <bruce.richardson@intel.com>
> ---
> lib/librte_acl/Makefile | 2 ++
> lib/librte_cfgfile/Makefile | 2 ++
> lib/librte_cmdline/Makefile | 2 ++
> lib/librte_compat/Makefile | 2 ++
> lib/librte_distributor/Makefile | 2 ++
> lib/librte_eal/bsdapp/eal/Makefile | 2 ++
> lib/librte_eal/linuxapp/eal/Makefile | 2 ++
> lib/librte_ether/Makefile | 2 ++
> lib/librte_hash/Makefile | 2 ++
> lib/librte_ip_frag/Makefile | 2 ++
> lib/librte_ivshmem/Makefile | 2 ++
> lib/librte_kni/Makefile | 2 ++
> lib/librte_kvargs/Makefile | 2 ++
> lib/librte_lpm/Makefile | 2 ++
> lib/librte_malloc/Makefile | 2 ++
> lib/librte_mbuf/Makefile | 2 ++
> lib/librte_mempool/Makefile | 2 ++
> lib/librte_meter/Makefile | 2 ++
> lib/librte_pipeline/Makefile | 2 ++
> lib/librte_pmd_bond/Makefile | 2 ++
> lib/librte_pmd_e1000/Makefile | 2 ++
> lib/librte_pmd_i40e/Makefile | 2 ++
> lib/librte_pmd_ixgbe/Makefile | 2 ++
> lib/librte_pmd_pcap/Makefile | 2 ++
> lib/librte_pmd_ring/Makefile | 2 ++
> lib/librte_pmd_virtio/Makefile | 2 ++
> lib/librte_pmd_vmxnet3/Makefile | 2 ++
> lib/librte_pmd_xenvirt/Makefile | 2 ++
> lib/librte_port/Makefile | 2 ++
> lib/librte_power/Makefile | 2 ++
> lib/librte_ring/Makefile | 2 ++
> lib/librte_sched/Makefile | 2 ++
> lib/librte_table/Makefile | 2 ++
> lib/librte_timer/Makefile | 2 ++
> mk/rte.lib.mk | 12 +++++++++---
> 35 files changed, 77 insertions(+), 3 deletions(-)
>
> diff --git a/lib/librte_acl/Makefile b/lib/librte_acl/Makefile
> index 1f96645..4db403b 100644
> --- a/lib/librte_acl/Makefile
> +++ b/lib/librte_acl/Makefile
> @@ -39,6 +39,8 @@ CFLAGS += $(WERROR_FLAGS) -I$(SRCDIR)
>
> EXPORT_MAP := $(RTE_SDK)/lib/librte_acl/rte_acl_version.map
>
> +LIBABIVER := 1
> +
> # all source are stored in SRCS-y
> SRCS-$(CONFIG_RTE_LIBRTE_ACL) += tb_mem.c
>
> diff --git a/lib/librte_cfgfile/Makefile b/lib/librte_cfgfile/Makefile
> index e655098..1c81579 100644
> --- a/lib/librte_cfgfile/Makefile
> +++ b/lib/librte_cfgfile/Makefile
> @@ -41,6 +41,8 @@ CFLAGS += $(WERROR_FLAGS)
>
> EXPORT_MAP := $(RTE_SDK)/lib/librte_cfgfile/rte_cfgfile_version.map
>
> +LIBABIVER := 1
> +
> #
> # all source are stored in SRCS-y
> #
> diff --git a/lib/librte_cmdline/Makefile b/lib/librte_cmdline/Makefile
> index 1a47173..b0ab5b6 100644
> --- a/lib/librte_cmdline/Makefile
> +++ b/lib/librte_cmdline/Makefile
> @@ -38,6 +38,8 @@ CFLAGS += $(WERROR_FLAGS) -I$(SRCDIR) -O3
>
> EXPORT_MAP := $(RTE_SDK)/lib/librte_cmdline/rte_cmdline_version.map
>
> +LIBABIVER := 1
> +
> # all source are stored in SRCS-y
> SRCS-$(CONFIG_RTE_LIBRTE_CMDLINE) := cmdline.c
> SRCS-$(CONFIG_RTE_LIBRTE_CMDLINE) += cmdline_cirbuf.c
> diff --git a/lib/librte_compat/Makefile b/lib/librte_compat/Makefile
> index a61511a..5f369e5 100644
> --- a/lib/librte_compat/Makefile
> +++ b/lib/librte_compat/Makefile
> @@ -32,6 +32,8 @@
> include $(RTE_SDK)/mk/rte.vars.mk
>
>
> +LIBABIVER := 1
> +
> # install includes
> SYMLINK-y-include := rte_compat.h
>
> diff --git a/lib/librte_distributor/Makefile b/lib/librte_distributor/Makefile
> index 97d8bbb..12d9df1 100644
> --- a/lib/librte_distributor/Makefile
> +++ b/lib/librte_distributor/Makefile
> @@ -39,6 +39,8 @@ CFLAGS += $(WERROR_FLAGS) -I$(SRCDIR)
>
> EXPORT_MAP := $(RTE_SDK)/lib/librte_distributor/rte_distributor_version.map
>
> +LIBABIVER := 1
> +
> # all source are stored in SRCS-y
> SRCS-$(CONFIG_RTE_LIBRTE_DISTRIBUTOR) := rte_distributor.c
>
> diff --git a/lib/librte_eal/bsdapp/eal/Makefile b/lib/librte_eal/bsdapp/eal/Makefile
> index 2caaf00..2edd880 100644
> --- a/lib/librte_eal/bsdapp/eal/Makefile
> +++ b/lib/librte_eal/bsdapp/eal/Makefile
> @@ -47,6 +47,8 @@ CFLAGS += $(WERROR_FLAGS) -O3
>
> EXPORT_MAP := $(RTE_SDK)/lib/librte_eal/bsdapp/eal/rte_eal_version.map
>
> +LIBABIVER := 1
> +
> # specific to linuxapp exec-env
> SRCS-$(CONFIG_RTE_LIBRTE_EAL_BSDAPP) := eal.c
> SRCS-$(CONFIG_RTE_LIBRTE_EAL_BSDAPP) += eal_memory.c
> diff --git a/lib/librte_eal/linuxapp/eal/Makefile b/lib/librte_eal/linuxapp/eal/Makefile
> index 254d59c..267f2c7 100644
> --- a/lib/librte_eal/linuxapp/eal/Makefile
> +++ b/lib/librte_eal/linuxapp/eal/Makefile
> @@ -35,6 +35,8 @@ LIB = librte_eal.a
>
> EXPORT_MAP := $(RTE_SDK)/lib/librte_eal/linuxapp/eal/rte_eal_version.map
>
> +LIBABIVER := 1
> +
> VPATH += $(RTE_SDK)/lib/librte_eal/common
>
> CFLAGS += -I$(SRCDIR)/include
> diff --git a/lib/librte_ether/Makefile b/lib/librte_ether/Makefile
> index f40b5cc..62bcf0c 100644
> --- a/lib/librte_ether/Makefile
> +++ b/lib/librte_ether/Makefile
> @@ -41,6 +41,8 @@ CFLAGS += $(WERROR_FLAGS)
>
> EXPORT_MAP := $(RTE_SDK)/lib/librte_ether/rte_ether_version.map
>
> +LIBABIVER := 1
> +
> SRCS-y += rte_ethdev.c
>
> #
> diff --git a/lib/librte_hash/Makefile b/lib/librte_hash/Makefile
> index a449ec2..17778ba 100644
> --- a/lib/librte_hash/Makefile
> +++ b/lib/librte_hash/Makefile
> @@ -39,6 +39,8 @@ CFLAGS += $(WERROR_FLAGS) -I$(SRCDIR)
>
> EXPORT_MAP := $(RTE_SDK)/lib/librte_hash/rte_hash_version.map
>
> +LIBABIVER := 1
> +
> # all source are stored in SRCS-y
> SRCS-$(CONFIG_RTE_LIBRTE_HASH) := rte_hash.c
> SRCS-$(CONFIG_RTE_LIBRTE_HASH) += rte_fbk_hash.c
> diff --git a/lib/librte_ip_frag/Makefile b/lib/librte_ip_frag/Makefile
> index ede5a89..6b496dc 100644
> --- a/lib/librte_ip_frag/Makefile
> +++ b/lib/librte_ip_frag/Makefile
> @@ -39,6 +39,8 @@ CFLAGS += $(WERROR_FLAGS) -I$(SRCDIR)
>
> EXPORT_MAP := $(RTE_SDK)/lib/librte_ip_frag/rte_ipfrag_version.map
>
> +LIBABIVER := 1
> +
> #source files
> SRCS-$(CONFIG_RTE_LIBRTE_IP_FRAG) += rte_ipv4_fragmentation.c
> SRCS-$(CONFIG_RTE_LIBRTE_IP_FRAG) += rte_ipv4_reassembly.c
> diff --git a/lib/librte_ivshmem/Makefile b/lib/librte_ivshmem/Makefile
> index be6f21a..7c8dc17 100644
> --- a/lib/librte_ivshmem/Makefile
> +++ b/lib/librte_ivshmem/Makefile
> @@ -38,6 +38,8 @@ CFLAGS += $(WERROR_FLAGS) -I$(SRCDIR) -O3
>
> EXPORT_MAPS := $(RTE_SDK)/lib/librte_ivshmem/rte_ivshmem_version.map
>
> +LIBABIVER := 1
> +
> # all source are stored in SRCS-y
> SRCS-$(CONFIG_RTE_LIBRTE_IVSHMEM) := rte_ivshmem.c
>
> diff --git a/lib/librte_kni/Makefile b/lib/librte_kni/Makefile
> index c119fc1..59abd85 100644
> --- a/lib/librte_kni/Makefile
> +++ b/lib/librte_kni/Makefile
> @@ -38,6 +38,8 @@ CFLAGS += $(WERROR_FLAGS) -I$(SRCDIR) -O3 -fno-strict-aliasing
>
> EXPORT_MAP := $(RTE_SDK)/lib/librte_kni/rte_kni_version.map
>
> +LIBABIVER := 1
> +
> # all source are stored in SRCS-y
> SRCS-$(CONFIG_RTE_LIBRTE_KNI) := rte_kni.c
>
> diff --git a/lib/librte_kvargs/Makefile b/lib/librte_kvargs/Makefile
> index 83a42b1..10713db 100644
> --- a/lib/librte_kvargs/Makefile
> +++ b/lib/librte_kvargs/Makefile
> @@ -40,6 +40,8 @@ CFLAGS += $(WERROR_FLAGS) -I$(SRCDIR) -O3
>
> EXPORT_MAP := $(RTE_SDK)/lib/librte_kvargs/rte_kvargs_version.map
>
> +LIBABIVER := 1
> +
> # all source are stored in SRCS-y
> SRCS-$(CONFIG_RTE_LIBRTE_KVARGS) := rte_kvargs.c
>
> diff --git a/lib/librte_lpm/Makefile b/lib/librte_lpm/Makefile
> index 05de8d9..c99bfbd 100644
> --- a/lib/librte_lpm/Makefile
> +++ b/lib/librte_lpm/Makefile
> @@ -39,6 +39,8 @@ CFLAGS += $(WERROR_FLAGS) -I$(SRCDIR)
>
> EXPORT_MAP := $(RTE_SDK)/lib/librte_lpm/rte_lpm_version.map
>
> +LIBABIVER := 1
> +
> # all source are stored in SRCS-y
> SRCS-$(CONFIG_RTE_LIBRTE_LPM) := rte_lpm.c rte_lpm6.c
>
> diff --git a/lib/librte_malloc/Makefile b/lib/librte_malloc/Makefile
> index 1a5c288..3bb7a99 100644
> --- a/lib/librte_malloc/Makefile
> +++ b/lib/librte_malloc/Makefile
> @@ -34,6 +34,8 @@ include $(RTE_SDK)/mk/rte.vars.mk
> # library name
> LIB = librte_malloc.a
>
> +LIBABIVER := 1
> +
> CFLAGS += $(WERROR_FLAGS) -I$(SRCDIR) -O3
>
> EXPORT_MAP := $(RTE_SDK)/lib/librte_malloc/rte_malloc_version.map
> diff --git a/lib/librte_mbuf/Makefile b/lib/librte_mbuf/Makefile
> index 5cd4941..3cf94d1 100644
> --- a/lib/librte_mbuf/Makefile
> +++ b/lib/librte_mbuf/Makefile
> @@ -38,6 +38,8 @@ CFLAGS += $(WERROR_FLAGS) -I$(SRCDIR) -O3
>
> EXPORT_MAP := $(RTE_SDK)/lib/librte_mbuf/rte_mbuf_version.map
>
> +LIBABIVER := 1
> +
> # all source are stored in SRCS-y
> SRCS-$(CONFIG_RTE_LIBRTE_MBUF) := rte_mbuf.c
>
> diff --git a/lib/librte_mempool/Makefile b/lib/librte_mempool/Makefile
> index 07b5b4e..2c2a6e8 100644
> --- a/lib/librte_mempool/Makefile
> +++ b/lib/librte_mempool/Makefile
> @@ -38,6 +38,8 @@ CFLAGS += $(WERROR_FLAGS) -I$(SRCDIR) -O3
>
> EXPORT_MAP := $(RTE_SDK)/lib/librte_mempool/rte_mempool_version.map
>
> +LIBABIVER := 1
> +
> # all source are stored in SRCS-y
> SRCS-$(CONFIG_RTE_LIBRTE_MEMPOOL) += rte_mempool.c
> ifeq ($(CONFIG_RTE_LIBRTE_XEN_DOM0),y)
> diff --git a/lib/librte_meter/Makefile b/lib/librte_meter/Makefile
> index 0778690..f58822e 100644
> --- a/lib/librte_meter/Makefile
> +++ b/lib/librte_meter/Makefile
> @@ -41,6 +41,8 @@ CFLAGS += $(WERROR_FLAGS)
>
> EXPORT_MAP := $(RTE_SDK)/lib/librte_meter/rte_meter_version.map
>
> +LIBABIVER := 1
> +
> #
> # all source are stored in SRCS-y
> #
> diff --git a/lib/librte_pipeline/Makefile b/lib/librte_pipeline/Makefile
> index 5465d00..df44f51 100644
> --- a/lib/librte_pipeline/Makefile
> +++ b/lib/librte_pipeline/Makefile
> @@ -41,6 +41,8 @@ CFLAGS += $(WERROR_FLAGS)
>
> EXPORT_MAP := $(RTE_SDK)/lib/librte_pipeline/rte_pipeline_version.map
>
> +LIBABIVER := 1
> +
> #
> # all source are stored in SRCS-y
> #
> diff --git a/lib/librte_pmd_bond/Makefile b/lib/librte_pmd_bond/Makefile
> index 5b14ce2..2f1e83b 100644
> --- a/lib/librte_pmd_bond/Makefile
> +++ b/lib/librte_pmd_bond/Makefile
> @@ -41,6 +41,8 @@ CFLAGS += $(WERROR_FLAGS)
>
> EXPORT_MAP := $(RTE_SDK)/lib/librte_pmd_bond/rte_eth_bond_version.map
>
> +LIBABIVER := 1
> +
> #
> # all source are stored in SRCS-y
> #
> diff --git a/lib/librte_pmd_e1000/Makefile b/lib/librte_pmd_e1000/Makefile
> index e225bfe..a5e3b66 100644
> --- a/lib/librte_pmd_e1000/Makefile
> +++ b/lib/librte_pmd_e1000/Makefile
> @@ -41,6 +41,8 @@ CFLAGS += $(WERROR_FLAGS)
>
> EXPORT_MAP := $(RTE_SDK)/lib/librte_pmd_e1000/rte_pmd_e1000_version.map
>
> +LIBABIVER := 1
> +
> ifeq ($(CC), icc)
> #
> # CFLAGS for icc
> diff --git a/lib/librte_pmd_i40e/Makefile b/lib/librte_pmd_i40e/Makefile
> index cfbe816..d59967a 100644
> --- a/lib/librte_pmd_i40e/Makefile
> +++ b/lib/librte_pmd_i40e/Makefile
> @@ -41,6 +41,8 @@ CFLAGS += $(WERROR_FLAGS)
>
> EXPORT_MAP := $(RTE_SDK)/lib/librte_pmd_i40e/rte_pmd_i40e_version.map
>
> +LIBABIVER := 1
> +
> #
> # Add extra flags for base driver files (also known as shared code)
> # to disable warnings
> diff --git a/lib/librte_pmd_ixgbe/Makefile b/lib/librte_pmd_ixgbe/Makefile
> index 1dd14a6..fd17c09 100644
> --- a/lib/librte_pmd_ixgbe/Makefile
> +++ b/lib/librte_pmd_ixgbe/Makefile
> @@ -41,6 +41,8 @@ CFLAGS += $(WERROR_FLAGS)
>
> EXPORT_MAP := $(RTE_SDK)/lib/librte_pmd_ixgbe/rte_pmd_ixgbe_version.map
>
> +LIBABIVER := 1
> +
> ifeq ($(CC), icc)
> #
> # CFLAGS for icc
> diff --git a/lib/librte_pmd_pcap/Makefile b/lib/librte_pmd_pcap/Makefile
> index fff5572..8f05c2c 100644
> --- a/lib/librte_pmd_pcap/Makefile
> +++ b/lib/librte_pmd_pcap/Makefile
> @@ -42,6 +42,8 @@ CFLAGS += $(WERROR_FLAGS)
>
> EXPORT_MAP := $(RTE_SDK)/lib/librte_pmd_pcap/rte_pmd_pcap_version.map
>
> +LIBABIVER := 1
> +
> #
> # all source are stored in SRCS-y
> #
> diff --git a/lib/librte_pmd_ring/Makefile b/lib/librte_pmd_ring/Makefile
> index 25ad27f..24c57fc 100644
> --- a/lib/librte_pmd_ring/Makefile
> +++ b/lib/librte_pmd_ring/Makefile
> @@ -41,6 +41,8 @@ CFLAGS += $(WERROR_FLAGS)
>
> EXPORT_MAP := $(RTE_SDK)/lib/librte_pmd_ring/rte_eth_ring_version.map
>
> +LIBABIVER := 1
> +
> #
> # all source are stored in SRCS-y
> #
> diff --git a/lib/librte_pmd_virtio/Makefile b/lib/librte_pmd_virtio/Makefile
> index bf51bd9..d0bec84 100644
> --- a/lib/librte_pmd_virtio/Makefile
> +++ b/lib/librte_pmd_virtio/Makefile
> @@ -41,6 +41,8 @@ CFLAGS += $(WERROR_FLAGS)
>
> EXPORT_MAP := $(RTE_SDK)/lib/librte_pmd_virtio/rte_pmd_virtio_version.map
>
> +LIBABIVER := 1
> +
> #
> # all source are stored in SRCS-y
> #
> diff --git a/lib/librte_pmd_vmxnet3/Makefile b/lib/librte_pmd_vmxnet3/Makefile
> index e5a1c6b..2b418f4 100644
> --- a/lib/librte_pmd_vmxnet3/Makefile
> +++ b/lib/librte_pmd_vmxnet3/Makefile
> @@ -68,6 +68,8 @@ VPATH += $(RTE_SDK)/lib/librte_pmd_vmxnet3/vmxnet3
>
> EXPORT_MAP := $(RTE_SDK)/lib/librte_pmd_vmxnet3/rte_pmd_vmxnet3_version.map
>
> +LIBABIVER := 1
> +
> #
> # all source are stored in SRCS-y
> #
> diff --git a/lib/librte_pmd_xenvirt/Makefile b/lib/librte_pmd_xenvirt/Makefile
> index 0a08b1b..6132c1c 100644
> --- a/lib/librte_pmd_xenvirt/Makefile
> +++ b/lib/librte_pmd_xenvirt/Makefile
> @@ -41,6 +41,8 @@ CFLAGS += $(WERROR_FLAGS)
>
> EXPORT_MAP := $(RTE_SDK)/lib/librte_pmd_xenvirt/rte_eth_xenvirt_version.map
>
> +LIBABIVER := 1
> +
> #
> # all source are stored in SRCS-y
> #
> diff --git a/lib/librte_port/Makefile b/lib/librte_port/Makefile
> index e812bda..828692f 100644
> --- a/lib/librte_port/Makefile
> +++ b/lib/librte_port/Makefile
> @@ -41,6 +41,8 @@ CFLAGS += $(WERROR_FLAGS)
>
> EXPORT_MAP := $(RTE_SDK)/lib/librte_port/rte_port_version.map
>
> +LIBABIVER := 1
> +
> #
> # all source are stored in SRCS-y
> #
> diff --git a/lib/librte_power/Makefile b/lib/librte_power/Makefile
> index 26ee542..3261176 100644
> --- a/lib/librte_power/Makefile
> +++ b/lib/librte_power/Makefile
> @@ -38,6 +38,8 @@ CFLAGS += $(WERROR_FLAGS) -I$(SRCDIR) -O3 -fno-strict-aliasing
>
> EXPORT_MAP := $(RTE_SDK)/lib/librte_power/rte_power_version.map
>
> +LIBABIVER := 1
> +
> # all source are stored in SRCS-y
> SRCS-$(CONFIG_RTE_LIBRTE_POWER) := rte_power.c
>
> diff --git a/lib/librte_ring/Makefile b/lib/librte_ring/Makefile
> index 0adaa00..fa697ea 100644
> --- a/lib/librte_ring/Makefile
> +++ b/lib/librte_ring/Makefile
> @@ -38,6 +38,8 @@ CFLAGS += $(WERROR_FLAGS) -I$(SRCDIR) -O3
>
> EXPORT_MAP := $(RTE_SDK)/lib/librte_ring/rte_ring_version.map
>
> +LIBABIVER := 1
> +
> # all source are stored in SRCS-y
> SRCS-$(CONFIG_RTE_LIBRTE_RING) := rte_ring.c
>
> diff --git a/lib/librte_sched/Makefile b/lib/librte_sched/Makefile
> index 205fb7a..1a54bf9 100644
> --- a/lib/librte_sched/Makefile
> +++ b/lib/librte_sched/Makefile
> @@ -43,6 +43,8 @@ CFLAGS_rte_red.o := -D_GNU_SOURCE
>
> EXPORT_MAP := $(RTE_SDK)/lib/librte_sched/rte_sched_version.map
>
> +LIBABIVER := 1
> +
> #
> # all source are stored in SRCS-y
> #
> diff --git a/lib/librte_table/Makefile b/lib/librte_table/Makefile
> index 5b54acc..29b768c 100644
> --- a/lib/librte_table/Makefile
> +++ b/lib/librte_table/Makefile
> @@ -41,6 +41,8 @@ CFLAGS += $(WERROR_FLAGS)
>
> EXPORT_MAP := $(RTE_SDK)/lib/librte_table/rte_table_version.map
>
> +LIBABIVER := 1
> +
> #
> # all source are stored in SRCS-y
> #
> diff --git a/lib/librte_timer/Makefile b/lib/librte_timer/Makefile
> index f703e5f..01772c7 100644
> --- a/lib/librte_timer/Makefile
> +++ b/lib/librte_timer/Makefile
> @@ -38,6 +38,8 @@ CFLAGS += $(WERROR_FLAGS) -I$(SRCDIR) -O3
>
> EXPORT_MAP := $(RTE_SDK)/lib/librte_timer/rte_timer_version.map
>
> +LIBABIVER := 1
> +
> # all source are stored in SRCS-y
> SRCS-$(CONFIG_RTE_LIBRTE_TIMER) := rte_timer.c
>
> diff --git a/mk/rte.lib.mk b/mk/rte.lib.mk
> index 82ac309..4d55cc9 100644
> --- a/mk/rte.lib.mk
> +++ b/mk/rte.lib.mk
> @@ -37,10 +37,8 @@ include $(RTE_SDK)/mk/internal/rte.depdirs-pre.mk
>
> # VPATH contains at least SRCDIR
> VPATH += $(SRCDIR)
> -
> ifeq ($(RTE_BUILD_SHARED_LIB),y)
> -LIB := $(patsubst %.a,%.so,$(LIB))
> -
> +LIB := $(patsubst %.a,%.so.$(LIBABIVER),$(LIB))
> CPU_LDFLAGS += --version-script=$(EXPORT_MAP)
>
> endif
> @@ -63,6 +61,7 @@ build: _postbuild
>
> exe2cmd = $(strip $(call dotfile,$(patsubst %,%.cmd,$(1))))
>
> +
> ifeq ($(LINK_USING_CC),1)
> # Override the definition of LD here, since we're linking with CC
> LD := $(CC)
> @@ -112,6 +111,10 @@ lib_dir = [ -d $(RTE_OUTPUT)/lib ] || mkdir -p $(RTE_OUTPUT)/lib;
> #
> ifeq ($(RTE_BUILD_SHARED_LIB),y)
> $(LIB): $(OBJS-y) $(DEP_$(LIB)) FORCE
> +ifeq ($(LIBABIVER),)
> + @echo "Must Specify a $(LIB) ABI version"
> + @exit 1
> +endif
> @[ -d $(dir $@) ] || mkdir -p $(dir $@)
> $(if $(D),\
> @echo -n "$< -> $@ " ; \
> @@ -125,6 +128,7 @@ $(LIB): $(OBJS-y) $(DEP_$(LIB)) FORCE
> $(depfile_missing),\
> $(depfile_newer)),\
> $(O_TO_S_DO))
> +
> ifeq ($(RTE_BUILD_COMBINE_LIBS),y)
> $(if $(or \
> $(file_missing),\
> @@ -162,10 +166,12 @@ endif
> # install lib in $(RTE_OUTPUT)/lib
> #
> $(RTE_OUTPUT)/lib/$(LIB): $(LIB)
> + $(eval LIBSONAME := $(basename $(LIB)))
> @echo " INSTALL-LIB $(LIB)"
> @[ -d $(RTE_OUTPUT)/lib ] || mkdir -p $(RTE_OUTPUT)/lib
> ifneq ($(LIB),)
> $(Q)cp -f $(LIB) $(RTE_OUTPUT)/lib
> + $(Q)ln -s -f $(RTE_OUTPUT)/lib/$(LIB) $(RTE_OUTPUT)/lib/$(LIBSONAME)
> endif
>
> #
> --
> 1.9.3
>
^ permalink raw reply [flat|nested] 43+ messages in thread
* [dpdk-dev] [PATCH 4/4] docs: Add ABI documentation
2014-09-15 19:23 [dpdk-dev] [PATCH 0/4] Add DSO symbol versioning to support backwards compatibility Neil Horman
` (2 preceding siblings ...)
2014-09-15 19:23 ` [dpdk-dev] [PATCH 3/4] Add library version extenstion Neil Horman
@ 2014-09-15 19:23 ` Neil Horman
2014-10-01 16:06 ` Sergio Gonzalez Monroy
2014-09-18 18:23 ` [dpdk-dev] [PATCH 0/4] Add DSO symbol versioning to support backwards compatibility Thomas Monjalon
4 siblings, 1 reply; 43+ messages in thread
From: Neil Horman @ 2014-09-15 19:23 UTC (permalink / raw)
To: dev
Adding a document describing rudimentary ABI policy and adding notice space for
any deprecation announcements
Signed-off-by: Neil Horman <nhorman@tuxdriver.com>
CC: Thomas Monjalon <thomas.monjalon@6wind.com>
CC: "Richardson, Bruce" <bruce.richardson@intel.com>
---
doc/abi.txt | 17 +++++++++++++++++
1 file changed, 17 insertions(+)
create mode 100644 doc/abi.txt
diff --git a/doc/abi.txt b/doc/abi.txt
new file mode 100644
index 0000000..b6dcc7d
--- /dev/null
+++ b/doc/abi.txt
@@ -0,0 +1,17 @@
+ABI policy:
+ ABI versions are set at the time of major release labeling, and ABI may
+change multiple times between the last labeling and the HEAD label of the git
+tree without warning
+
+ ABI versions, once released are available until such time as their
+deprecation has been noted here for at least one major release cycle, after it
+has been tagged. E.g. the ABI for DPDK 1.8 is shipped, and then the decision to
+remove it is made during the development of DPDK 1.9. The decision will be
+recorded here, shipped with the DPDK 1.9 release, and actually removed when DPDK
+1.10 ships.
+
+ ABI versions may be deprecated in whole, or in part as needed by a given
+update.
+
+Deprecation Notices:
+
--
1.9.3
^ permalink raw reply [flat|nested] 43+ messages in thread
* Re: [dpdk-dev] [PATCH 4/4] docs: Add ABI documentation
2014-09-15 19:23 ` [dpdk-dev] [PATCH 4/4] docs: Add ABI documentation Neil Horman
@ 2014-10-01 16:06 ` Sergio Gonzalez Monroy
0 siblings, 0 replies; 43+ messages in thread
From: Sergio Gonzalez Monroy @ 2014-10-01 16:06 UTC (permalink / raw)
To: Neil Horman; +Cc: dev
Acked-by: Sergio Gonzalez Monroy <sergio.gonzalez.monroy@intel.com>
On Mon, Sep 15, 2014 at 03:23:51PM -0400, Neil Horman wrote:
> Adding a document describing rudimentary ABI policy and adding notice space for
> any deprecation announcements
>
> Signed-off-by: Neil Horman <nhorman@tuxdriver.com>
> CC: Thomas Monjalon <thomas.monjalon@6wind.com>
> CC: "Richardson, Bruce" <bruce.richardson@intel.com>
> ---
> doc/abi.txt | 17 +++++++++++++++++
> 1 file changed, 17 insertions(+)
> create mode 100644 doc/abi.txt
>
> diff --git a/doc/abi.txt b/doc/abi.txt
> new file mode 100644
> index 0000000..b6dcc7d
> --- /dev/null
> +++ b/doc/abi.txt
> @@ -0,0 +1,17 @@
> +ABI policy:
> + ABI versions are set at the time of major release labeling, and ABI may
> +change multiple times between the last labeling and the HEAD label of the git
> +tree without warning
> +
> + ABI versions, once released are available until such time as their
> +deprecation has been noted here for at least one major release cycle, after it
> +has been tagged. E.g. the ABI for DPDK 1.8 is shipped, and then the decision to
> +remove it is made during the development of DPDK 1.9. The decision will be
> +recorded here, shipped with the DPDK 1.9 release, and actually removed when DPDK
> +1.10 ships.
> +
> + ABI versions may be deprecated in whole, or in part as needed by a given
> +update.
> +
> +Deprecation Notices:
> +
> --
> 1.9.3
>
^ permalink raw reply [flat|nested] 43+ messages in thread
* Re: [dpdk-dev] [PATCH 0/4] Add DSO symbol versioning to support backwards compatibility
2014-09-15 19:23 [dpdk-dev] [PATCH 0/4] Add DSO symbol versioning to support backwards compatibility Neil Horman
` (3 preceding siblings ...)
2014-09-15 19:23 ` [dpdk-dev] [PATCH 4/4] docs: Add ABI documentation Neil Horman
@ 2014-09-18 18:23 ` Thomas Monjalon
2014-09-18 19:14 ` Neil Horman
4 siblings, 1 reply; 43+ messages in thread
From: Thomas Monjalon @ 2014-09-18 18:23 UTC (permalink / raw)
To: Neil Horman; +Cc: dev
Hi Neil,
2014-09-15 15:23, Neil Horman:
> The DPDK ABI develops and changes quickly, which makes it difficult for
> applications to keep up with the latest version of the library, especially when
> it (the DPDK) is built as a set of shared objects, as applications may be built
> against an older version of the library.
>
> To mitigate this, this patch series introduces support for library and symbol
> versioning when the DPDK is built as a DSO. Specifically, it does 4 things:
>
> 1) Adds initial support for library versioning. Each library now has a version
> map that explicitly calls out what symbols are exported to using applications,
> and assigns version(s) to them
>
> 2) Adds support macros so that when libraries create incompatible ABI's,
> multiple versions may be supported so that applications linked against older
> DPDK releases can continue to function
>
> 3) Adds library soname versioning suffixes so that when ABI's must be broken in
> a fashion that requires a rebuild of older applications, they will break at load
> time, rather than cause unexpected issues at run time.
>
> 4) Adds documentation for ABI policy, and provides space to document deprecated
> ABI versions, so that applications might be warned of impending changes.
>
> With these elements in place the DPDK has some support to allow for the extended
> maintenence of older API's while still allowing the freedom to develop new and
> improved API's.
>
> Implementing this feature will require some additional effort on the part of
> developers and reviewers. When reviewing patches, must be checked against
> existing exports to ensure that the function prototypes are not changing. If
> they are, the versioning macros must be used, and the library export map should
> be updated to reflect the new version of the function.
>
> When data structures change, if those structures are application accessible,
> apis that accept or return instances of those data structures should have new
> versions created so that users of the old data structure version might co-exist
> at the same time.
Thanks for your efforts.
But I feel this change has too many constraints for the current status of
the DPDK. It's probably too early to adopt such policy.
By the way, this versioning doesn't cover structure changes.
How could it be managed?
Don't you think it would be more reliable if managed by packaging?
Thank you for opening this discussion with a constructive proposal.
Let's check it later on once structures will be more stable since
performance is the most critical target.
--
Thomas
^ permalink raw reply [flat|nested] 43+ messages in thread
* Re: [dpdk-dev] [PATCH 0/4] Add DSO symbol versioning to support backwards compatibility
2014-09-18 18:23 ` [dpdk-dev] [PATCH 0/4] Add DSO symbol versioning to support backwards compatibility Thomas Monjalon
@ 2014-09-18 19:14 ` Neil Horman
2014-09-19 8:57 ` Richardson, Bruce
` (2 more replies)
0 siblings, 3 replies; 43+ messages in thread
From: Neil Horman @ 2014-09-18 19:14 UTC (permalink / raw)
To: Thomas Monjalon; +Cc: dev
On Thu, Sep 18, 2014 at 08:23:36PM +0200, Thomas Monjalon wrote:
> Hi Neil,
>
> 2014-09-15 15:23, Neil Horman:
> > The DPDK ABI develops and changes quickly, which makes it difficult for
> > applications to keep up with the latest version of the library, especially when
> > it (the DPDK) is built as a set of shared objects, as applications may be built
> > against an older version of the library.
> >
> > To mitigate this, this patch series introduces support for library and symbol
> > versioning when the DPDK is built as a DSO. Specifically, it does 4 things:
> >
> > 1) Adds initial support for library versioning. Each library now has a version
> > map that explicitly calls out what symbols are exported to using applications,
> > and assigns version(s) to them
> >
> > 2) Adds support macros so that when libraries create incompatible ABI's,
> > multiple versions may be supported so that applications linked against older
> > DPDK releases can continue to function
> >
> > 3) Adds library soname versioning suffixes so that when ABI's must be broken in
> > a fashion that requires a rebuild of older applications, they will break at load
> > time, rather than cause unexpected issues at run time.
> >
> > 4) Adds documentation for ABI policy, and provides space to document deprecated
> > ABI versions, so that applications might be warned of impending changes.
> >
> > With these elements in place the DPDK has some support to allow for the extended
> > maintenence of older API's while still allowing the freedom to develop new and
> > improved API's.
> >
> > Implementing this feature will require some additional effort on the part of
> > developers and reviewers. When reviewing patches, must be checked against
> > existing exports to ensure that the function prototypes are not changing. If
> > they are, the versioning macros must be used, and the library export map should
> > be updated to reflect the new version of the function.
> >
> > When data structures change, if those structures are application accessible,
> > apis that accept or return instances of those data structures should have new
> > versions created so that users of the old data structure version might co-exist
> > at the same time.
>
> Thanks for your efforts.
> But I feel this change has too many constraints for the current status of
> the DPDK. It's probably too early to adopt such policy.
>
I think you may be misunderstanding something. What constraints do you beleive
that this patch imposes? Note it doesn't in any way prevent changes to the ABI
of the DPDK, but rather gives us infrastructure to support multiple ABI
revisions at the same time, so that applications built against DPDK shared
libraries can continue to function properly at least for some time until we
decide to deprecate that ABI level.
This is all based on the versioning strategy outlined here:
http://www.akkadia.org/drepper/dsohowto.pdf
That may help clarify things for you.
> By the way, this versioning doesn't cover structure changes.
No, it doesn't. No link-time mechanism does so.
> How could it be managed?
Thats a subject that is open to discussion, but my initial thinking is that we
need to handle it on a case by case basis:
* For minor updates, where allocation of a structure is done on the heap and new
fields need to be added, appending them to the end of a structure and providing
an initial value is sufficient.
* For major changes, where fields need to be removed, or re-arranged, mostly
likely the API surfaces which accept or return those structures as
inputs/outputs will need to have new versions written to accept the new version
of the structure, and internally we will have to support both formats for a time
(according to the policy I documented, that is currently a single major
release). I.e. if you want to change struct foo, which is accepted as a
parameter for the function bar(struct foo *ptr), then for a release we would
need to create struct foo_v2 with the new format, map a new function foo_v2 to
the exported foo@@DPDK_1.(X+1), and internally make the foo functions understand
both the origional and v2 versions of the structure. Then in DPDK release
1.X+2, we can remove the old version after posting a deprecation notice with
version 1.(X+1)
> Don't you think it would be more reliable if managed by packaging?
Solving this with packaging defeats the purpose of having shared libraries at
all. While packaging each version of the dpdk separately is possible stopgap
solution, in that it allows applications to link to differing versions of the
library independently, but that negates any expectation of timely bugfixes for
any given version of the DPDK. That is to say, if you package things this way,
and wind up with several parallel versions of the same package, and for any
bugfix that comes out upstream, the packager then has the responsibility to
adapt that fix to each package. Thats an unscalable solution, and not something
any packager is going to undertake willingly. I did a hybrid version of this in
fedora for exactly that reason. I packaged the dpdk into its own directory, but
have every intention of changing that directory every major release, so that
application writers can clearly see when they need to stop updating the dpdk,
lest their applications stop linking. I'm not going to have multiple dpdk
packages to maintain in parallel, thats just too much work.
>
> Thank you for opening this discussion with a constructive proposal.
> Let's check it later on once structures will be more stable since
> performance is the most critical target.
If I'm being honest, I have to say thats a cop out answer. We all know that
structure stability isn't a priority for the DPDK, nor will it ever be in all
likelyhood. It will continue to evolve and grow as the hardware does. And this
patch set doesn't prevent that from happening. All it does is provide some
level of stability in the API for a period of time to let 3rd party application
writers write and package applications with some allowance of time to keep up
with upstream changes on their own schedule.
I grant you that writing a good API for a shared library is difficult, but
(and feel free to disagree with this), if we don't start enforcing policies that
require good API design, its not going to happen on its own. This patch set
will highlight those API points which are difficult to maintain accross major
releases, and force us to address and improve them. To that end I've already
begun talking to some of the individual library maintainers off list to address
some of the API aspects that I have concerns about (exporting variable rather
than accessor functions, structures that don't need to be visible to users,
etc), and they've started reviewing them. We can make this better, but we can't
just say later, because theres no roadmap that lists structure stability as a
line item. As hardware improves, structures will change to operate more
efficiently or support more features. Without a hard plan, the initial goals of
the DPDK (high performance networking) will relegate ABI to such a low priority
that it will never be addressed.
To that end, can we discuss specifics? Can you ennumerate direct points that
you feel make this patch unworkable at this time? I know you mentioned some
above, and I think I addressed them (though please ask follow up questions if
I've been unclear). What other concerns do you have?
Neil
^ permalink raw reply [flat|nested] 43+ messages in thread
* Re: [dpdk-dev] [PATCH 0/4] Add DSO symbol versioning to support backwards compatibility
2014-09-18 19:14 ` Neil Horman
@ 2014-09-19 8:57 ` Richardson, Bruce
2014-09-19 14:18 ` Venkatesan, Venky
2014-09-24 18:19 ` Neil Horman
2 siblings, 0 replies; 43+ messages in thread
From: Richardson, Bruce @ 2014-09-19 8:57 UTC (permalink / raw)
To: Neil Horman, Thomas Monjalon; +Cc: dev
> -----Original Message-----
> From: Neil Horman [mailto:nhorman@tuxdriver.com]
> Sent: Thursday, September 18, 2014 8:14 PM
> To: Thomas Monjalon
> Cc: dev@dpdk.org; Richardson, Bruce
> Subject: Re: [PATCH 0/4] Add DSO symbol versioning to support backwards
> compatibility
>
> On Thu, Sep 18, 2014 at 08:23:36PM +0200, Thomas Monjalon wrote:
> > Hi Neil,
> >
> > 2014-09-15 15:23, Neil Horman:
> > > The DPDK ABI develops and changes quickly, which makes it difficult for
> > > applications to keep up with the latest version of the library, especially when
> > > it (the DPDK) is built as a set of shared objects, as applications may be built
> > > against an older version of the library.
> > >
> > > To mitigate this, this patch series introduces support for library and symbol
> > > versioning when the DPDK is built as a DSO. Specifically, it does 4 things:
> > >
> > > 1) Adds initial support for library versioning. Each library now has a version
> > > map that explicitly calls out what symbols are exported to using applications,
> > > and assigns version(s) to them
> > >
> > > 2) Adds support macros so that when libraries create incompatible ABI's,
> > > multiple versions may be supported so that applications linked against older
> > > DPDK releases can continue to function
> > >
> > > 3) Adds library soname versioning suffixes so that when ABI's must be broken
> in
> > > a fashion that requires a rebuild of older applications, they will break at load
> > > time, rather than cause unexpected issues at run time.
> > >
> > > 4) Adds documentation for ABI policy, and provides space to document
> deprecated
> > > ABI versions, so that applications might be warned of impending changes.
> > >
> > > With these elements in place the DPDK has some support to allow for the
> extended
> > > maintenence of older API's while still allowing the freedom to develop new
> and
> > > improved API's.
> > >
> > > Implementing this feature will require some additional effort on the part of
> > > developers and reviewers. When reviewing patches, must be checked
> against
> > > existing exports to ensure that the function prototypes are not changing. If
> > > they are, the versioning macros must be used, and the library export map
> should
> > > be updated to reflect the new version of the function.
> > >
> > > When data structures change, if those structures are application accessible,
> > > apis that accept or return instances of those data structures should have new
> > > versions created so that users of the old data structure version might co-
> exist
> > > at the same time.
> >
> > Thanks for your efforts.
> > But I feel this change has too many constraints for the current status of
> > the DPDK. It's probably too early to adopt such policy.
> >
> I think you may be misunderstanding something. What constraints do you
> beleive
> that this patch imposes? Note it doesn't in any way prevent changes to the ABI
> of the DPDK, but rather gives us infrastructure to support multiple ABI
> revisions at the same time, so that applications built against DPDK shared
> libraries can continue to function properly at least for some time until we
> decide to deprecate that ABI level.
>
I view all this as a positive step. I consider backward compatibility as something that should always be encouraged, and I agree with Neil that this should allow us to guarantee compatibility for our customers while still having a path open to us to change things if we really need to.
> This is all based on the versioning strategy outlined here:
> http://www.akkadia.org/drepper/dsohowto.pdf
>
> That may help clarify things for you.
>
> > By the way, this versioning doesn't cover structure changes.
> No, it doesn't. No link-time mechanism does so.
>
> > How could it be managed?
> Thats a subject that is open to discussion, but my initial thinking is that we
> need to handle it on a case by case basis:
>
> * For minor updates, where allocation of a structure is done on the heap and
> new
> fields need to be added, appending them to the end of a structure and providing
> an initial value is sufficient.
>
> * For major changes, where fields need to be removed, or re-arranged, mostly
> likely the API surfaces which accept or return those structures as
> inputs/outputs will need to have new versions written to accept the new version
> of the structure, and internally we will have to support both formats for a time
> (according to the policy I documented, that is currently a single major
> release). I.e. if you want to change struct foo, which is accepted as a
> parameter for the function bar(struct foo *ptr), then for a release we would
> need to create struct foo_v2 with the new format, map a new function foo_v2
> to
> the exported foo@@DPDK_1.(X+1), and internally make the foo functions
> understand
> both the origional and v2 versions of the structure. Then in DPDK release
> 1.X+2, we can remove the old version after posting a deprecation notice with
> version 1.(X+1)
I really, really like having an official deprecation policy. The one proposed seems reasonable as a start point - we can always decide later whether we want a 1, 2 or 3 release gap between marking something as deprecated and having it removed.
/Bruce
^ permalink raw reply [flat|nested] 43+ messages in thread
* Re: [dpdk-dev] [PATCH 0/4] Add DSO symbol versioning to support backwards compatibility
2014-09-18 19:14 ` Neil Horman
2014-09-19 8:57 ` Richardson, Bruce
@ 2014-09-19 14:18 ` Venkatesan, Venky
2014-09-19 17:45 ` Neil Horman
2014-09-24 18:19 ` Neil Horman
2 siblings, 1 reply; 43+ messages in thread
From: Venkatesan, Venky @ 2014-09-19 14:18 UTC (permalink / raw)
To: dev
On 9/18/2014 12:14 PM, Neil Horman wrote:
> On Thu, Sep 18, 2014 at 08:23:36PM +0200, Thomas Monjalon wrote:
>> Hi Neil,
>>
>> 2014-09-15 15:23, Neil Horman:
>>> The DPDK ABI develops and changes quickly, which makes it difficult for
>>> applications to keep up with the latest version of the library, especially when
>>> it (the DPDK) is built as a set of shared objects, as applications may be built
>>> against an older version of the library.
>>>
>>> To mitigate this, this patch series introduces support for library and symbol
>>> versioning when the DPDK is built as a DSO. Specifically, it does 4 things:
>>>
>>> 1) Adds initial support for library versioning. Each library now has a version
>>> map that explicitly calls out what symbols are exported to using applications,
>>> and assigns version(s) to them
>>>
>>> 2) Adds support macros so that when libraries create incompatible ABI's,
>>> multiple versions may be supported so that applications linked against older
>>> DPDK releases can continue to function
>>>
>>> 3) Adds library soname versioning suffixes so that when ABI's must be broken in
>>> a fashion that requires a rebuild of older applications, they will break at load
>>> time, rather than cause unexpected issues at run time.
>>>
>>> 4) Adds documentation for ABI policy, and provides space to document deprecated
>>> ABI versions, so that applications might be warned of impending changes.
>>>
>>> With these elements in place the DPDK has some support to allow for the extended
>>> maintenence of older API's while still allowing the freedom to develop new and
>>> improved API's.
>>>
>>> Implementing this feature will require some additional effort on the part of
>>> developers and reviewers. When reviewing patches, must be checked against
>>> existing exports to ensure that the function prototypes are not changing. If
>>> they are, the versioning macros must be used, and the library export map should
>>> be updated to reflect the new version of the function.
>>>
>>> When data structures change, if those structures are application accessible,
>>> apis that accept or return instances of those data structures should have new
>>> versions created so that users of the old data structure version might co-exist
>>> at the same time.
>> Thanks for your efforts.
>> But I feel this change has too many constraints for the current status of
>> the DPDK. It's probably too early to adopt such policy.
>>
> I think you may be misunderstanding something. What constraints do you beleive
> that this patch imposes? Note it doesn't in any way prevent changes to the ABI
> of the DPDK, but rather gives us infrastructure to support multiple ABI
> revisions at the same time, so that applications built against DPDK shared
> libraries can continue to function properly at least for some time until we
> decide to deprecate that ABI level.
>
> This is all based on the versioning strategy outlined here:
> http://www.akkadia.org/drepper/dsohowto.pdf
>
> That may help clarify things for you.
>
>> By the way, this versioning doesn't cover structure changes.
> No, it doesn't. No link-time mechanism does so.
>
>> How could it be managed?
> Thats a subject that is open to discussion, but my initial thinking is that we
> need to handle it on a case by case basis:
>
> * For minor updates, where allocation of a structure is done on the heap and new
> fields need to be added, appending them to the end of a structure and providing
> an initial value is sufficient.
>
> * For major changes, where fields need to be removed, or re-arranged, mostly
> likely the API surfaces which accept or return those structures as
> inputs/outputs will need to have new versions written to accept the new version
> of the structure, and internally we will have to support both formats for a time
> (according to the policy I documented, that is currently a single major
> release). I.e. if you want to change struct foo, which is accepted as a
> parameter for the function bar(struct foo *ptr), then for a release we would
> need to create struct foo_v2 with the new format, map a new function foo_v2 to
> the exported foo@@DPDK_1.(X+1), and internally make the foo functions understand
> both the origional and v2 versions of the structure. Then in DPDK release
> 1.X+2, we can remove the old version after posting a deprecation notice with
> version 1.(X+1)
>
>> Don't you think it would be more reliable if managed by packaging?
> Solving this with packaging defeats the purpose of having shared libraries at
> all. While packaging each version of the dpdk separately is possible stopgap
> solution, in that it allows applications to link to differing versions of the
> library independently, but that negates any expectation of timely bugfixes for
> any given version of the DPDK. That is to say, if you package things this way,
> and wind up with several parallel versions of the same package, and for any
> bugfix that comes out upstream, the packager then has the responsibility to
> adapt that fix to each package. Thats an unscalable solution, and not something
> any packager is going to undertake willingly. I did a hybrid version of this in
> fedora for exactly that reason. I packaged the dpdk into its own directory, but
> have every intention of changing that directory every major release, so that
> application writers can clearly see when they need to stop updating the dpdk,
> lest their applications stop linking. I'm not going to have multiple dpdk
> packages to maintain in parallel, thats just too much work.
I do think that this is something that needs to be addressed in the
DPDK (and not with packaging). Besides what Neil points out, DPDK can
work with a lot of linux distros, and other operating systems too.
Replicating the work with each (even if it is just two or three that we
focus on) is wasteful.
>> Thank you for opening this discussion with a constructive proposal.
>> Let's check it later on once structures will be more stable since
>> performance is the most critical target.
Performance will always be a critical target for us. However, as we find
more problems that need to be solved, we will add new libraries and new
APIs. That can't be a reason to
> If I'm being honest, I have to say thats a cop out answer. We all know that
> structure stability isn't a priority for the DPDK, nor will it ever be in all
> likelyhood. It will continue to evolve and grow as the hardware does. And this
> patch set doesn't prevent that from happening. All it does is provide some
> level of stability in the API for a period of time to let 3rd party application
> writers write and package applications with some allowance of time to keep up
> with upstream changes on their own schedule.
>
> I grant you that writing a good API for a shared library is difficult, but
> (and feel free to disagree with this), if we don't start enforcing policies that
> require good API design, its not going to happen on its own. This patch set
> will highlight those API points which are difficult to maintain accross major
> releases, and force us to address and improve them. To that end I've already
> begun talking to some of the individual library maintainers off list to address
> some of the API aspects that I have concerns about (exporting variable rather
> than accessor functions, structures that don't need to be visible to users,
> etc), and they've started reviewing them. We can make this better, but we can't
> just say later, because theres no roadmap that lists structure stability as a
> line item. As hardware improves, structures will change to operate more
> efficiently or support more features. Without a hard plan, the initial goals of
> the DPDK (high performance networking) will relegate ABI to such a low priority
> that it will never be addressed.
Neil, you're spot on here. To an extent, there will always be changes to
the API for various reasons. We've done a reasonable job of managing
changes so far, but there are going to be changes. I do think that this
patch provides a way for applications to manage through those changes at
the pace they can absorb.
Secondly, one other usage scenario that we will run into is when apps
using different versions of DPDK are installed on the same system - this
patch at least gives us a start point to at least flag this problem.
>
> To that end, can we discuss specifics? Can you ennumerate direct points that
> you feel make this patch unworkable at this time? I know you mentioned some
> above, and I think I addressed them (though please ask follow up questions if
> I've been unclear). What other concerns do you have?
>
> Neil
>
This is a good start - I've put it into my development systems and
will let you know if I find anything that is a showstopper.
Regards,
-Venky
^ permalink raw reply [flat|nested] 43+ messages in thread
* Re: [dpdk-dev] [PATCH 0/4] Add DSO symbol versioning to support backwards compatibility
2014-09-19 14:18 ` Venkatesan, Venky
@ 2014-09-19 17:45 ` Neil Horman
0 siblings, 0 replies; 43+ messages in thread
From: Neil Horman @ 2014-09-19 17:45 UTC (permalink / raw)
To: Venkatesan, Venky; +Cc: dev
On Fri, Sep 19, 2014 at 07:18:36AM -0700, Venkatesan, Venky wrote:
> On 9/18/2014 12:14 PM, Neil Horman wrote:
> >On Thu, Sep 18, 2014 at 08:23:36PM +0200, Thomas Monjalon wrote:
> >>Hi Neil,
> >>
> >>2014-09-15 15:23, Neil Horman:
> >>>The DPDK ABI develops and changes quickly, which makes it difficult for
> >>>applications to keep up with the latest version of the library, especially when
> >>>it (the DPDK) is built as a set of shared objects, as applications may be built
> >>>against an older version of the library.
> >>>
> >>>To mitigate this, this patch series introduces support for library and symbol
> >>>versioning when the DPDK is built as a DSO. Specifically, it does 4 things:
> >>>
> >>>1) Adds initial support for library versioning. Each library now has a version
> >>>map that explicitly calls out what symbols are exported to using applications,
> >>>and assigns version(s) to them
> >>>
> >>>2) Adds support macros so that when libraries create incompatible ABI's,
> >>>multiple versions may be supported so that applications linked against older
> >>>DPDK releases can continue to function
> >>>
> >>>3) Adds library soname versioning suffixes so that when ABI's must be broken in
> >>>a fashion that requires a rebuild of older applications, they will break at load
> >>>time, rather than cause unexpected issues at run time.
> >>>
> >>>4) Adds documentation for ABI policy, and provides space to document deprecated
> >>>ABI versions, so that applications might be warned of impending changes.
> >>>
> >>>With these elements in place the DPDK has some support to allow for the extended
> >>>maintenence of older API's while still allowing the freedom to develop new and
> >>>improved API's.
> >>>
> >>>Implementing this feature will require some additional effort on the part of
> >>>developers and reviewers. When reviewing patches, must be checked against
> >>>existing exports to ensure that the function prototypes are not changing. If
> >>>they are, the versioning macros must be used, and the library export map should
> >>>be updated to reflect the new version of the function.
> >>>
> >>>When data structures change, if those structures are application accessible,
> >>>apis that accept or return instances of those data structures should have new
> >>>versions created so that users of the old data structure version might co-exist
> >>>at the same time.
> >>Thanks for your efforts.
> >>But I feel this change has too many constraints for the current status of
> >>the DPDK. It's probably too early to adopt such policy.
> >>
> >I think you may be misunderstanding something. What constraints do you beleive
> >that this patch imposes? Note it doesn't in any way prevent changes to the ABI
> >of the DPDK, but rather gives us infrastructure to support multiple ABI
> >revisions at the same time, so that applications built against DPDK shared
> >libraries can continue to function properly at least for some time until we
> >decide to deprecate that ABI level.
> >
> >This is all based on the versioning strategy outlined here:
> >http://www.akkadia.org/drepper/dsohowto.pdf
> >
> >That may help clarify things for you.
> >
> >>By the way, this versioning doesn't cover structure changes.
> >No, it doesn't. No link-time mechanism does so.
> >
> >>How could it be managed?
> >Thats a subject that is open to discussion, but my initial thinking is that we
> >need to handle it on a case by case basis:
> >
> >* For minor updates, where allocation of a structure is done on the heap and new
> >fields need to be added, appending them to the end of a structure and providing
> >an initial value is sufficient.
> >
> >* For major changes, where fields need to be removed, or re-arranged, mostly
> >likely the API surfaces which accept or return those structures as
> >inputs/outputs will need to have new versions written to accept the new version
> >of the structure, and internally we will have to support both formats for a time
> >(according to the policy I documented, that is currently a single major
> >release). I.e. if you want to change struct foo, which is accepted as a
> >parameter for the function bar(struct foo *ptr), then for a release we would
> >need to create struct foo_v2 with the new format, map a new function foo_v2 to
> >the exported foo@@DPDK_1.(X+1), and internally make the foo functions understand
> >both the origional and v2 versions of the structure. Then in DPDK release
> >1.X+2, we can remove the old version after posting a deprecation notice with
> >version 1.(X+1)
> >
> >>Don't you think it would be more reliable if managed by packaging?
> >Solving this with packaging defeats the purpose of having shared libraries at
> >all. While packaging each version of the dpdk separately is possible stopgap
> >solution, in that it allows applications to link to differing versions of the
> >library independently, but that negates any expectation of timely bugfixes for
> >any given version of the DPDK. That is to say, if you package things this way,
> >and wind up with several parallel versions of the same package, and for any
> >bugfix that comes out upstream, the packager then has the responsibility to
> >adapt that fix to each package. Thats an unscalable solution, and not something
> >any packager is going to undertake willingly. I did a hybrid version of this in
> >fedora for exactly that reason. I packaged the dpdk into its own directory, but
> >have every intention of changing that directory every major release, so that
> >application writers can clearly see when they need to stop updating the dpdk,
> >lest their applications stop linking. I'm not going to have multiple dpdk
> >packages to maintain in parallel, thats just too much work.
> I do think that this is something that needs to be addressed in the DPDK
> (and not with packaging). Besides what Neil points out, DPDK can work with a
> lot of linux distros, and other operating systems too. Replicating the work
> with each (even if it is just two or three that we focus on) is wasteful.
While its nice and generous of the upstream community to provide packaging
samples, its also not something that that upstream development should really
need to worry about. Packaging is really meant to address the needs of the
distribution doing the packaging. Relying on it to solve versioning problems
in place of a more appropriate solution just leads to fragmentation accross
distributions, as invariably different distros will manage that versioning
differently, which leads to applications needing to manage versioning
differently, which is what I'm trying to avoid :)
> >>Thank you for opening this discussion with a constructive proposal.
> >>Let's check it later on once structures will be more stable since
> >>performance is the most critical target.
> Performance will always be a critical target for us. However, as we find
> more problems that need to be solved, we will add new libraries and new
> APIs. That can't be a reason to
> >If I'm being honest, I have to say thats a cop out answer. We all know that
> >structure stability isn't a priority for the DPDK, nor will it ever be in all
> >likelyhood. It will continue to evolve and grow as the hardware does. And this
> >patch set doesn't prevent that from happening. All it does is provide some
> >level of stability in the API for a period of time to let 3rd party application
> >writers write and package applications with some allowance of time to keep up
> >with upstream changes on their own schedule.
> >
> >I grant you that writing a good API for a shared library is difficult, but
> >(and feel free to disagree with this), if we don't start enforcing policies that
> >require good API design, its not going to happen on its own. This patch set
> >will highlight those API points which are difficult to maintain accross major
> >releases, and force us to address and improve them. To that end I've already
> >begun talking to some of the individual library maintainers off list to address
> >some of the API aspects that I have concerns about (exporting variable rather
> >than accessor functions, structures that don't need to be visible to users,
> >etc), and they've started reviewing them. We can make this better, but we can't
> >just say later, because theres no roadmap that lists structure stability as a
> >line item. As hardware improves, structures will change to operate more
> >efficiently or support more features. Without a hard plan, the initial goals of
> >the DPDK (high performance networking) will relegate ABI to such a low priority
> >that it will never be addressed.
> Neil, you're spot on here. To an extent, there will always be changes to the
> API for various reasons. We've done a reasonable job of managing changes so
> far, but there are going to be changes. I do think that this patch provides
> a way for applications to manage through those changes at the pace they can
> absorb.
>
Thank you. Let me be clear for anyone who might not have heard me say this
before. In no way am I trying to limit the evolution of the DPDK ABI or API.
All I'm trying to do here is provide some infrastructure that allows for exiting
ABI to carry on for a minimal guaranteed period of time (currently set to at
least one release beyond its deprecation notification). I won't lie, that does
mean that API design and maintenence will be a potential extra work effort, but
I don't think thats a bad thing, as doing so will lead to better API design
(that will hopefully just last longer naturally), and it will help expand the
reach of the DPDK as application writers can better separate their development
cycles from that of the DPDK itself.
> Secondly, one other usage scenario that we will run into is when apps using
> different versions of DPDK are installed on the same system - this patch at
> least gives us a start point to at least flag this problem.
Yeah, I'm not sure how I'll deal with that from a packaging standpoint yet, but
soname versioning at least gives me a tool to make it easier to do using
whatever method I choose.
> >
> >To that end, can we discuss specifics? Can you ennumerate direct points that
> >you feel make this patch unworkable at this time? I know you mentioned some
> >above, and I think I addressed them (though please ask follow up questions if
> >I've been unclear). What other concerns do you have?
> >
> >Neil
> This is a good start - I've put it into my development systems and will let
> you know if I find anything that is a showstopper.
>
Thanks!
Neil
> Regards,
> -Venky
>
^ permalink raw reply [flat|nested] 43+ messages in thread
* Re: [dpdk-dev] [PATCH 0/4] Add DSO symbol versioning to support backwards compatibility
2014-09-18 19:14 ` Neil Horman
2014-09-19 8:57 ` Richardson, Bruce
2014-09-19 14:18 ` Venkatesan, Venky
@ 2014-09-24 18:19 ` Neil Horman
2014-09-26 10:41 ` Thomas Monjalon
2 siblings, 1 reply; 43+ messages in thread
From: Neil Horman @ 2014-09-24 18:19 UTC (permalink / raw)
To: Thomas Monjalon; +Cc: dev
On Thu, Sep 18, 2014 at 03:14:01PM -0400, Neil Horman wrote:
> On Thu, Sep 18, 2014 at 08:23:36PM +0200, Thomas Monjalon wrote:
> > Hi Neil,
> >
> > 2014-09-15 15:23, Neil Horman:
> > > The DPDK ABI develops and changes quickly, which makes it difficult for
> > > applications to keep up with the latest version of the library, especially when
> > > it (the DPDK) is built as a set of shared objects, as applications may be built
> > > against an older version of the library.
> > >
> > > To mitigate this, this patch series introduces support for library and symbol
> > > versioning when the DPDK is built as a DSO. Specifically, it does 4 things:
> > >
> > > 1) Adds initial support for library versioning. Each library now has a version
> > > map that explicitly calls out what symbols are exported to using applications,
> > > and assigns version(s) to them
> > >
> > > 2) Adds support macros so that when libraries create incompatible ABI's,
> > > multiple versions may be supported so that applications linked against older
> > > DPDK releases can continue to function
> > >
> > > 3) Adds library soname versioning suffixes so that when ABI's must be broken in
> > > a fashion that requires a rebuild of older applications, they will break at load
> > > time, rather than cause unexpected issues at run time.
> > >
> > > 4) Adds documentation for ABI policy, and provides space to document deprecated
> > > ABI versions, so that applications might be warned of impending changes.
> > >
> > > With these elements in place the DPDK has some support to allow for the extended
> > > maintenence of older API's while still allowing the freedom to develop new and
> > > improved API's.
> > >
> > > Implementing this feature will require some additional effort on the part of
> > > developers and reviewers. When reviewing patches, must be checked against
> > > existing exports to ensure that the function prototypes are not changing. If
> > > they are, the versioning macros must be used, and the library export map should
> > > be updated to reflect the new version of the function.
> > >
> > > When data structures change, if those structures are application accessible,
> > > apis that accept or return instances of those data structures should have new
> > > versions created so that users of the old data structure version might co-exist
> > > at the same time.
> >
> > Thanks for your efforts.
> > But I feel this change has too many constraints for the current status of
> > the DPDK. It's probably too early to adopt such policy.
> >
> I think you may be misunderstanding something. What constraints do you beleive
> that this patch imposes? Note it doesn't in any way prevent changes to the ABI
> of the DPDK, but rather gives us infrastructure to support multiple ABI
> revisions at the same time, so that applications built against DPDK shared
> libraries can continue to function properly at least for some time until we
> decide to deprecate that ABI level.
>
> This is all based on the versioning strategy outlined here:
> http://www.akkadia.org/drepper/dsohowto.pdf
>
> That may help clarify things for you.
>
> > By the way, this versioning doesn't cover structure changes.
> No, it doesn't. No link-time mechanism does so.
>
> > How could it be managed?
> Thats a subject that is open to discussion, but my initial thinking is that we
> need to handle it on a case by case basis:
>
> * For minor updates, where allocation of a structure is done on the heap and new
> fields need to be added, appending them to the end of a structure and providing
> an initial value is sufficient.
>
> * For major changes, where fields need to be removed, or re-arranged, mostly
> likely the API surfaces which accept or return those structures as
> inputs/outputs will need to have new versions written to accept the new version
> of the structure, and internally we will have to support both formats for a time
> (according to the policy I documented, that is currently a single major
> release). I.e. if you want to change struct foo, which is accepted as a
> parameter for the function bar(struct foo *ptr), then for a release we would
> need to create struct foo_v2 with the new format, map a new function foo_v2 to
> the exported foo@@DPDK_1.(X+1), and internally make the foo functions understand
> both the origional and v2 versions of the structure. Then in DPDK release
> 1.X+2, we can remove the old version after posting a deprecation notice with
> version 1.(X+1)
>
> > Don't you think it would be more reliable if managed by packaging?
> Solving this with packaging defeats the purpose of having shared libraries at
> all. While packaging each version of the dpdk separately is possible stopgap
> solution, in that it allows applications to link to differing versions of the
> library independently, but that negates any expectation of timely bugfixes for
> any given version of the DPDK. That is to say, if you package things this way,
> and wind up with several parallel versions of the same package, and for any
> bugfix that comes out upstream, the packager then has the responsibility to
> adapt that fix to each package. Thats an unscalable solution, and not something
> any packager is going to undertake willingly. I did a hybrid version of this in
> fedora for exactly that reason. I packaged the dpdk into its own directory, but
> have every intention of changing that directory every major release, so that
> application writers can clearly see when they need to stop updating the dpdk,
> lest their applications stop linking. I'm not going to have multiple dpdk
> packages to maintain in parallel, thats just too much work.
>
> >
> > Thank you for opening this discussion with a constructive proposal.
> > Let's check it later on once structures will be more stable since
> > performance is the most critical target.
> If I'm being honest, I have to say thats a cop out answer. We all know that
> structure stability isn't a priority for the DPDK, nor will it ever be in all
> likelyhood. It will continue to evolve and grow as the hardware does. And this
> patch set doesn't prevent that from happening. All it does is provide some
> level of stability in the API for a period of time to let 3rd party application
> writers write and package applications with some allowance of time to keep up
> with upstream changes on their own schedule.
>
> I grant you that writing a good API for a shared library is difficult, but
> (and feel free to disagree with this), if we don't start enforcing policies that
> require good API design, its not going to happen on its own. This patch set
> will highlight those API points which are difficult to maintain accross major
> releases, and force us to address and improve them. To that end I've already
> begun talking to some of the individual library maintainers off list to address
> some of the API aspects that I have concerns about (exporting variable rather
> than accessor functions, structures that don't need to be visible to users,
> etc), and they've started reviewing them. We can make this better, but we can't
> just say later, because theres no roadmap that lists structure stability as a
> line item. As hardware improves, structures will change to operate more
> efficiently or support more features. Without a hard plan, the initial goals of
> the DPDK (high performance networking) will relegate ABI to such a low priority
> that it will never be addressed.
>
> To that end, can we discuss specifics? Can you ennumerate direct points that
> you feel make this patch unworkable at this time? I know you mentioned some
> above, and I think I addressed them (though please ask follow up questions if
> I've been unclear). What other concerns do you have?
>
> Neil
>
>
Ping Thomas. I know you're busy, but I would like this to not fall off anyones
radar. You alluded to concerns regarding what, for lack of a better term,
ABI/API lockin. I had asked you to enuumerate/elaborate on specifics, but never
heard back. Are there further specifics you wish to discuss, or are you
satisfied with the above answers?
Best
Neil
^ permalink raw reply [flat|nested] 43+ messages in thread
* Re: [dpdk-dev] [PATCH 0/4] Add DSO symbol versioning to support backwards compatibility
2014-09-24 18:19 ` Neil Horman
@ 2014-09-26 10:41 ` Thomas Monjalon
2014-09-26 14:45 ` Neil Horman
0 siblings, 1 reply; 43+ messages in thread
From: Thomas Monjalon @ 2014-09-26 10:41 UTC (permalink / raw)
To: Neil Horman; +Cc: dev
Hi Neil,
2014-09-24 14:19, Neil Horman:
> Ping Thomas. I know you're busy, but I would like this to not fall off anyones
> radar. You alluded to concerns regarding what, for lack of a better term,
> ABI/API lockin. I had asked you to enuumerate/elaborate on specifics, but never
> heard back. Are there further specifics you wish to discuss, or are you
> satisfied with the above answers?
Sorry for not being very reactive on this thread.
All this discussion is very interesting but it's really not the proper
time to apply it. As you said, it requires an extra effort. I'm not saying
it will never be integrated. I'm just saying that we cannot change
everything at the same time.
Let me sum up the situation. This community project has been very active
for few months now. First, we learnt how to make some releases together
and we are improving the process to be able to deliver a new major release
every 4 months while having some good quality process.
But these releases are still not complete because documentation is not
integrated yet. Then developers should have a role in documentation updates.
We also need to integrate and learn how to use more tools to be more
efficient and improve quality.
So the question is "when should we care about API compatibility"?
And the answer is: ASAP, but not now. I feel next year is a better target.
Because the most important priority is to move together at a pace which
allow most of us to stay in the race.
--
Thomas
^ permalink raw reply [flat|nested] 43+ messages in thread
* Re: [dpdk-dev] [PATCH 0/4] Add DSO symbol versioning to support backwards compatibility
2014-09-26 10:41 ` Thomas Monjalon
@ 2014-09-26 14:45 ` Neil Horman
2014-09-26 22:02 ` Stephen Hemminger
2014-10-01 18:59 ` Neil Horman
0 siblings, 2 replies; 43+ messages in thread
From: Neil Horman @ 2014-09-26 14:45 UTC (permalink / raw)
To: Thomas Monjalon; +Cc: dev
On Fri, Sep 26, 2014 at 12:41:33PM +0200, Thomas Monjalon wrote:
> Hi Neil,
>
> 2014-09-24 14:19, Neil Horman:
> > Ping Thomas. I know you're busy, but I would like this to not fall off anyones
> > radar. You alluded to concerns regarding what, for lack of a better term,
> > ABI/API lockin. I had asked you to enuumerate/elaborate on specifics, but never
> > heard back. Are there further specifics you wish to discuss, or are you
> > satisfied with the above answers?
>
> Sorry for not being very reactive on this thread.
> All this discussion is very interesting but it's really not the proper
> time to apply it. As you said, it requires an extra effort. I'm not saying
> it will never be integrated. I'm just saying that we cannot change
> everything at the same time.
>
> Let me sum up the situation. This community project has been very active
> for few months now. First, we learnt how to make some releases together
> and we are improving the process to be able to deliver a new major release
> every 4 months while having some good quality process.
> But these releases are still not complete because documentation is not
> integrated yet. Then developers should have a role in documentation updates.
> We also need to integrate and learn how to use more tools to be more
> efficient and improve quality.
>
> So the question is "when should we care about API compatibility"?
> And the answer is: ASAP, but not now. I feel next year is a better target.
> Because the most important priority is to move together at a pace which
> allow most of us to stay in the race.
>
I'm sorry Thomas, I don't accept this. I asked you for details as to your
concerns regarding this patch series, and you've provided more vague comments.
I need details to address
You say it requires extra effort, you're right it does. Any feature that you
integreate requires some additional effort. How is this patch any different
from adding the acl library or any other new API? Everything requires
maintenence, thats how software works. What specfically about this patch series
makes the effort insurmountable to you?
You say you're improving your process. Great, this patch aids in that process
by ensuring backwards compatibility for a period of time. Given that the API
and ABI can still evolve within this framework, as I've described, how is this
patch series not a significant step forward toward your goal of quality process.
You say documentation isn't integrated. So, what does getting documentation
integrated have to do with this patch set, or any other? I don't see you
holding any other patches based on documentation. Again, nothing in this series
prevents evolution of the API or ABI. If you're hope is to wait until
everything is perfect, then apply some control to the public facing API, and get
it all documented, none of thosse things will ever happen, I promise you.
You say you also need to learn to use more tools to be more efficient and
improve quality. Great! Thats exactly what this is. If we mandate even a short
term commitment to ABI stability (1 single relese worth of time), we will
quickly identify what API's change quickly and where we need to be cautious with
our API design. If you just assume that developers will get better of their own
volition, it will never happen.
You say this should go in next year, but not now. When exactly? What event do
you forsee occuring in the next 12-18 months that will change everything such
that we can start supporing an ABI for more than just a few weeks at the head of
the tree?
To this end, I just did a quick search through the git history for dpdk to look
at the histories of all the header files that are exposed via the makefile
SYMLINK command (given that that provides a list of header files that
applications can include, and embodies all the function symbols and data types
applications have access to.
There are 179 total commits in that list
Of those, a bit of spot checking suggests that about 10-15% of them actually
change ABI, and many of those came from Bruce's rework of the mbuf structure.
That about 17-20 instances over the last 2 years where an ABI update would have
been needed. That seems pretty reasonable to me. Where exactly is your concern
here?
Neil
> --
> Thomas
>
^ permalink raw reply [flat|nested] 43+ messages in thread
* Re: [dpdk-dev] [PATCH 0/4] Add DSO symbol versioning to support backwards compatibility
2014-09-26 14:45 ` Neil Horman
@ 2014-09-26 22:02 ` Stephen Hemminger
2014-09-27 2:22 ` Neil Horman
2014-10-01 18:59 ` Neil Horman
1 sibling, 1 reply; 43+ messages in thread
From: Stephen Hemminger @ 2014-09-26 22:02 UTC (permalink / raw)
To: Neil Horman; +Cc: dev
On Fri, 26 Sep 2014 10:45:49 -0400
Neil Horman <nhorman@tuxdriver.com> wrote:
> On Fri, Sep 26, 2014 at 12:41:33PM +0200, Thomas Monjalon wrote:
> > Hi Neil,
> >
> > 2014-09-24 14:19, Neil Horman:
> > > Ping Thomas. I know you're busy, but I would like this to not fall off anyones
> > > radar. You alluded to concerns regarding what, for lack of a better term,
> > > ABI/API lockin. I had asked you to enuumerate/elaborate on specifics, but never
> > > heard back. Are there further specifics you wish to discuss, or are you
> > > satisfied with the above answers?
> >
> > Sorry for not being very reactive on this thread.
> > All this discussion is very interesting but it's really not the proper
> > time to apply it. As you said, it requires an extra effort. I'm not saying
> > it will never be integrated. I'm just saying that we cannot change
> > everything at the same time.
> >
> > Let me sum up the situation. This community project has been very active
> > for few months now. First, we learnt how to make some releases together
> > and we are improving the process to be able to deliver a new major release
> > every 4 months while having some good quality process.
> > But these releases are still not complete because documentation is not
> > integrated yet. Then developers should have a role in documentation updates.
> > We also need to integrate and learn how to use more tools to be more
> > efficient and improve quality.
> >
> > So the question is "when should we care about API compatibility"?
> > And the answer is: ASAP, but not now. I feel next year is a better target.
> > Because the most important priority is to move together at a pace which
> > allow most of us to stay in the race.
> >
>
>
> I'm sorry Thomas, I don't accept this. I asked you for details as to your
> concerns regarding this patch series, and you've provided more vague comments.
> I need details to address
>
> You say it requires extra effort, you're right it does. Any feature that you
> integreate requires some additional effort. How is this patch any different
> from adding the acl library or any other new API? Everything requires
> maintenence, thats how software works. What specfically about this patch series
> makes the effort insurmountable to you?
>
> You say you're improving your process. Great, this patch aids in that process
> by ensuring backwards compatibility for a period of time. Given that the API
> and ABI can still evolve within this framework, as I've described, how is this
> patch series not a significant step forward toward your goal of quality process.
>
> You say documentation isn't integrated. So, what does getting documentation
> integrated have to do with this patch set, or any other? I don't see you
> holding any other patches based on documentation. Again, nothing in this series
> prevents evolution of the API or ABI. If you're hope is to wait until
> everything is perfect, then apply some control to the public facing API, and get
> it all documented, none of thosse things will ever happen, I promise you.
>
> You say you also need to learn to use more tools to be more efficient and
> improve quality. Great! Thats exactly what this is. If we mandate even a short
> term commitment to ABI stability (1 single relese worth of time), we will
> quickly identify what API's change quickly and where we need to be cautious with
> our API design. If you just assume that developers will get better of their own
> volition, it will never happen.
>
> You say this should go in next year, but not now. When exactly? What event do
> you forsee occuring in the next 12-18 months that will change everything such
> that we can start supporing an ABI for more than just a few weeks at the head of
> the tree?
>
> To this end, I just did a quick search through the git history for dpdk to look
> at the histories of all the header files that are exposed via the makefile
> SYMLINK command (given that that provides a list of header files that
> applications can include, and embodies all the function symbols and data types
> applications have access to.
>
> There are 179 total commits in that list
> Of those, a bit of spot checking suggests that about 10-15% of them actually
> change ABI, and many of those came from Bruce's rework of the mbuf structure.
> That about 17-20 instances over the last 2 years where an ABI update would have
> been needed. That seems pretty reasonable to me. Where exactly is your concern
> here?
>
> Neil
Isn't ABI stablity a distro responsibility not a project responsibility?
I have lots more API/ABI changes, just been too busy trying to release a real
product using DPDK to upstream all the changes.
^ permalink raw reply [flat|nested] 43+ messages in thread
* Re: [dpdk-dev] [PATCH 0/4] Add DSO symbol versioning to support backwards compatibility
2014-09-26 22:02 ` Stephen Hemminger
@ 2014-09-27 2:22 ` Neil Horman
0 siblings, 0 replies; 43+ messages in thread
From: Neil Horman @ 2014-09-27 2:22 UTC (permalink / raw)
To: Stephen Hemminger; +Cc: dev
On Fri, Sep 26, 2014 at 03:02:55PM -0700, Stephen Hemminger wrote:
> On Fri, 26 Sep 2014 10:45:49 -0400
> Neil Horman <nhorman@tuxdriver.com> wrote:
>
> > On Fri, Sep 26, 2014 at 12:41:33PM +0200, Thomas Monjalon wrote:
> > > Hi Neil,
> > >
> > > 2014-09-24 14:19, Neil Horman:
> > > > Ping Thomas. I know you're busy, but I would like this to not fall off anyones
> > > > radar. You alluded to concerns regarding what, for lack of a better term,
> > > > ABI/API lockin. I had asked you to enuumerate/elaborate on specifics, but never
> > > > heard back. Are there further specifics you wish to discuss, or are you
> > > > satisfied with the above answers?
> > >
> > > Sorry for not being very reactive on this thread.
> > > All this discussion is very interesting but it's really not the proper
> > > time to apply it. As you said, it requires an extra effort. I'm not saying
> > > it will never be integrated. I'm just saying that we cannot change
> > > everything at the same time.
> > >
> > > Let me sum up the situation. This community project has been very active
> > > for few months now. First, we learnt how to make some releases together
> > > and we are improving the process to be able to deliver a new major release
> > > every 4 months while having some good quality process.
> > > But these releases are still not complete because documentation is not
> > > integrated yet. Then developers should have a role in documentation updates.
> > > We also need to integrate and learn how to use more tools to be more
> > > efficient and improve quality.
> > >
> > > So the question is "when should we care about API compatibility"?
> > > And the answer is: ASAP, but not now. I feel next year is a better target.
> > > Because the most important priority is to move together at a pace which
> > > allow most of us to stay in the race.
> > >
> >
> >
> > I'm sorry Thomas, I don't accept this. I asked you for details as to your
> > concerns regarding this patch series, and you've provided more vague comments.
> > I need details to address
> >
> > You say it requires extra effort, you're right it does. Any feature that you
> > integreate requires some additional effort. How is this patch any different
> > from adding the acl library or any other new API? Everything requires
> > maintenence, thats how software works. What specfically about this patch series
> > makes the effort insurmountable to you?
> >
> > You say you're improving your process. Great, this patch aids in that process
> > by ensuring backwards compatibility for a period of time. Given that the API
> > and ABI can still evolve within this framework, as I've described, how is this
> > patch series not a significant step forward toward your goal of quality process.
> >
> > You say documentation isn't integrated. So, what does getting documentation
> > integrated have to do with this patch set, or any other? I don't see you
> > holding any other patches based on documentation. Again, nothing in this series
> > prevents evolution of the API or ABI. If you're hope is to wait until
> > everything is perfect, then apply some control to the public facing API, and get
> > it all documented, none of thosse things will ever happen, I promise you.
> >
> > You say you also need to learn to use more tools to be more efficient and
> > improve quality. Great! Thats exactly what this is. If we mandate even a short
> > term commitment to ABI stability (1 single relese worth of time), we will
> > quickly identify what API's change quickly and where we need to be cautious with
> > our API design. If you just assume that developers will get better of their own
> > volition, it will never happen.
> >
> > You say this should go in next year, but not now. When exactly? What event do
> > you forsee occuring in the next 12-18 months that will change everything such
> > that we can start supporing an ABI for more than just a few weeks at the head of
> > the tree?
> >
> > To this end, I just did a quick search through the git history for dpdk to look
> > at the histories of all the header files that are exposed via the makefile
> > SYMLINK command (given that that provides a list of header files that
> > applications can include, and embodies all the function symbols and data types
> > applications have access to.
> >
> > There are 179 total commits in that list
> > Of those, a bit of spot checking suggests that about 10-15% of them actually
> > change ABI, and many of those came from Bruce's rework of the mbuf structure.
> > That about 17-20 instances over the last 2 years where an ABI update would have
> > been needed. That seems pretty reasonable to me. Where exactly is your concern
> > here?
> >
> > Neil
>
> Isn't ABI stablity a distro responsibility not a project responsibility?
> I have lots more API/ABI changes, just been too busy trying to release a real
> product using DPDK to upstream all the changes.
>
No. How well would glibc or any major library work without ABI stability?
Its definately a distros responsibility to not break ABI with backports from
upstream within a major release, but its upstreams responsibility to maintain
ABI for some period of time to prevent immediate distro breakage with an update.
Often libraries provide this by simply taking lots of care in their ABI
design, but if ABI flexibility is a need, providing some level of backwards
compatibility must fall on the upstream project.
Neil
>
>
^ permalink raw reply [flat|nested] 43+ messages in thread
* Re: [dpdk-dev] [PATCH 0/4] Add DSO symbol versioning to support backwards compatibility
2014-09-26 14:45 ` Neil Horman
2014-09-26 22:02 ` Stephen Hemminger
@ 2014-10-01 18:59 ` Neil Horman
2014-10-07 21:01 ` Neil Horman
1 sibling, 1 reply; 43+ messages in thread
From: Neil Horman @ 2014-10-01 18:59 UTC (permalink / raw)
To: Thomas Monjalon; +Cc: dev
On Fri, Sep 26, 2014 at 10:45:49AM -0400, Neil Horman wrote:
> On Fri, Sep 26, 2014 at 12:41:33PM +0200, Thomas Monjalon wrote:
> > Hi Neil,
> >
> > 2014-09-24 14:19, Neil Horman:
> > > Ping Thomas. I know you're busy, but I would like this to not fall off anyones
> > > radar. You alluded to concerns regarding what, for lack of a better term,
> > > ABI/API lockin. I had asked you to enuumerate/elaborate on specifics, but never
> > > heard back. Are there further specifics you wish to discuss, or are you
> > > satisfied with the above answers?
> >
> > Sorry for not being very reactive on this thread.
> > All this discussion is very interesting but it's really not the proper
> > time to apply it. As you said, it requires an extra effort. I'm not saying
> > it will never be integrated. I'm just saying that we cannot change
> > everything at the same time.
> >
> > Let me sum up the situation. This community project has been very active
> > for few months now. First, we learnt how to make some releases together
> > and we are improving the process to be able to deliver a new major release
> > every 4 months while having some good quality process.
> > But these releases are still not complete because documentation is not
> > integrated yet. Then developers should have a role in documentation updates.
> > We also need to integrate and learn how to use more tools to be more
> > efficient and improve quality.
> >
> > So the question is "when should we care about API compatibility"?
> > And the answer is: ASAP, but not now. I feel next year is a better target.
> > Because the most important priority is to move together at a pace which
> > allow most of us to stay in the race.
> >
>
>
> I'm sorry Thomas, I don't accept this. I asked you for details as to your
> concerns regarding this patch series, and you've provided more vague comments.
> I need details to address
>
> You say it requires extra effort, you're right it does. Any feature that you
> integreate requires some additional effort. How is this patch any different
> from adding the acl library or any other new API? Everything requires
> maintenence, thats how software works. What specfically about this patch series
> makes the effort insurmountable to you?
>
> You say you're improving your process. Great, this patch aids in that process
> by ensuring backwards compatibility for a period of time. Given that the API
> and ABI can still evolve within this framework, as I've described, how is this
> patch series not a significant step forward toward your goal of quality process.
>
> You say documentation isn't integrated. So, what does getting documentation
> integrated have to do with this patch set, or any other? I don't see you
> holding any other patches based on documentation. Again, nothing in this series
> prevents evolution of the API or ABI. If you're hope is to wait until
> everything is perfect, then apply some control to the public facing API, and get
> it all documented, none of thosse things will ever happen, I promise you.
>
> You say you also need to learn to use more tools to be more efficient and
> improve quality. Great! Thats exactly what this is. If we mandate even a short
> term commitment to ABI stability (1 single relese worth of time), we will
> quickly identify what API's change quickly and where we need to be cautious with
> our API design. If you just assume that developers will get better of their own
> volition, it will never happen.
>
> You say this should go in next year, but not now. When exactly? What event do
> you forsee occuring in the next 12-18 months that will change everything such
> that we can start supporing an ABI for more than just a few weeks at the head of
> the tree?
>
> To this end, I just did a quick search through the git history for dpdk to look
> at the histories of all the header files that are exposed via the makefile
> SYMLINK command (given that that provides a list of header files that
> applications can include, and embodies all the function symbols and data types
> applications have access to.
>
> There are 179 total commits in that list
> Of those, a bit of spot checking suggests that about 10-15% of them actually
> change ABI, and many of those came from Bruce's rework of the mbuf structure.
> That about 17-20 instances over the last 2 years where an ABI update would have
> been needed. That seems pretty reasonable to me. Where exactly is your concern
> here?
>
> Neil
>
Ping Thomas, I'd like to continue this debate to a conclusion. Could you please
provide specific details and/or concerns that you have with this patch series?
Thanks
Neil
> > --
> > Thomas
> >
>
^ permalink raw reply [flat|nested] 43+ messages in thread
* Re: [dpdk-dev] [PATCH 0/4] Add DSO symbol versioning to support backwards compatibility
2014-10-01 18:59 ` Neil Horman
@ 2014-10-07 21:01 ` Neil Horman
2014-10-08 15:57 ` Thomas Monjalon
0 siblings, 1 reply; 43+ messages in thread
From: Neil Horman @ 2014-10-07 21:01 UTC (permalink / raw)
To: Thomas Monjalon; +Cc: dev
On Wed, Oct 01, 2014 at 02:59:40PM -0400, Neil Horman wrote:
> On Fri, Sep 26, 2014 at 10:45:49AM -0400, Neil Horman wrote:
> > On Fri, Sep 26, 2014 at 12:41:33PM +0200, Thomas Monjalon wrote:
> > > Hi Neil,
> > >
> > > 2014-09-24 14:19, Neil Horman:
> > > > Ping Thomas. I know you're busy, but I would like this to not fall off anyones
> > > > radar. You alluded to concerns regarding what, for lack of a better term,
> > > > ABI/API lockin. I had asked you to enuumerate/elaborate on specifics, but never
> > > > heard back. Are there further specifics you wish to discuss, or are you
> > > > satisfied with the above answers?
> > >
> > > Sorry for not being very reactive on this thread.
> > > All this discussion is very interesting but it's really not the proper
> > > time to apply it. As you said, it requires an extra effort. I'm not saying
> > > it will never be integrated. I'm just saying that we cannot change
> > > everything at the same time.
> > >
> > > Let me sum up the situation. This community project has been very active
> > > for few months now. First, we learnt how to make some releases together
> > > and we are improving the process to be able to deliver a new major release
> > > every 4 months while having some good quality process.
> > > But these releases are still not complete because documentation is not
> > > integrated yet. Then developers should have a role in documentation updates.
> > > We also need to integrate and learn how to use more tools to be more
> > > efficient and improve quality.
> > >
> > > So the question is "when should we care about API compatibility"?
> > > And the answer is: ASAP, but not now. I feel next year is a better target.
> > > Because the most important priority is to move together at a pace which
> > > allow most of us to stay in the race.
> > >
> >
> >
> > I'm sorry Thomas, I don't accept this. I asked you for details as to your
> > concerns regarding this patch series, and you've provided more vague comments.
> > I need details to address
> >
> > You say it requires extra effort, you're right it does. Any feature that you
> > integreate requires some additional effort. How is this patch any different
> > from adding the acl library or any other new API? Everything requires
> > maintenence, thats how software works. What specfically about this patch series
> > makes the effort insurmountable to you?
> >
> > You say you're improving your process. Great, this patch aids in that process
> > by ensuring backwards compatibility for a period of time. Given that the API
> > and ABI can still evolve within this framework, as I've described, how is this
> > patch series not a significant step forward toward your goal of quality process.
> >
> > You say documentation isn't integrated. So, what does getting documentation
> > integrated have to do with this patch set, or any other? I don't see you
> > holding any other patches based on documentation. Again, nothing in this series
> > prevents evolution of the API or ABI. If you're hope is to wait until
> > everything is perfect, then apply some control to the public facing API, and get
> > it all documented, none of thosse things will ever happen, I promise you.
> >
> > You say you also need to learn to use more tools to be more efficient and
> > improve quality. Great! Thats exactly what this is. If we mandate even a short
> > term commitment to ABI stability (1 single relese worth of time), we will
> > quickly identify what API's change quickly and where we need to be cautious with
> > our API design. If you just assume that developers will get better of their own
> > volition, it will never happen.
> >
> > You say this should go in next year, but not now. When exactly? What event do
> > you forsee occuring in the next 12-18 months that will change everything such
> > that we can start supporing an ABI for more than just a few weeks at the head of
> > the tree?
> >
> > To this end, I just did a quick search through the git history for dpdk to look
> > at the histories of all the header files that are exposed via the makefile
> > SYMLINK command (given that that provides a list of header files that
> > applications can include, and embodies all the function symbols and data types
> > applications have access to.
> >
> > There are 179 total commits in that list
> > Of those, a bit of spot checking suggests that about 10-15% of them actually
> > change ABI, and many of those came from Bruce's rework of the mbuf structure.
> > That about 17-20 instances over the last 2 years where an ABI update would have
> > been needed. That seems pretty reasonable to me. Where exactly is your concern
> > here?
> >
> > Neil
> >
>
> Ping Thomas, I'd like to continue this debate to a conclusion. Could you please
> provide specific details and/or concerns that you have with this patch series?
>
> Thanks
> Neil
>
Ping again Thomas, please lets debate this to a reasonable consensus. Ignoring
it won't help anything.
Regards
Neil
^ permalink raw reply [flat|nested] 43+ messages in thread
* Re: [dpdk-dev] [PATCH 0/4] Add DSO symbol versioning to support backwards compatibility
2014-10-07 21:01 ` Neil Horman
@ 2014-10-08 15:57 ` Thomas Monjalon
2014-10-08 18:46 ` Butler, Siobhan A
2014-10-08 19:09 ` Neil Horman
0 siblings, 2 replies; 43+ messages in thread
From: Thomas Monjalon @ 2014-10-08 15:57 UTC (permalink / raw)
To: Neil Horman; +Cc: dev
Hi Neil,
2014-10-07 17:01, Neil Horman:
> On Wed, Oct 01, 2014 at 02:59:40PM -0400, Neil Horman wrote:
> > On Fri, Sep 26, 2014 at 10:45:49AM -0400, Neil Horman wrote:
> > > On Fri, Sep 26, 2014 at 12:41:33PM +0200, Thomas Monjalon wrote:
> > > > Hi Neil,
> > > >
> > > > 2014-09-24 14:19, Neil Horman:
> > > > > Ping Thomas. I know you're busy, but I would like this to not fall off anyones
> > > > > radar. You alluded to concerns regarding what, for lack of a better term,
> > > > > ABI/API lockin. I had asked you to enuumerate/elaborate on specifics, but never
> > > > > heard back. Are there further specifics you wish to discuss, or are you
> > > > > satisfied with the above answers?
> > > >
> > > > Sorry for not being very reactive on this thread.
> > > > All this discussion is very interesting but it's really not the proper
> > > > time to apply it. As you said, it requires an extra effort. I'm not saying
> > > > it will never be integrated. I'm just saying that we cannot change
> > > > everything at the same time.
> > > >
> > > > Let me sum up the situation. This community project has been very active
> > > > for few months now. First, we learnt how to make some releases together
> > > > and we are improving the process to be able to deliver a new major release
> > > > every 4 months while having some good quality process.
> > > > But these releases are still not complete because documentation is not
> > > > integrated yet. Then developers should have a role in documentation updates.
> > > > We also need to integrate and learn how to use more tools to be more
> > > > efficient and improve quality.
> > > >
> > > > So the question is "when should we care about API compatibility"?
> > > > And the answer is: ASAP, but not now. I feel next year is a better target.
> > > > Because the most important priority is to move together at a pace which
> > > > allow most of us to stay in the race.
> > >
> > > I'm sorry Thomas, I don't accept this. I asked you for details as to your
> > > concerns regarding this patch series, and you've provided more vague comments.
> > > I need details to address
> > >
> > > You say it requires extra effort, you're right it does. Any feature that you
> > > integreate requires some additional effort. How is this patch any different
> > > from adding the acl library or any other new API? Everything requires
> > > maintenence, thats how software works. What specfically about this patch series
> > > makes the effort insurmountable to you?
> > >
> > > You say you're improving your process. Great, this patch aids in that process
> > > by ensuring backwards compatibility for a period of time. Given that the API
> > > and ABI can still evolve within this framework, as I've described, how is this
> > > patch series not a significant step forward toward your goal of quality process.
> > >
> > > You say documentation isn't integrated. So, what does getting documentation
> > > integrated have to do with this patch set, or any other? I don't see you
> > > holding any other patches based on documentation. Again, nothing in this series
> > > prevents evolution of the API or ABI. If you're hope is to wait until
> > > everything is perfect, then apply some control to the public facing API, and get
> > > it all documented, none of thosse things will ever happen, I promise you.
> > >
> > > You say you also need to learn to use more tools to be more efficient and
> > > improve quality. Great! Thats exactly what this is. If we mandate even a short
> > > term commitment to ABI stability (1 single relese worth of time), we will
> > > quickly identify what API's change quickly and where we need to be cautious with
> > > our API design. If you just assume that developers will get better of their own
> > > volition, it will never happen.
> > >
> > > You say this should go in next year, but not now. When exactly? What event do
> > > you forsee occuring in the next 12-18 months that will change everything such
> > > that we can start supporing an ABI for more than just a few weeks at the head of
> > > the tree?
> > >
> > > To this end, I just did a quick search through the git history for dpdk to look
> > > at the histories of all the header files that are exposed via the makefile
> > > SYMLINK command (given that that provides a list of header files that
> > > applications can include, and embodies all the function symbols and data types
> > > applications have access to.
> > >
> > > There are 179 total commits in that list
> > > Of those, a bit of spot checking suggests that about 10-15% of them actually
> > > change ABI, and many of those came from Bruce's rework of the mbuf structure.
> > > That about 17-20 instances over the last 2 years where an ABI update would have
> > > been needed. That seems pretty reasonable to me. Where exactly is your concern
> > > here?
> >
> > Ping Thomas, I'd like to continue this debate to a conclusion. Could you please
> > provide specific details and/or concerns that you have with this patch series?
> >
> Ping again Thomas, please lets debate this to a reasonable consensus. Ignoring
> it won't help anything.
I'm not ignoring the discussion, I was trying to focus on other topics.
You're right, we need a conclusion.
This patch is an important change which needs time to be finely checked and
tested. So I plan to integrate it in version 2.0 which will be the next one
after 1.8 release. In the mean time you could test this patch with Fedora
and see how it helps application packaging. Then we could be more confident
that we are applying the right policy starting with 2.0.
Thanks Neil, I appreciate your involvement in DPDK
--
Thomas
^ permalink raw reply [flat|nested] 43+ messages in thread
* Re: [dpdk-dev] [PATCH 0/4] Add DSO symbol versioning to support backwards compatibility
2014-10-08 15:57 ` Thomas Monjalon
@ 2014-10-08 18:46 ` Butler, Siobhan A
2014-10-08 19:09 ` Neil Horman
1 sibling, 0 replies; 43+ messages in thread
From: Butler, Siobhan A @ 2014-10-08 18:46 UTC (permalink / raw)
To: Thomas Monjalon, Neil Horman; +Cc: dev
From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Thomas Monjalon
Sent: Wednesday, October 8, 2014 4:57 PM
To: Neil Horman
Cc: dev@dpdk.org
Subject: Re: [dpdk-dev] [PATCH 0/4] Add DSO symbol versioning to support backwards compatibility
Hi Neil,
2014-10-07 17:01, Neil Horman:
> On Wed, Oct 01, 2014 at 02:59:40PM -0400, Neil Horman wrote:
> > On Fri, Sep 26, 2014 at 10:45:49AM -0400, Neil Horman wrote:
> > > On Fri, Sep 26, 2014 at 12:41:33PM +0200, Thomas Monjalon wrote:
> > > > Hi Neil,
> > > >
> > > > 2014-09-24 14:19, Neil Horman:
> > > > > Ping Thomas. I know you're busy, but I would like this to not
> > > > > fall off anyones radar. You alluded to concerns regarding
> > > > > what, for lack of a better term, ABI/API lockin. I had asked
> > > > > you to enuumerate/elaborate on specifics, but never heard
> > > > > back. Are there further specifics you wish to discuss, or are you satisfied with the above answers?
> > > >
> > > > Sorry for not being very reactive on this thread.
> > > > All this discussion is very interesting but it's really not the
> > > > proper time to apply it. As you said, it requires an extra
> > > > effort. I'm not saying it will never be integrated. I'm just
> > > > saying that we cannot change everything at the same time.
> > > >
> > > > Let me sum up the situation. This community project has been
> > > > very active for few months now. First, we learnt how to make
> > > > some releases together and we are improving the process to be
> > > > able to deliver a new major release every 4 months while having some good quality process.
> > > > But these releases are still not complete because documentation
> > > > is not integrated yet. Then developers should have a role in documentation updates.
> > > > We also need to integrate and learn how to use more tools to be
> > > > more efficient and improve quality.
> > > >
> > > > So the question is "when should we care about API compatibility"?
> > > > And the answer is: ASAP, but not now. I feel next year is a better target.
> > > > Because the most important priority is to move together at a
> > > > pace which allow most of us to stay in the race.
> > >
> > > I'm sorry Thomas, I don't accept this. I asked you for details as
> > > to your concerns regarding this patch series, and you've provided more vague comments.
> > > I need details to address
> > >
> > > You say it requires extra effort, you're right it does. Any
> > > feature that you integreate requires some additional effort. How
> > > is this patch any different from adding the acl library or any
> > > other new API? Everything requires maintenence, thats how
> > > software works. What specfically about this patch series makes the effort insurmountable to you?
> > >
> > > You say you're improving your process. Great, this patch aids in
> > > that process by ensuring backwards compatibility for a period of
> > > time. Given that the API and ABI can still evolve within this
> > > framework, as I've described, how is this patch series not a significant step forward toward your goal of quality process.
> > >
> > > You say documentation isn't integrated. So, what does getting
> > > documentation integrated have to do with this patch set, or any
> > > other? I don't see you holding any other patches based on
> > > documentation. Again, nothing in this series prevents evolution
> > > of the API or ABI. If you're hope is to wait until everything is
> > > perfect, then apply some control to the public facing API, and get it all documented, none of thosse things will ever happen, I promise you.
> > >
> > > You say you also need to learn to use more tools to be more
> > > efficient and improve quality. Great! Thats exactly what this
> > > is. If we mandate even a short term commitment to ABI stability (1
> > > single relese worth of time), we will quickly identify what API's
> > > change quickly and where we need to be cautious with our API
> > > design. If you just assume that developers will get better of their own volition, it will never happen.
> > >
> > > You say this should go in next year, but not now. When exactly?
> > > What event do you forsee occuring in the next 12-18 months that
> > > will change everything such that we can start supporing an ABI for
> > > more than just a few weeks at the head of the tree?
> > >
> > > To this end, I just did a quick search through the git history for
> > > dpdk to look at the histories of all the header files that are
> > > exposed via the makefile SYMLINK command (given that that provides
> > > a list of header files that applications can include, and embodies
> > > all the function symbols and data types applications have access to.
> > >
> > > There are 179 total commits in that list Of those, a bit of spot
> > > checking suggests that about 10-15% of them actually change ABI,
> > > and many of those came from Bruce's rework of the mbuf structure.
> > > That about 17-20 instances over the last 2 years where an ABI
> > > update would have been needed. That seems pretty reasonable to
> > > me. Where exactly is your concern here?
> >
> > Ping Thomas, I'd like to continue this debate to a conclusion.
> > Could you please provide specific details and/or concerns that you have with this patch series?
> >
> Ping again Thomas, please lets debate this to a reasonable consensus.
> Ignoring it won't help anything.
>>>I'm not ignoring the discussion, I was trying to focus on other topics.
>>>You're right, we need a conclusion.
>>>This patch is an important change which needs time to be finely checked and tested. So I plan to integrate it in version 2.0 which will be the next one >>>after 1.8 release. In the mean time you could test this patch with Fedora and see how it helps application packaging. Then we could be more confident >>>that we are applying the right policy starting with 2.0.
>>>Thanks Neil, I appreciate your involvement in DPDK
>>>--
>>>Thomas
Neil, Thomas,
I think Neil is correct here - these API/ABI compatibility/stability changes are really important. We need a conclusion as you both mentioned. I see Thomas' points about caution and needing time, but it seems like there is no point in prolonging the inevitable and having consider all of this for some time I think it might be wise to just adjust and get on with it? If these changes cannot be ready in the near term, what will make them more ready further out?
Siobhan
^ permalink raw reply [flat|nested] 43+ messages in thread
* Re: [dpdk-dev] [PATCH 0/4] Add DSO symbol versioning to support backwards compatibility
2014-10-08 15:57 ` Thomas Monjalon
2014-10-08 18:46 ` Butler, Siobhan A
@ 2014-10-08 19:09 ` Neil Horman
1 sibling, 0 replies; 43+ messages in thread
From: Neil Horman @ 2014-10-08 19:09 UTC (permalink / raw)
To: Thomas Monjalon; +Cc: dev
On Wed, Oct 08, 2014 at 05:57:29PM +0200, Thomas Monjalon wrote:
> Hi Neil,
>
> 2014-10-07 17:01, Neil Horman:
> > On Wed, Oct 01, 2014 at 02:59:40PM -0400, Neil Horman wrote:
> > > On Fri, Sep 26, 2014 at 10:45:49AM -0400, Neil Horman wrote:
> > > > On Fri, Sep 26, 2014 at 12:41:33PM +0200, Thomas Monjalon wrote:
> > > > > Hi Neil,
> > > > >
> > > > > 2014-09-24 14:19, Neil Horman:
> > > > > > Ping Thomas. I know you're busy, but I would like this to not fall off anyones
> > > > > > radar. You alluded to concerns regarding what, for lack of a better term,
> > > > > > ABI/API lockin. I had asked you to enuumerate/elaborate on specifics, but never
> > > > > > heard back. Are there further specifics you wish to discuss, or are you
> > > > > > satisfied with the above answers?
> > > > >
> > > > > Sorry for not being very reactive on this thread.
> > > > > All this discussion is very interesting but it's really not the proper
> > > > > time to apply it. As you said, it requires an extra effort. I'm not saying
> > > > > it will never be integrated. I'm just saying that we cannot change
> > > > > everything at the same time.
> > > > >
> > > > > Let me sum up the situation. This community project has been very active
> > > > > for few months now. First, we learnt how to make some releases together
> > > > > and we are improving the process to be able to deliver a new major release
> > > > > every 4 months while having some good quality process.
> > > > > But these releases are still not complete because documentation is not
> > > > > integrated yet. Then developers should have a role in documentation updates.
> > > > > We also need to integrate and learn how to use more tools to be more
> > > > > efficient and improve quality.
> > > > >
> > > > > So the question is "when should we care about API compatibility"?
> > > > > And the answer is: ASAP, but not now. I feel next year is a better target.
> > > > > Because the most important priority is to move together at a pace which
> > > > > allow most of us to stay in the race.
> > > >
> > > > I'm sorry Thomas, I don't accept this. I asked you for details as to your
> > > > concerns regarding this patch series, and you've provided more vague comments.
> > > > I need details to address
> > > >
> > > > You say it requires extra effort, you're right it does. Any feature that you
> > > > integreate requires some additional effort. How is this patch any different
> > > > from adding the acl library or any other new API? Everything requires
> > > > maintenence, thats how software works. What specfically about this patch series
> > > > makes the effort insurmountable to you?
> > > >
> > > > You say you're improving your process. Great, this patch aids in that process
> > > > by ensuring backwards compatibility for a period of time. Given that the API
> > > > and ABI can still evolve within this framework, as I've described, how is this
> > > > patch series not a significant step forward toward your goal of quality process.
> > > >
> > > > You say documentation isn't integrated. So, what does getting documentation
> > > > integrated have to do with this patch set, or any other? I don't see you
> > > > holding any other patches based on documentation. Again, nothing in this series
> > > > prevents evolution of the API or ABI. If you're hope is to wait until
> > > > everything is perfect, then apply some control to the public facing API, and get
> > > > it all documented, none of thosse things will ever happen, I promise you.
> > > >
> > > > You say you also need to learn to use more tools to be more efficient and
> > > > improve quality. Great! Thats exactly what this is. If we mandate even a short
> > > > term commitment to ABI stability (1 single relese worth of time), we will
> > > > quickly identify what API's change quickly and where we need to be cautious with
> > > > our API design. If you just assume that developers will get better of their own
> > > > volition, it will never happen.
> > > >
> > > > You say this should go in next year, but not now. When exactly? What event do
> > > > you forsee occuring in the next 12-18 months that will change everything such
> > > > that we can start supporing an ABI for more than just a few weeks at the head of
> > > > the tree?
> > > >
> > > > To this end, I just did a quick search through the git history for dpdk to look
> > > > at the histories of all the header files that are exposed via the makefile
> > > > SYMLINK command (given that that provides a list of header files that
> > > > applications can include, and embodies all the function symbols and data types
> > > > applications have access to.
> > > >
> > > > There are 179 total commits in that list
> > > > Of those, a bit of spot checking suggests that about 10-15% of them actually
> > > > change ABI, and many of those came from Bruce's rework of the mbuf structure.
> > > > That about 17-20 instances over the last 2 years where an ABI update would have
> > > > been needed. That seems pretty reasonable to me. Where exactly is your concern
> > > > here?
> > >
> > > Ping Thomas, I'd like to continue this debate to a conclusion. Could you please
> > > provide specific details and/or concerns that you have with this patch series?
> > >
> > Ping again Thomas, please lets debate this to a reasonable consensus. Ignoring
> > it won't help anything.
>
> I'm not ignoring the discussion, I was trying to focus on other topics.
>
for 2 weeks? In that time frame, it seems like this could have made 1.8, but I
suppose thats neither here nor there.
> You're right, we need a conclusion.
> This patch is an important change which needs time to be finely checked and
> tested.
Not sure I understand this. At the moment, all this patch introduces in
infrastructure, testing has been done on it, to ensure that it allows for
multiple versions of a function to exist (See Sergios comments). Beyond that,
this patch should do nothing, save for restrict the symbol export list to the
set of symbols you expose as an API. That last bit was why I was so eager to
get this in weeks ago, so people could do builds and make sure no symbols were
missed). But from a functional standpoint, this patch current does nothing (nor
should it). Its functionality (and need for testing) comes only when the next
ABI change arrives, and we need to ensure that both old and new versions of a
given function work.
> So I plan to integrate it in version 2.0 which will be the next one
> after 1.8 release.
What do you see as the advantage to waiting longer here? Already this patch
likely will need some fixups because of API changing patches integrated ahead of
the time I posted it. As noted above, this series just install infrastructure,
its doesn't actively "do" anything right now, nor should it. It will only allow
developers to do something after you integrate it and ABI needs to change (in
that order). By waiting longer, the only thing that happens is that the export
map file become more out of date.
> In the mean time you could test this patch with Fedora
> and see how it helps application packaging. Then we could be more confident
> that we are applying the right policy starting with 2.0.
>
Again, I could add this patch to fedora, but without a subsequent change that
introduces an ABI incompatibility that we need to provide backwards
compatibility for, this patch will be functionally invisible. I'm not sure what
the goal of doing something like that would be. If you have a specific goal in
mind, please let me know and I gladly consider it, I just don't see it at the
moment.
> Thanks Neil, I appreciate your involvement in DPDK
And I yours. I'm sorry for being so beligerent about this, but it seems to me
that, without raising my voice, this would go nowhere.
Neil
> --
> Thomas
>
^ permalink raw reply [flat|nested] 43+ messages in thread
* [dpdk-dev] [PATCH 2/4] Provide initial versioning for all DPDK libraries
2014-12-20 21:01 [dpdk-dev] Add DSO symbol versioning to supportbackwards compatibility Neil Horman
@ 2014-12-20 21:01 ` Neil Horman
0 siblings, 0 replies; 43+ messages in thread
From: Neil Horman @ 2014-12-20 21:01 UTC (permalink / raw)
To: dev
Add linker version script files to each DPDK library to put a stake in the
ground from which we can start cleaning up API's
Signed-off-by: Neil Horman <nhorman@tuxdriver.com>
CC: Thomas Monjalon <thomas.monjalon@6wind.com>
CC: "Richardson, Bruce" <bruce.richardson@intel.com>
---
lib/librte_acl/Makefile | 2 +
lib/librte_acl/rte_acl_version.map | 21 ++++
lib/librte_cfgfile/Makefile | 2 +
lib/librte_cfgfile/rte_cfgfile_version.map | 14 +++
lib/librte_cmdline/Makefile | 2 +
lib/librte_cmdline/rte_cmdline_version.map | 69 +++++++++++++
lib/librte_distributor/Makefile | 2 +
lib/librte_distributor/rte_distributor_version.map | 16 +++
lib/librte_eal/bsdapp/eal/Makefile | 2 +
lib/librte_eal/bsdapp/eal/rte_eal_version.map | 90 ++++++++++++++++
lib/librte_eal/linuxapp/eal/Makefile | 2 +
lib/librte_eal/linuxapp/eal/rte_eal_version.map | 90 ++++++++++++++++
lib/librte_ether/Makefile | 2 +
lib/librte_ether/rte_ether_version.map | 113 +++++++++++++++++++++
lib/librte_hash/Makefile | 2 +
lib/librte_hash/rte_hash_version.map | 18 ++++
lib/librte_ip_frag/Makefile | 2 +
lib/librte_ip_frag/rte_ipfrag_version.map | 14 +++
lib/librte_ivshmem/Makefile | 2 +
lib/librte_ivshmem/rte_ivshmem_version.map | 13 +++
lib/librte_kni/Makefile | 2 +
lib/librte_kni/rte_kni_version.map | 20 ++++
lib/librte_kvargs/Makefile | 2 +
lib/librte_kvargs/rte_kvargs_version.map | 10 ++
lib/librte_lpm/Makefile | 2 +
lib/librte_lpm/rte_lpm_version.map | 24 +++++
lib/librte_malloc/Makefile | 2 +
lib/librte_malloc/rte_malloc_version.map | 19 ++++
lib/librte_mbuf/Makefile | 2 +
lib/librte_mbuf/rte_mbuf_version.map | 14 +++
lib/librte_mempool/Makefile | 2 +
lib/librte_mempool/rte_mempool_version.map | 18 ++++
lib/librte_meter/Makefile | 2 +
lib/librte_meter/rte_meter_version.map | 13 +++
lib/librte_pipeline/Makefile | 2 +
lib/librte_pipeline/rte_pipeline_version.map | 23 +++++
lib/librte_pmd_af_packet/Makefile | 2 +
.../rte_pmd_af_packet_version.map | 7 ++
lib/librte_pmd_bond/Makefile | 2 +
lib/librte_pmd_bond/rte_eth_bond_version.map | 21 ++++
lib/librte_pmd_e1000/Makefile | 2 +
lib/librte_pmd_e1000/rte_pmd_e1000_version.map | 5 +
lib/librte_pmd_enic/Makefile | 2 +
lib/librte_pmd_enic/rte_pmd_enic_version.map | 5 +
lib/librte_pmd_i40e/Makefile | 2 +
lib/librte_pmd_i40e/rte_pmd_i40e_version.map | 5 +
lib/librte_pmd_ixgbe/Makefile | 2 +
lib/librte_pmd_ixgbe/rte_pmd_ixgbe_version.map | 5 +
lib/librte_pmd_pcap/Makefile | 2 +
lib/librte_pmd_pcap/rte_pmd_pcap_version.map | 5 +
lib/librte_pmd_ring/Makefile | 2 +
lib/librte_pmd_ring/rte_eth_ring.c | 2 +-
lib/librte_pmd_ring/rte_eth_ring.h | 6 --
lib/librte_pmd_ring/rte_eth_ring_version.map | 10 ++
lib/librte_pmd_virtio/Makefile | 1 +
lib/librte_pmd_virtio/rte_pmd_virtio_version.map | 5 +
lib/librte_pmd_vmxnet3/Makefile | 2 +
lib/librte_pmd_vmxnet3/rte_pmd_vmxnet3_version.map | 5 +
lib/librte_pmd_xenvirt/Makefile | 2 +
lib/librte_pmd_xenvirt/rte_eth_xenvirt_version.map | 8 ++
lib/librte_port/Makefile | 2 +
lib/librte_port/rte_port_version.map | 18 ++++
lib/librte_power/Makefile | 2 +
lib/librte_power/rte_power_version.map | 18 ++++
lib/librte_ring/Makefile | 2 +
lib/librte_ring/rte_ring_version.map | 12 +++
lib/librte_sched/Makefile | 2 +
lib/librte_sched/rte_sched_version.map | 22 ++++
lib/librte_table/Makefile | 2 +
lib/librte_table/rte_table_version.map | 22 ++++
lib/librte_timer/Makefile | 2 +
lib/librte_timer/rte_timer_version.map | 16 +++
lib/librte_vhost/Makefile | 2 +
lib/librte_vhost/rte_vhost_version.map | 14 +++
74 files changed, 874 insertions(+), 7 deletions(-)
create mode 100644 lib/librte_acl/rte_acl_version.map
create mode 100644 lib/librte_cfgfile/rte_cfgfile_version.map
create mode 100644 lib/librte_cmdline/rte_cmdline_version.map
create mode 100644 lib/librte_distributor/rte_distributor_version.map
create mode 100644 lib/librte_eal/bsdapp/eal/rte_eal_version.map
create mode 100644 lib/librte_eal/linuxapp/eal/rte_eal_version.map
create mode 100644 lib/librte_ether/rte_ether_version.map
create mode 100644 lib/librte_hash/rte_hash_version.map
create mode 100644 lib/librte_ip_frag/rte_ipfrag_version.map
create mode 100644 lib/librte_ivshmem/rte_ivshmem_version.map
create mode 100644 lib/librte_kni/rte_kni_version.map
create mode 100644 lib/librte_kvargs/rte_kvargs_version.map
create mode 100644 lib/librte_lpm/rte_lpm_version.map
create mode 100644 lib/librte_malloc/rte_malloc_version.map
create mode 100644 lib/librte_mbuf/rte_mbuf_version.map
create mode 100644 lib/librte_mempool/rte_mempool_version.map
create mode 100644 lib/librte_meter/rte_meter_version.map
create mode 100644 lib/librte_pipeline/rte_pipeline_version.map
create mode 100644 lib/librte_pmd_af_packet/rte_pmd_af_packet_version.map
create mode 100644 lib/librte_pmd_bond/rte_eth_bond_version.map
create mode 100644 lib/librte_pmd_e1000/rte_pmd_e1000_version.map
create mode 100644 lib/librte_pmd_enic/rte_pmd_enic_version.map
create mode 100644 lib/librte_pmd_i40e/rte_pmd_i40e_version.map
create mode 100644 lib/librte_pmd_ixgbe/rte_pmd_ixgbe_version.map
create mode 100644 lib/librte_pmd_pcap/rte_pmd_pcap_version.map
create mode 100644 lib/librte_pmd_ring/rte_eth_ring_version.map
create mode 100644 lib/librte_pmd_virtio/rte_pmd_virtio_version.map
create mode 100644 lib/librte_pmd_vmxnet3/rte_pmd_vmxnet3_version.map
create mode 100644 lib/librte_pmd_xenvirt/rte_eth_xenvirt_version.map
create mode 100644 lib/librte_port/rte_port_version.map
create mode 100644 lib/librte_power/rte_power_version.map
create mode 100644 lib/librte_ring/rte_ring_version.map
create mode 100644 lib/librte_sched/rte_sched_version.map
create mode 100644 lib/librte_table/rte_table_version.map
create mode 100644 lib/librte_timer/rte_timer_version.map
create mode 100644 lib/librte_vhost/rte_vhost_version.map
diff --git a/lib/librte_acl/Makefile b/lib/librte_acl/Makefile
index 65e566d..1f96645 100644
--- a/lib/librte_acl/Makefile
+++ b/lib/librte_acl/Makefile
@@ -37,6 +37,8 @@ LIB = librte_acl.a
CFLAGS += -O3
CFLAGS += $(WERROR_FLAGS) -I$(SRCDIR)
+EXPORT_MAP := $(RTE_SDK)/lib/librte_acl/rte_acl_version.map
+
# all source are stored in SRCS-y
SRCS-$(CONFIG_RTE_LIBRTE_ACL) += tb_mem.c
diff --git a/lib/librte_acl/rte_acl_version.map b/lib/librte_acl/rte_acl_version.map
new file mode 100644
index 0000000..9f05a86
--- /dev/null
+++ b/lib/librte_acl/rte_acl_version.map
@@ -0,0 +1,21 @@
+DPDK_1.8 {
+ global:
+ rte_acl_create;
+ rte_acl_find_existing;
+ rte_acl_free;
+ rte_acl_add_rules;
+ rte_acl_reset_rules;
+ rte_acl_build;
+ rte_acl_reset;
+ rte_acl_classify;
+ rte_acl_dump;
+ rte_acl_list_dump;
+ rte_acl_ipv4vlan_add_rules;
+ rte_acl_ipv4vlan_build;
+ rte_acl_classify_scalar;
+ rte_acl_classify_alg;
+ rte_acl_set_ctx_classify;
+
+ local: *;
+};
+
diff --git a/lib/librte_cfgfile/Makefile b/lib/librte_cfgfile/Makefile
index 55e8701..e655098 100644
--- a/lib/librte_cfgfile/Makefile
+++ b/lib/librte_cfgfile/Makefile
@@ -39,6 +39,8 @@ LIB = librte_cfgfile.a
CFLAGS += -O3
CFLAGS += $(WERROR_FLAGS)
+EXPORT_MAP := $(RTE_SDK)/lib/librte_cfgfile/rte_cfgfile_version.map
+
#
# all source are stored in SRCS-y
#
diff --git a/lib/librte_cfgfile/rte_cfgfile_version.map b/lib/librte_cfgfile/rte_cfgfile_version.map
new file mode 100644
index 0000000..10ecea6
--- /dev/null
+++ b/lib/librte_cfgfile/rte_cfgfile_version.map
@@ -0,0 +1,14 @@
+DPDK_1.8 {
+ global:
+ rte_cfgfile_load;
+ rte_cfgfile_num_sections;
+ rte_cfgfile_sections;
+ rte_cfgfile_has_section;
+ rte_cfgfile_section_num_entries;
+ rte_cfgfile_section_entries;
+ rte_cfgfile_get_entry;
+ rte_cfgfile_has_entry;
+ rte_cfgfile_close;
+
+ local: *;
+};
diff --git a/lib/librte_cmdline/Makefile b/lib/librte_cmdline/Makefile
index 7eae449..1a47173 100644
--- a/lib/librte_cmdline/Makefile
+++ b/lib/librte_cmdline/Makefile
@@ -36,6 +36,8 @@ LIB = librte_cmdline.a
CFLAGS += $(WERROR_FLAGS) -I$(SRCDIR) -O3
+EXPORT_MAP := $(RTE_SDK)/lib/librte_cmdline/rte_cmdline_version.map
+
# all source are stored in SRCS-y
SRCS-$(CONFIG_RTE_LIBRTE_CMDLINE) := cmdline.c
SRCS-$(CONFIG_RTE_LIBRTE_CMDLINE) += cmdline_cirbuf.c
diff --git a/lib/librte_cmdline/rte_cmdline_version.map b/lib/librte_cmdline/rte_cmdline_version.map
new file mode 100644
index 0000000..7616eff
--- /dev/null
+++ b/lib/librte_cmdline/rte_cmdline_version.map
@@ -0,0 +1,69 @@
+DPDK_1.8 {
+ global:
+ cmdline_new;
+ cmdline_set_prompt;
+ cmdline_free;
+ cmdline_printf;
+ cmdline_in;
+ cmdline_write_char;
+ cmdline_interact;
+ cmdline_quit;
+ cmdline_parse;
+ cmdline_complete;
+ cmdline_isendoftoken;
+ cmdline_parse_num;
+ cmdline_get_help_num;
+ cmdline_parse_ipaddr;
+ cmdline_get_help_ipaddr;
+ cmdline_parse_etheraddr;
+ cmdline_get_help_etheraddr;
+ cmdline_parse_string;
+ cmdline_complete_get_nb_string;
+ cmdline_complete_get_elt_string;
+ cmdline_get_help_string;
+ cmdline_parse_portlist;
+ cmdline_get_help_portlist;
+ cmdline_token_string_ops;
+ cmdline_token_num_ops;
+ cmdline_token_string_ops;
+ cmdline_token_ipaddr_ops;
+ cmdline_token_etheraddr_ops;
+ vt100_init;
+ vt100_parser;
+ cmdline_file_new;
+ cmdline_stdin_new;
+ cmdline_stdin_exit;
+ cirbuf_init;
+ cirbuf_add_head_safe;
+ cirbuf_add_head;
+ cirbuf_add_tail_safe;
+ cirbuf_add_tail;
+ cirbuf_del_head_safe;
+ cirbuf_del_head;
+ cirbuf_del_tail_safe;
+ cirbuf_del_tail;
+ cirbuf_get_head;
+ cirbuf_get_tail;
+ cirbuf_add_buf_head;
+ cirbuf_add_buf_tail;
+ cirbuf_del_buf_head;
+ cirbuf_del_buf_tail;
+ cirbuf_get_buf_head;
+ cirbuf_get_buf_tail;
+ cirbuf_align_left;
+ cirbuf_align_right;
+ rdline_init;
+ rdline_newline;
+ rdline_stop;
+ rdline_quit;
+ rdline_restart;
+ rdline_redisplay;
+ rdline_reset;
+ rdline_char_in;
+ rdline_get_buffer;
+ rdline_add_history;
+ rdline_clear_history;
+ rdline_get_history_item;
+
+ local: *;
+};
diff --git a/lib/librte_distributor/Makefile b/lib/librte_distributor/Makefile
index 36699f8..97d8bbb 100644
--- a/lib/librte_distributor/Makefile
+++ b/lib/librte_distributor/Makefile
@@ -37,6 +37,8 @@ LIB = librte_distributor.a
CFLAGS += -O3
CFLAGS += $(WERROR_FLAGS) -I$(SRCDIR)
+EXPORT_MAP := $(RTE_SDK)/lib/librte_distributor/rte_distributor_version.map
+
# all source are stored in SRCS-y
SRCS-$(CONFIG_RTE_LIBRTE_DISTRIBUTOR) := rte_distributor.c
diff --git a/lib/librte_distributor/rte_distributor_version.map b/lib/librte_distributor/rte_distributor_version.map
new file mode 100644
index 0000000..b81ddc8
--- /dev/null
+++ b/lib/librte_distributor/rte_distributor_version.map
@@ -0,0 +1,16 @@
+DPDK_1.8 {
+
+ global:
+ rte_distributor_create;
+ rte_distributor_process;
+ rte_distributor_returned_pkts;
+ rte_distributor_flush;
+ rte_distributor_clear_returns;
+ rte_distributor_get_pkt;
+ rte_distributor_return_pkt;
+ rte_distributor_request_pkt;
+ rte_distributor_poll_pkt;
+
+ local: *;
+};
+
diff --git a/lib/librte_eal/bsdapp/eal/Makefile b/lib/librte_eal/bsdapp/eal/Makefile
index d434882..b28a8b7 100644
--- a/lib/librte_eal/bsdapp/eal/Makefile
+++ b/lib/librte_eal/bsdapp/eal/Makefile
@@ -46,6 +46,8 @@ CFLAGS += -I$(RTE_SDK)/lib/librte_pmd_ring
CFLAGS += -I$(RTE_SDK)/lib/librte_pmd_pcap
CFLAGS += $(WERROR_FLAGS) -O3
+EXPORT_MAP := $(RTE_SDK)/lib/librte_eal/bsdapp/eal/rte_eal_version.map
+
# specific to linuxapp exec-env
SRCS-$(CONFIG_RTE_LIBRTE_EAL_BSDAPP) := eal.c
SRCS-$(CONFIG_RTE_LIBRTE_EAL_BSDAPP) += eal_memory.c
diff --git a/lib/librte_eal/bsdapp/eal/rte_eal_version.map b/lib/librte_eal/bsdapp/eal/rte_eal_version.map
new file mode 100644
index 0000000..498130d
--- /dev/null
+++ b/lib/librte_eal/bsdapp/eal/rte_eal_version.map
@@ -0,0 +1,90 @@
+DPDK_1.8 {
+ global:
+ rte_eal_alarm_set;
+ rte_eal_alarm_cancel;
+ rte_exit;
+ rte_cpu_get_flag_enabled;
+ rte_cpu_check_supported;
+ rte_get_tsc_hz;
+ rte_get_hpet_cycles;
+ rte_get_hpet_hz;
+ rte_eal_hpet_init;
+ rte_delay_us;
+ rte_dump_stack;
+ rte_dump_registers;
+ __rte_panic;
+ rte_eal_devargs_add;
+ rte_eal_devargs_type_count;
+ rte_eal_devargs_dump;
+ rte_eal_driver_register;
+ rte_eal_driver_unregister;
+ rte_eal_dev_init;
+ rte_eal_init;
+ rte_set_application_usage_hook;
+ rte_eal_has_hugepages;
+ rte_strerror;
+ rte_hexdump;
+ rte_memdump;
+ rte_intr_callback_register;
+ rte_intr_callback_unregister;
+ rte_intr_enable;
+ rte_intr_disable;
+ rte_eal_remote_launch;
+ rte_eal_mp_remote_launch;
+ rte_eal_get_lcore_state;
+ rte_eal_wait_lcore;
+ rte_eal_mp_wait_lcore;
+ rte_openlog_stream;
+ rte_set_log_level;
+ rte_set_log_type;
+ rte_log_cur_msg_loglevel;
+ rte_log_cur_msg_logtype;
+ rte_log_set_history;
+ rte_log_dump_history;
+ rte_log_add_in_history;
+ rte_log;
+ rte_vlog;
+ rte_mem_lock_page;
+ rte_mem_virt2phy;
+ rte_eal_get_physmem_layout;
+ rte_dump_physmem_layout;
+ rte_eal_get_physmem_size;
+ rte_memory_get_nchannel;
+ rte_memory_get_nrank;
+ rte_mem_phy2mch;
+ rte_xen_dom0_memory_init;
+ rte_xen_dom0_memory_attach;
+ rte_memzone_reserve;
+ rte_memzone_reserve_aligned;
+ rte_memzone_reserve_bounded;
+ rte_memzone_lookup;
+ rte_memzone_dump;
+ rte_memzone_walk;
+ rte_eal_pci_probe;
+ rte_eal_pci_dump;
+ rte_eal_pci_register;
+ rte_eal_pci_unregister;
+ rte_snprintf;
+ rte_strsplit;
+ rte_eal_tailq_reserve;
+ rte_eal_tailq_reserve_by_idx;
+ rte_dump_tailq;
+ rte_eal_tailq_lookup;
+ rte_eal_tailq_lookup_by_idx;
+ lcore_config;
+ per_lcore__lcore_id;
+ eal_timer_source;
+ rte_cycles_vmware_tsc_map;
+ rte_eal_get_configuration;
+ rte_logs;
+ rte_eal_lcore_role;
+ test_mp_secondary;
+ rte_eal_process_type;
+ per_lcore__rte_errno;
+ pci_device_list;
+ devargs_list;
+ eal_parse_sysfs_value;
+ pci_driver_list;
+
+ local: *;
+};
diff --git a/lib/librte_eal/linuxapp/eal/Makefile b/lib/librte_eal/linuxapp/eal/Makefile
index 72ecf3a..4f1b11f 100644
--- a/lib/librte_eal/linuxapp/eal/Makefile
+++ b/lib/librte_eal/linuxapp/eal/Makefile
@@ -33,6 +33,8 @@ include $(RTE_SDK)/mk/rte.vars.mk
LIB = librte_eal.a
+EXPORT_MAP := $(RTE_SDK)/lib/librte_eal/linuxapp/eal/rte_eal_version.map
+
VPATH += $(RTE_SDK)/lib/librte_eal/common
CFLAGS += -I$(SRCDIR)/include
diff --git a/lib/librte_eal/linuxapp/eal/rte_eal_version.map b/lib/librte_eal/linuxapp/eal/rte_eal_version.map
new file mode 100644
index 0000000..498130d
--- /dev/null
+++ b/lib/librte_eal/linuxapp/eal/rte_eal_version.map
@@ -0,0 +1,90 @@
+DPDK_1.8 {
+ global:
+ rte_eal_alarm_set;
+ rte_eal_alarm_cancel;
+ rte_exit;
+ rte_cpu_get_flag_enabled;
+ rte_cpu_check_supported;
+ rte_get_tsc_hz;
+ rte_get_hpet_cycles;
+ rte_get_hpet_hz;
+ rte_eal_hpet_init;
+ rte_delay_us;
+ rte_dump_stack;
+ rte_dump_registers;
+ __rte_panic;
+ rte_eal_devargs_add;
+ rte_eal_devargs_type_count;
+ rte_eal_devargs_dump;
+ rte_eal_driver_register;
+ rte_eal_driver_unregister;
+ rte_eal_dev_init;
+ rte_eal_init;
+ rte_set_application_usage_hook;
+ rte_eal_has_hugepages;
+ rte_strerror;
+ rte_hexdump;
+ rte_memdump;
+ rte_intr_callback_register;
+ rte_intr_callback_unregister;
+ rte_intr_enable;
+ rte_intr_disable;
+ rte_eal_remote_launch;
+ rte_eal_mp_remote_launch;
+ rte_eal_get_lcore_state;
+ rte_eal_wait_lcore;
+ rte_eal_mp_wait_lcore;
+ rte_openlog_stream;
+ rte_set_log_level;
+ rte_set_log_type;
+ rte_log_cur_msg_loglevel;
+ rte_log_cur_msg_logtype;
+ rte_log_set_history;
+ rte_log_dump_history;
+ rte_log_add_in_history;
+ rte_log;
+ rte_vlog;
+ rte_mem_lock_page;
+ rte_mem_virt2phy;
+ rte_eal_get_physmem_layout;
+ rte_dump_physmem_layout;
+ rte_eal_get_physmem_size;
+ rte_memory_get_nchannel;
+ rte_memory_get_nrank;
+ rte_mem_phy2mch;
+ rte_xen_dom0_memory_init;
+ rte_xen_dom0_memory_attach;
+ rte_memzone_reserve;
+ rte_memzone_reserve_aligned;
+ rte_memzone_reserve_bounded;
+ rte_memzone_lookup;
+ rte_memzone_dump;
+ rte_memzone_walk;
+ rte_eal_pci_probe;
+ rte_eal_pci_dump;
+ rte_eal_pci_register;
+ rte_eal_pci_unregister;
+ rte_snprintf;
+ rte_strsplit;
+ rte_eal_tailq_reserve;
+ rte_eal_tailq_reserve_by_idx;
+ rte_dump_tailq;
+ rte_eal_tailq_lookup;
+ rte_eal_tailq_lookup_by_idx;
+ lcore_config;
+ per_lcore__lcore_id;
+ eal_timer_source;
+ rte_cycles_vmware_tsc_map;
+ rte_eal_get_configuration;
+ rte_logs;
+ rte_eal_lcore_role;
+ test_mp_secondary;
+ rte_eal_process_type;
+ per_lcore__rte_errno;
+ pci_device_list;
+ devargs_list;
+ eal_parse_sysfs_value;
+ pci_driver_list;
+
+ local: *;
+};
diff --git a/lib/librte_ether/Makefile b/lib/librte_ether/Makefile
index a461c31..6250f4d 100644
--- a/lib/librte_ether/Makefile
+++ b/lib/librte_ether/Makefile
@@ -39,6 +39,8 @@ LIB = libethdev.a
CFLAGS += -O3
CFLAGS += $(WERROR_FLAGS)
+EXPORT_MAP := $(RTE_SDK)/lib/librte_ether/rte_ether_version.map
+
SRCS-y += rte_ethdev.c
#
diff --git a/lib/librte_ether/rte_ether_version.map b/lib/librte_ether/rte_ether_version.map
new file mode 100644
index 0000000..dbd0eca
--- /dev/null
+++ b/lib/librte_ether/rte_ether_version.map
@@ -0,0 +1,113 @@
+DPDK_1.8 {
+ global:
+ rte_eth_driver_register;
+ rte_eth_dev_configure;
+ rte_eth_rx_queue_setup;
+ rte_eth_tx_queue_setup;
+ rte_eth_dev_socket_id;
+ rte_eth_dev_rx_queue_start;
+ rte_eth_dev_rx_queue_stop;
+ rte_eth_dev_tx_queue_start;
+ rte_eth_dev_tx_queue_stop;
+ rte_eth_dev_start;
+ rte_eth_dev_stop;
+ rte_eth_dev_set_link_up;
+ rte_eth_dev_set_link_down;
+ rte_eth_dev_close;
+ rte_eth_promiscuous_enable;
+ rte_eth_promiscuous_disable;
+ rte_eth_promiscuous_get;
+ rte_eth_allmulticast_enable;
+ rte_eth_allmulticast_disable;
+ rte_eth_allmulticast_get;
+ rte_eth_link;
+ rte_eth_link_get_nowait;
+ rte_eth_stats;
+ rte_eth_stats_reset;
+ rte_eth_dev_set_tx_queue_stats_mapping;
+ rte_eth_dev_set_rx_queue_stats_mapping;
+ rte_eth_macaddr_get;
+ rte_eth_dev_info_get;
+ rte_eth_dev_get_mtu;
+ rte_eth_dev_set_mtu;
+ rte_eth_dev_vlan_filter;
+ rte_eth_dev_set_vlan_strip_on_queue;
+ rte_eth_dev_set_vlan_ether_type;
+ rte_eth_dev_set_vlan_offload;
+ rte_eth_dev_get_vlan_offload;
+ rte_eth_dev_set_vlan_pvid;
+ rte_eth_rx_burst;
+ rte_eth_rx_queue_count;
+ rte_eth_rx_descriptor_done;
+ rte_eth_tx_burst;
+ rte_eth_dev_fdir_add_signature_filter;
+ rte_eth_dev_fdir_update_signature_filter;
+ rte_eth_dev_fdir_remove_signature_filter;
+ rte_eth_dev_fdir_get_infos;
+ rte_eth_dev_fdir_add_perfect_filter;
+ rte_eth_dev_fdir_update_perfect_filter;
+ rte_eth_dev_fdir_remove_perfect_filter;
+ rte_eth_dev_fdir_set_masks;
+ rte_eth_dev_callback_register;
+ rte_eth_dev_callback_unregister;
+ rte_eth_dev_callback_process;
+ rte_eth_led_on;
+ rte_eth_led_off;
+ rte_eth_dev_flow_ctrl_get;
+ rte_eth_dev_flow_ctrl_set;
+ rte_eth_dev_priority_flow_ctrl_set;
+ rte_eth_dev_mac_addr_add;
+ rte_eth_dev_mac_addr_remove;
+ rte_eth_dev_rss_reta_update;
+ rte_eth_dev_rss_reta_query;
+ rte_eth_dev_uc_hash_table_set;
+ rte_eth_dev_uc_all_hash_table_set;
+ rte_eth_dev_set_vf_rxmode;
+ rte_eth_dev_set_vf_tx;
+ rte_eth_dev_set_vf_rx;
+ rte_eth_dev_set_vf_vlan_filter;
+ rte_eth_mirror_rule_set;
+ rte_eth_mirror_rule_reset;
+ rte_eth_set_queue_rate_limit;
+ rte_eth_set_vf_rate_limit;
+ rte_eth_dev_bypass_init;
+ rte_eth_dev_bypass_state_show;
+ rte_eth_dev_bypass_state_set;
+ rte_eth_dev_bypass_event_show;
+ rte_eth_dev_bypass_event_store;
+ rte_eth_dev_wd_timeout_store;
+ rte_eth_dev_bypass_ver_show;
+ rte_eth_dev_bypass_wd_timeout_show;
+ rte_eth_dev_bypass_wd_reset;
+ rte_eth_dev_rss_hash_update;
+ rte_eth_dev_rss_hash_conf_get;
+ rte_eth_dev_add_syn_filter;
+ rte_eth_dev_remove_syn_filter;
+ rte_eth_dev_get_syn_filter;
+ rte_eth_dev_add_ethertype_filter;
+ rte_eth_dev_remove_ethertype_filter;
+ rte_eth_dev_get_ethertype_filter;
+ rte_eth_dev_add_2tuple_filter;
+ rte_eth_dev_remove_2tuple_filter;
+ rte_eth_dev_get_2tuple_filter;
+ rte_eth_dev_add_5tuple_filter;
+ rte_eth_dev_remove_5tuple_filter;
+ rte_eth_dev_get_5tuple_filter;
+ rte_eth_dev_add_flex_filter;
+ rte_eth_dev_remove_flex_filter;
+ rte_eth_dev_get_flex_filter;
+ rte_eth_dev_count;
+ rte_eth_link_get;
+ rte_eth_devices;
+ rte_eth_stats_get;
+ rte_eth_dev_allocate;
+ _rte_eth_dev_callback_process;
+ rte_eth_dev_filter_ctrl;
+ rte_eth_dev_udp_tunnel_delete;
+ rte_eth_dev_udp_tunnel_add;
+ rte_eth_xstats_get;
+ rte_eth_xstats_reset;
+ rte_eth_dev_filter_supported;
+ local: *;
+};
+
diff --git a/lib/librte_hash/Makefile b/lib/librte_hash/Makefile
index 95e4c09..a449ec2 100644
--- a/lib/librte_hash/Makefile
+++ b/lib/librte_hash/Makefile
@@ -37,6 +37,8 @@ LIB = librte_hash.a
CFLAGS += -O3
CFLAGS += $(WERROR_FLAGS) -I$(SRCDIR)
+EXPORT_MAP := $(RTE_SDK)/lib/librte_hash/rte_hash_version.map
+
# all source are stored in SRCS-y
SRCS-$(CONFIG_RTE_LIBRTE_HASH) := rte_hash.c
SRCS-$(CONFIG_RTE_LIBRTE_HASH) += rte_fbk_hash.c
diff --git a/lib/librte_hash/rte_hash_version.map b/lib/librte_hash/rte_hash_version.map
new file mode 100644
index 0000000..2a34313
--- /dev/null
+++ b/lib/librte_hash/rte_hash_version.map
@@ -0,0 +1,18 @@
+DPDK_1.8 {
+ global:
+ rte_fbk_hash_find_existing;
+ rte_fbk_hash_create;
+ rte_fbk_hash_free;
+ rte_hash_create;
+ rte_hash_find_existing;
+ rte_hash_free;
+ rte_hash_add_key;
+ rte_hash_add_key_with_hash;
+ rte_hash_del_key;
+ rte_hash_del_key_with_hash;
+ rte_hash_lookup;
+ rte_hash_lookup_with_hash;
+ rte_hash_lookup_bulk;
+
+ local: *;
+};
diff --git a/lib/librte_ip_frag/Makefile b/lib/librte_ip_frag/Makefile
index 8c00d39..fba05d0 100644
--- a/lib/librte_ip_frag/Makefile
+++ b/lib/librte_ip_frag/Makefile
@@ -37,6 +37,8 @@ LIB = librte_ip_frag.a
CFLAGS += -O3
CFLAGS += $(WERROR_FLAGS) -I$(SRCDIR)
+EXPORT_MAP := $(RTE_SDK)/lib/librte_ip_frag/rte_ipfrag_version.map
+
#source files
ifeq ($(CONFIG_RTE_MBUF_REFCNT),y)
SRCS-$(CONFIG_RTE_LIBRTE_IP_FRAG) += rte_ipv4_fragmentation.c
diff --git a/lib/librte_ip_frag/rte_ipfrag_version.map b/lib/librte_ip_frag/rte_ipfrag_version.map
new file mode 100644
index 0000000..afe1a0b
--- /dev/null
+++ b/lib/librte_ip_frag/rte_ipfrag_version.map
@@ -0,0 +1,14 @@
+DPDK_1.8 {
+ global:
+
+ rte_ip_frag_table_create;
+ rte_ipv6_fragment_packet;
+ rte_ipv6_frag_reassemble_packet;
+ rte_ipv4_fragment_packet;
+ rte_ipv4_frag_reassemble_packet;
+ rte_ip_frag_free_death_row;
+ rte_ip_frag_table_statistics_dump;
+
+ local: *;
+};
+
diff --git a/lib/librte_ivshmem/Makefile b/lib/librte_ivshmem/Makefile
index 536814c..be6f21a 100644
--- a/lib/librte_ivshmem/Makefile
+++ b/lib/librte_ivshmem/Makefile
@@ -36,6 +36,8 @@ LIB = librte_ivshmem.a
CFLAGS += $(WERROR_FLAGS) -I$(SRCDIR) -O3
+EXPORT_MAPS := $(RTE_SDK)/lib/librte_ivshmem/rte_ivshmem_version.map
+
# all source are stored in SRCS-y
SRCS-$(CONFIG_RTE_LIBRTE_IVSHMEM) := rte_ivshmem.c
diff --git a/lib/librte_ivshmem/rte_ivshmem_version.map b/lib/librte_ivshmem/rte_ivshmem_version.map
new file mode 100644
index 0000000..a204339
--- /dev/null
+++ b/lib/librte_ivshmem/rte_ivshmem_version.map
@@ -0,0 +1,13 @@
+DPDK_1.8 {
+ global:
+
+ rte_ivshmem_metadata_create;
+ rte_ivshmem_metadata_add_memzone;
+ rte_ivshmem_metadata_add_ring;
+ rte_ivshmem_metadata_add_mempool;
+ rte_ivshmem_metadata_cmdline_generate;
+ rte_ivshmem_metadata_dump;
+
+ local: *;
+};
+
diff --git a/lib/librte_kni/Makefile b/lib/librte_kni/Makefile
index 5267304..c119fc1 100644
--- a/lib/librte_kni/Makefile
+++ b/lib/librte_kni/Makefile
@@ -36,6 +36,8 @@ LIB = librte_kni.a
CFLAGS += $(WERROR_FLAGS) -I$(SRCDIR) -O3 -fno-strict-aliasing
+EXPORT_MAP := $(RTE_SDK)/lib/librte_kni/rte_kni_version.map
+
# all source are stored in SRCS-y
SRCS-$(CONFIG_RTE_LIBRTE_KNI) := rte_kni.c
diff --git a/lib/librte_kni/rte_kni_version.map b/lib/librte_kni/rte_kni_version.map
new file mode 100644
index 0000000..7db39a3
--- /dev/null
+++ b/lib/librte_kni/rte_kni_version.map
@@ -0,0 +1,20 @@
+DPDK_1.8 {
+ global:
+
+ rte_kni_alloc;
+ rte_kni_create;
+ rte_kni_release;
+ rte_kni_handle_request;
+ rte_kni_rx_burst;
+ rte_kni_tx_burst;
+ rte_kni_get_port_id;
+ rte_kni_get;
+ rte_kni_info_get;
+ rte_kni_register_handlers;
+ rte_kni_unregister_handlers;
+ rte_kni_close;
+ rte_kni_init;
+
+ local: *;
+};
+
diff --git a/lib/librte_kvargs/Makefile b/lib/librte_kvargs/Makefile
index b09359a..83a42b1 100644
--- a/lib/librte_kvargs/Makefile
+++ b/lib/librte_kvargs/Makefile
@@ -38,6 +38,8 @@ LIB = librte_kvargs.a
CFLAGS += $(WERROR_FLAGS) -I$(SRCDIR) -O3
+EXPORT_MAP := $(RTE_SDK)/lib/librte_kvargs/rte_kvargs_version.map
+
# all source are stored in SRCS-y
SRCS-$(CONFIG_RTE_LIBRTE_KVARGS) := rte_kvargs.c
diff --git a/lib/librte_kvargs/rte_kvargs_version.map b/lib/librte_kvargs/rte_kvargs_version.map
new file mode 100644
index 0000000..7873c8c
--- /dev/null
+++ b/lib/librte_kvargs/rte_kvargs_version.map
@@ -0,0 +1,10 @@
+DPDK_1.8 {
+
+ global:
+ rte_kvargs_parse;
+ rte_kvargs_free;
+ rte_kvargs_process;
+ rte_kvargs_count;
+
+ local: *;
+};
diff --git a/lib/librte_lpm/Makefile b/lib/librte_lpm/Makefile
index fa94163..05de8d9 100644
--- a/lib/librte_lpm/Makefile
+++ b/lib/librte_lpm/Makefile
@@ -37,6 +37,8 @@ LIB = librte_lpm.a
CFLAGS += -O3
CFLAGS += $(WERROR_FLAGS) -I$(SRCDIR)
+EXPORT_MAP := $(RTE_SDK)/lib/librte_lpm/rte_lpm_version.map
+
# all source are stored in SRCS-y
SRCS-$(CONFIG_RTE_LIBRTE_LPM) := rte_lpm.c rte_lpm6.c
diff --git a/lib/librte_lpm/rte_lpm_version.map b/lib/librte_lpm/rte_lpm_version.map
new file mode 100644
index 0000000..8ae9318
--- /dev/null
+++ b/lib/librte_lpm/rte_lpm_version.map
@@ -0,0 +1,24 @@
+DPDK_1.8 {
+ global:
+
+ rte_lpm_create;
+ rte_lpm_find_existing;
+ rte_lpm_free;
+ rte_lpm_add;
+ rte_lpm_is_rule_present;
+ rte_lpm_delete;
+ rte_lpm_delete_all;
+ rte_lpm6_create;
+ rte_lpm6_find_existing;
+ rte_lpm6_free;
+ rte_lpm6_add;
+ rte_lpm6_is_rule_present;
+ rte_lpm6_delete;
+ rte_lpm6_delete_bulk_func;
+ rte_lpm6_delete_all;
+ rte_lpm6_lookup;
+ rte_lpm6_lookup_bulk_func;
+
+ local: *;
+};
+
diff --git a/lib/librte_malloc/Makefile b/lib/librte_malloc/Makefile
index ba87e34..1a5c288 100644
--- a/lib/librte_malloc/Makefile
+++ b/lib/librte_malloc/Makefile
@@ -36,6 +36,8 @@ LIB = librte_malloc.a
CFLAGS += $(WERROR_FLAGS) -I$(SRCDIR) -O3
+EXPORT_MAP := $(RTE_SDK)/lib/librte_malloc/rte_malloc_version.map
+
# all source are stored in SRCS-y
SRCS-$(CONFIG_RTE_LIBRTE_MALLOC) := rte_malloc.c malloc_elem.c malloc_heap.c
diff --git a/lib/librte_malloc/rte_malloc_version.map b/lib/librte_malloc/rte_malloc_version.map
new file mode 100644
index 0000000..77db879
--- /dev/null
+++ b/lib/librte_malloc/rte_malloc_version.map
@@ -0,0 +1,19 @@
+DPDK_1.8 {
+ global:
+
+ rte_malloc;
+ rte_zmalloc;
+ rte_calloc;
+ rte_realloc;
+ rte_malloc_socket;
+ rte_zmalloc_socket;
+ rte_calloc_socket;
+ rte_free;
+ rte_malloc_validate;
+ rte_malloc_get_socket_stats;
+ rte_malloc_dump_stats;
+ rte_malloc_set_limit;
+ rte_malloc_virt2phy;
+
+ local: *;
+};
diff --git a/lib/librte_mbuf/Makefile b/lib/librte_mbuf/Makefile
index 9b45ba4..5cd4941 100644
--- a/lib/librte_mbuf/Makefile
+++ b/lib/librte_mbuf/Makefile
@@ -36,6 +36,8 @@ LIB = librte_mbuf.a
CFLAGS += $(WERROR_FLAGS) -I$(SRCDIR) -O3
+EXPORT_MAP := $(RTE_SDK)/lib/librte_mbuf/rte_mbuf_version.map
+
# all source are stored in SRCS-y
SRCS-$(CONFIG_RTE_LIBRTE_MBUF) := rte_mbuf.c
diff --git a/lib/librte_mbuf/rte_mbuf_version.map b/lib/librte_mbuf/rte_mbuf_version.map
new file mode 100644
index 0000000..7260507
--- /dev/null
+++ b/lib/librte_mbuf/rte_mbuf_version.map
@@ -0,0 +1,14 @@
+DPDK_1.8 {
+ global:
+
+ rte_mbuf_sanity_check;
+ rte_ctrlmbuf_init;
+ rte_pktmbuf_init;
+ rte_pktmbuf_pool_init;
+ rte_pktmbuf_dump;
+ rte_get_rx_ol_flag_name;
+ rte_get_tx_ol_flag_name;
+
+ local: *;
+};
+
diff --git a/lib/librte_mempool/Makefile b/lib/librte_mempool/Makefile
index 9939e10..07b5b4e 100644
--- a/lib/librte_mempool/Makefile
+++ b/lib/librte_mempool/Makefile
@@ -36,6 +36,8 @@ LIB = librte_mempool.a
CFLAGS += $(WERROR_FLAGS) -I$(SRCDIR) -O3
+EXPORT_MAP := $(RTE_SDK)/lib/librte_mempool/rte_mempool_version.map
+
# all source are stored in SRCS-y
SRCS-$(CONFIG_RTE_LIBRTE_MEMPOOL) += rte_mempool.c
ifeq ($(CONFIG_RTE_LIBRTE_XEN_DOM0),y)
diff --git a/lib/librte_mempool/rte_mempool_version.map b/lib/librte_mempool/rte_mempool_version.map
new file mode 100644
index 0000000..7a19982
--- /dev/null
+++ b/lib/librte_mempool/rte_mempool_version.map
@@ -0,0 +1,18 @@
+DPDK_1.8 {
+ global:
+
+ rte_mempool_create;
+ rte_mempool_xmem_create;
+ rte_dom0_mempool_create;
+ rte_mempool_dump;
+ rte_mempool_audit;
+ rte_mempool_list_dump;
+ rte_mempool_lookup;
+ rte_mempool_calc_obj_size;
+ rte_mempool_xmem_size;
+ rte_mempool_xmem_usage;
+ rte_mempool_walk;
+ rte_mempool_count;
+
+ local: *;
+};
diff --git a/lib/librte_meter/Makefile b/lib/librte_meter/Makefile
index b25c0cc..0778690 100644
--- a/lib/librte_meter/Makefile
+++ b/lib/librte_meter/Makefile
@@ -39,6 +39,8 @@ LIB = librte_meter.a
CFLAGS += -O3
CFLAGS += $(WERROR_FLAGS)
+EXPORT_MAP := $(RTE_SDK)/lib/librte_meter/rte_meter_version.map
+
#
# all source are stored in SRCS-y
#
diff --git a/lib/librte_meter/rte_meter_version.map b/lib/librte_meter/rte_meter_version.map
new file mode 100644
index 0000000..51a73b1
--- /dev/null
+++ b/lib/librte_meter/rte_meter_version.map
@@ -0,0 +1,13 @@
+DPDK_1.8 {
+ global:
+
+ rte_meter_srtcm_config;
+ rte_meter_trtcm_config;
+ rte_meter_srtcm_color_blind_check;
+ rte_meter_srtcm_color_aware_check;
+ rte_meter_trtcm_color_blind_check;
+ rte_meter_trtcm_color_aware_check;
+
+ local: *;
+};
+
diff --git a/lib/librte_pipeline/Makefile b/lib/librte_pipeline/Makefile
index cf8fde8..5465d00 100644
--- a/lib/librte_pipeline/Makefile
+++ b/lib/librte_pipeline/Makefile
@@ -39,6 +39,8 @@ LIB = librte_pipeline.a
CFLAGS += -O3
CFLAGS += $(WERROR_FLAGS)
+EXPORT_MAP := $(RTE_SDK)/lib/librte_pipeline/rte_pipeline_version.map
+
#
# all source are stored in SRCS-y
#
diff --git a/lib/librte_pipeline/rte_pipeline_version.map b/lib/librte_pipeline/rte_pipeline_version.map
new file mode 100644
index 0000000..f868b96
--- /dev/null
+++ b/lib/librte_pipeline/rte_pipeline_version.map
@@ -0,0 +1,23 @@
+DPDK_1.8 {
+ global:
+
+ rte_pipeline_create;
+ rte_pipeline_free;
+ rte_pipeline_check;
+ rte_pipeline_run;
+ rte_pipeline_flush;
+ rte_pipeline_table_create;
+ rte_pipeline_table_default_entry_add;
+ rte_pipeline_table_default_entry_delete;
+ rte_pipeline_table_entry_add;
+ rte_pipeline_table_entry_delete;
+ rte_pipeline_port_in_create;
+ rte_pipeline_port_in_connect_to_table;
+ rte_pipeline_port_in_enable;
+ rte_pipeline_port_in_disable;
+ rte_pipeline_port_out_create;
+ rte_pipeline_port_out_packet_insert;
+
+ local: *;
+};
+
diff --git a/lib/librte_pmd_af_packet/Makefile b/lib/librte_pmd_af_packet/Makefile
index 6955e5c..41bb2cd 100644
--- a/lib/librte_pmd_af_packet/Makefile
+++ b/lib/librte_pmd_af_packet/Makefile
@@ -38,6 +38,8 @@ include $(RTE_SDK)/mk/rte.vars.mk
#
LIB = librte_pmd_af_packet.a
+EXPORT_MAP := $(RTE_SDK)/lib/librte_pmd_af_packet/rte_pmd_af_packet_version.map
+
CFLAGS += -O3
CFLAGS += $(WERROR_FLAGS)
diff --git a/lib/librte_pmd_af_packet/rte_pmd_af_packet_version.map b/lib/librte_pmd_af_packet/rte_pmd_af_packet_version.map
new file mode 100644
index 0000000..c68beae
--- /dev/null
+++ b/lib/librte_pmd_af_packet/rte_pmd_af_packet_version.map
@@ -0,0 +1,7 @@
+DPDK_1.8 {
+ global:
+ rte_pmd_af_packet_devinit;
+
+ local: *;
+};
+
diff --git a/lib/librte_pmd_bond/Makefile b/lib/librte_pmd_bond/Makefile
index cdff126..7376018 100644
--- a/lib/librte_pmd_bond/Makefile
+++ b/lib/librte_pmd_bond/Makefile
@@ -39,6 +39,8 @@ LIB = librte_pmd_bond.a
CFLAGS += -O3
CFLAGS += $(WERROR_FLAGS)
+EXPORT_MAP := $(RTE_SDK)/lib/librte_pmd_bond/rte_eth_bond_version.map
+
#
# all source are stored in SRCS-y
#
diff --git a/lib/librte_pmd_bond/rte_eth_bond_version.map b/lib/librte_pmd_bond/rte_eth_bond_version.map
new file mode 100644
index 0000000..206b53e
--- /dev/null
+++ b/lib/librte_pmd_bond/rte_eth_bond_version.map
@@ -0,0 +1,21 @@
+DPDK_1.8 {
+ global:
+
+ rte_eth_bond_create;
+ rte_eth_bond_slave_add;
+ rte_eth_bond_slave_remove;
+ rte_eth_bond_mode_set;
+ rte_eth_bond_mode_get;
+ rte_eth_bond_primary_set;
+ rte_eth_bond_primary_get;
+ rte_eth_bond_slaves_get;
+ rte_eth_bond_active_slaves_get;
+ rte_eth_bond_mac_address_set;
+ rte_eth_bond_mac_address_reset;
+ rte_eth_bond_xmit_policy_set;
+ rte_eth_bond_xmit_policy_get;
+ rte_eth_bond_link_monitoring_set;
+
+ local: *;
+};
+
diff --git a/lib/librte_pmd_e1000/Makefile b/lib/librte_pmd_e1000/Makefile
index 14bc4a2..e225bfe 100644
--- a/lib/librte_pmd_e1000/Makefile
+++ b/lib/librte_pmd_e1000/Makefile
@@ -39,6 +39,8 @@ LIB = librte_pmd_e1000.a
CFLAGS += -O3
CFLAGS += $(WERROR_FLAGS)
+EXPORT_MAP := $(RTE_SDK)/lib/librte_pmd_e1000/rte_pmd_e1000_version.map
+
ifeq ($(CC), icc)
#
# CFLAGS for icc
diff --git a/lib/librte_pmd_e1000/rte_pmd_e1000_version.map b/lib/librte_pmd_e1000/rte_pmd_e1000_version.map
new file mode 100644
index 0000000..cbc401f
--- /dev/null
+++ b/lib/librte_pmd_e1000/rte_pmd_e1000_version.map
@@ -0,0 +1,5 @@
+DPDK_1.8 {
+
+ local: *;
+};
+
diff --git a/lib/librte_pmd_enic/Makefile b/lib/librte_pmd_enic/Makefile
index a2a623f..6359ac0 100644
--- a/lib/librte_pmd_enic/Makefile
+++ b/lib/librte_pmd_enic/Makefile
@@ -37,6 +37,8 @@ include $(RTE_SDK)/mk/rte.vars.mk
#
LIB = librte_pmd_enic.a
+EXPORT_MAP := $(RTE_SDK)/lib/librte_pmd_enic/rte_pmd_enic_version.map
+
CFLAGS += -I$(RTE_SDK)/lib/librte_pmd_enic/vnic/
CFLAGS += -I$(RTE_SDK)/lib/librte_pmd_enic/
CFLAGS += -O3
diff --git a/lib/librte_pmd_enic/rte_pmd_enic_version.map b/lib/librte_pmd_enic/rte_pmd_enic_version.map
new file mode 100644
index 0000000..cbc401f
--- /dev/null
+++ b/lib/librte_pmd_enic/rte_pmd_enic_version.map
@@ -0,0 +1,5 @@
+DPDK_1.8 {
+
+ local: *;
+};
+
diff --git a/lib/librte_pmd_i40e/Makefile b/lib/librte_pmd_i40e/Makefile
index 98e4bdf..9c26ab6 100644
--- a/lib/librte_pmd_i40e/Makefile
+++ b/lib/librte_pmd_i40e/Makefile
@@ -39,6 +39,8 @@ LIB = librte_pmd_i40e.a
CFLAGS += -O3
CFLAGS += $(WERROR_FLAGS)
+EXPORT_MAP := $(RTE_SDK)/lib/librte_pmd_i40e/rte_pmd_i40e_version.map
+
#
# Add extra flags for base driver files (also known as shared code)
# to disable warnings
diff --git a/lib/librte_pmd_i40e/rte_pmd_i40e_version.map b/lib/librte_pmd_i40e/rte_pmd_i40e_version.map
new file mode 100644
index 0000000..cbc401f
--- /dev/null
+++ b/lib/librte_pmd_i40e/rte_pmd_i40e_version.map
@@ -0,0 +1,5 @@
+DPDK_1.8 {
+
+ local: *;
+};
+
diff --git a/lib/librte_pmd_ixgbe/Makefile b/lib/librte_pmd_ixgbe/Makefile
index 3588047..c9e8665 100644
--- a/lib/librte_pmd_ixgbe/Makefile
+++ b/lib/librte_pmd_ixgbe/Makefile
@@ -39,6 +39,8 @@ LIB = librte_pmd_ixgbe.a
CFLAGS += -O3
CFLAGS += $(WERROR_FLAGS)
+EXPORT_MAP := $(RTE_SDK)/lib/librte_pmd_ixgbe/rte_pmd_ixgbe_version.map
+
ifeq ($(CC), icc)
#
# CFLAGS for icc
diff --git a/lib/librte_pmd_ixgbe/rte_pmd_ixgbe_version.map b/lib/librte_pmd_ixgbe/rte_pmd_ixgbe_version.map
new file mode 100644
index 0000000..cbc401f
--- /dev/null
+++ b/lib/librte_pmd_ixgbe/rte_pmd_ixgbe_version.map
@@ -0,0 +1,5 @@
+DPDK_1.8 {
+
+ local: *;
+};
+
diff --git a/lib/librte_pmd_pcap/Makefile b/lib/librte_pmd_pcap/Makefile
index c5c214d..fff5572 100644
--- a/lib/librte_pmd_pcap/Makefile
+++ b/lib/librte_pmd_pcap/Makefile
@@ -40,6 +40,8 @@ LIB = librte_pmd_pcap.a
CFLAGS += -O3
CFLAGS += $(WERROR_FLAGS)
+EXPORT_MAP := $(RTE_SDK)/lib/librte_pmd_pcap/rte_pmd_pcap_version.map
+
#
# all source are stored in SRCS-y
#
diff --git a/lib/librte_pmd_pcap/rte_pmd_pcap_version.map b/lib/librte_pmd_pcap/rte_pmd_pcap_version.map
new file mode 100644
index 0000000..cbc401f
--- /dev/null
+++ b/lib/librte_pmd_pcap/rte_pmd_pcap_version.map
@@ -0,0 +1,5 @@
+DPDK_1.8 {
+
+ local: *;
+};
+
diff --git a/lib/librte_pmd_ring/Makefile b/lib/librte_pmd_ring/Makefile
index b57e421..25ad27f 100644
--- a/lib/librte_pmd_ring/Makefile
+++ b/lib/librte_pmd_ring/Makefile
@@ -39,6 +39,8 @@ LIB = librte_pmd_ring.a
CFLAGS += -O3
CFLAGS += $(WERROR_FLAGS)
+EXPORT_MAP := $(RTE_SDK)/lib/librte_pmd_ring/rte_eth_ring_version.map
+
#
# all source are stored in SRCS-y
#
diff --git a/lib/librte_pmd_ring/rte_eth_ring.c b/lib/librte_pmd_ring/rte_eth_ring.c
index 4f1b6ed..df7b583 100644
--- a/lib/librte_pmd_ring/rte_eth_ring.c
+++ b/lib/librte_pmd_ring/rte_eth_ring.c
@@ -473,7 +473,7 @@ out:
return ret;
}
-int
+static int
rte_pmd_ring_devinit(const char *name, const char *params)
{
struct rte_kvargs *kvlist;
diff --git a/lib/librte_pmd_ring/rte_eth_ring.h b/lib/librte_pmd_ring/rte_eth_ring.h
index e6ae19e..d36489a 100644
--- a/lib/librte_pmd_ring/rte_eth_ring.h
+++ b/lib/librte_pmd_ring/rte_eth_ring.h
@@ -50,12 +50,6 @@ int rte_eth_from_rings(const char *name,
int rte_eth_ring_pair_create(const char *name, const unsigned numa_node);
int rte_eth_ring_pair_attach(const char *name, const unsigned numa_node);
-/**
- * For use by test apps only. Called as part of EAL init to set up any dummy NICs
- * configured on command line.
- */
-int rte_pmd_ring_devinit(const char *name, const char *params);
-
#ifdef __cplusplus
}
#endif
diff --git a/lib/librte_pmd_ring/rte_eth_ring_version.map b/lib/librte_pmd_ring/rte_eth_ring_version.map
new file mode 100644
index 0000000..5edaa3d
--- /dev/null
+++ b/lib/librte_pmd_ring/rte_eth_ring_version.map
@@ -0,0 +1,10 @@
+DPDK_1.8 {
+
+ global:
+
+ rte_eth_from_rings;
+ rte_eth_ring_pair_create;
+ rte_eth_ring_pair_attach;
+
+ local: *;
+};
diff --git a/lib/librte_pmd_virtio/Makefile b/lib/librte_pmd_virtio/Makefile
index 456095b..bf51bd9 100644
--- a/lib/librte_pmd_virtio/Makefile
+++ b/lib/librte_pmd_virtio/Makefile
@@ -39,6 +39,7 @@ LIB = librte_pmd_virtio_uio.a
CFLAGS += -O3
CFLAGS += $(WERROR_FLAGS)
+EXPORT_MAP := $(RTE_SDK)/lib/librte_pmd_virtio/rte_pmd_virtio_version.map
#
# all source are stored in SRCS-y
diff --git a/lib/librte_pmd_virtio/rte_pmd_virtio_version.map b/lib/librte_pmd_virtio/rte_pmd_virtio_version.map
new file mode 100644
index 0000000..cbc401f
--- /dev/null
+++ b/lib/librte_pmd_virtio/rte_pmd_virtio_version.map
@@ -0,0 +1,5 @@
+DPDK_1.8 {
+
+ local: *;
+};
+
diff --git a/lib/librte_pmd_vmxnet3/Makefile b/lib/librte_pmd_vmxnet3/Makefile
index 6872c74..e5a1c6b 100644
--- a/lib/librte_pmd_vmxnet3/Makefile
+++ b/lib/librte_pmd_vmxnet3/Makefile
@@ -66,6 +66,8 @@ endif
VPATH += $(RTE_SDK)/lib/librte_pmd_vmxnet3/vmxnet3
+EXPORT_MAP := $(RTE_SDK)/lib/librte_pmd_vmxnet3/rte_pmd_vmxnet3_version.map
+
#
# all source are stored in SRCS-y
#
diff --git a/lib/librte_pmd_vmxnet3/rte_pmd_vmxnet3_version.map b/lib/librte_pmd_vmxnet3/rte_pmd_vmxnet3_version.map
new file mode 100644
index 0000000..cbc401f
--- /dev/null
+++ b/lib/librte_pmd_vmxnet3/rte_pmd_vmxnet3_version.map
@@ -0,0 +1,5 @@
+DPDK_1.8 {
+
+ local: *;
+};
+
diff --git a/lib/librte_pmd_xenvirt/Makefile b/lib/librte_pmd_xenvirt/Makefile
index 01bfcaa..0a08b1b 100644
--- a/lib/librte_pmd_xenvirt/Makefile
+++ b/lib/librte_pmd_xenvirt/Makefile
@@ -39,6 +39,8 @@ LIB = librte_pmd_xenvirt.a
CFLAGS += -O3
CFLAGS += $(WERROR_FLAGS)
+EXPORT_MAP := $(RTE_SDK)/lib/librte_pmd_xenvirt/rte_eth_xenvirt_version.map
+
#
# all source are stored in SRCS-y
#
diff --git a/lib/librte_pmd_xenvirt/rte_eth_xenvirt_version.map b/lib/librte_pmd_xenvirt/rte_eth_xenvirt_version.map
new file mode 100644
index 0000000..66199b1
--- /dev/null
+++ b/lib/librte_pmd_xenvirt/rte_eth_xenvirt_version.map
@@ -0,0 +1,8 @@
+DPDK_1.8 {
+ global:
+
+ rte_mempool_gntalloc_create;
+
+ local: *;
+};
+
diff --git a/lib/librte_port/Makefile b/lib/librte_port/Makefile
index 82b5192..f01a12c 100644
--- a/lib/librte_port/Makefile
+++ b/lib/librte_port/Makefile
@@ -39,6 +39,8 @@ LIB = librte_port.a
CFLAGS += -O3
CFLAGS += $(WERROR_FLAGS)
+EXPORT_MAP := $(RTE_SDK)/lib/librte_port/rte_port_version.map
+
#
# all source are stored in SRCS-y
#
diff --git a/lib/librte_port/rte_port_version.map b/lib/librte_port/rte_port_version.map
new file mode 100644
index 0000000..57ccaa3
--- /dev/null
+++ b/lib/librte_port/rte_port_version.map
@@ -0,0 +1,18 @@
+DPDK_1.8 {
+ global:
+ rte_port_ring_reader_ops;
+ rte_port_ring_writer_ops;
+ rte_port_ethdev_reader_ops;
+ rte_port_ethdev_writer_ops;
+ rte_port_ring_reader_ipv4_frag_ops;
+ rte_port_ring_writer_ipv4_ras_ops;
+ rte_port_ring_reader_ops;
+ rte_port_ring_writer_ops;
+ rte_port_sched_reader_ops;
+ rte_port_sched_writer_ops;
+ rte_port_source_ops;
+ rte_port_sink_ops;
+
+ local: *;
+};
+
diff --git a/lib/librte_power/Makefile b/lib/librte_power/Makefile
index d672a5a..faf73a5 100644
--- a/lib/librte_power/Makefile
+++ b/lib/librte_power/Makefile
@@ -36,6 +36,8 @@ LIB = librte_power.a
CFLAGS += $(WERROR_FLAGS) -I$(SRCDIR) -O3 -fno-strict-aliasing
+EXPORT_MAP := $(RTE_SDK)/lib/librte_power/rte_power_version.map
+
# all source are stored in SRCS-y
SRCS-$(CONFIG_RTE_LIBRTE_POWER) := rte_power.c rte_power_acpi_cpufreq.c
SRCS-$(CONFIG_RTE_LIBRTE_POWER) += rte_power_kvm_vm.c guest_channel.c
diff --git a/lib/librte_power/rte_power_version.map b/lib/librte_power/rte_power_version.map
new file mode 100644
index 0000000..061bca7
--- /dev/null
+++ b/lib/librte_power/rte_power_version.map
@@ -0,0 +1,18 @@
+DPDK_1.8 {
+ global:
+ rte_power_init;
+ rte_power_exit;
+ rte_power_freqs;
+ rte_power_get_freq;
+ rte_power_set_freq;
+ rte_power_freq_up;
+ rte_power_freq_down;
+ rte_power_freq_max;
+ rte_power_freq_min;
+ rte_power_set_env;
+ rte_power_get_env;
+ rte_power_unset_env;
+
+ local: *;
+};
+
diff --git a/lib/librte_ring/Makefile b/lib/librte_ring/Makefile
index 2380a43..0adaa00 100644
--- a/lib/librte_ring/Makefile
+++ b/lib/librte_ring/Makefile
@@ -36,6 +36,8 @@ LIB = librte_ring.a
CFLAGS += $(WERROR_FLAGS) -I$(SRCDIR) -O3
+EXPORT_MAP := $(RTE_SDK)/lib/librte_ring/rte_ring_version.map
+
# all source are stored in SRCS-y
SRCS-$(CONFIG_RTE_LIBRTE_RING) := rte_ring.c
diff --git a/lib/librte_ring/rte_ring_version.map b/lib/librte_ring/rte_ring_version.map
new file mode 100644
index 0000000..6c28af9
--- /dev/null
+++ b/lib/librte_ring/rte_ring_version.map
@@ -0,0 +1,12 @@
+DPDK_1.8 {
+ global:
+ rte_ring_get_memsize;
+ rte_ring_init;
+ rte_ring_create;
+ rte_ring_set_water_mark;
+ rte_ring_dump;
+ rte_ring_list_dump;
+ rte_ring_lookup;
+
+ local: *;
+};
diff --git a/lib/librte_sched/Makefile b/lib/librte_sched/Makefile
index 1a25b21..205fb7a 100644
--- a/lib/librte_sched/Makefile
+++ b/lib/librte_sched/Makefile
@@ -41,6 +41,8 @@ CFLAGS += $(WERROR_FLAGS)
CFLAGS_rte_red.o := -D_GNU_SOURCE
+EXPORT_MAP := $(RTE_SDK)/lib/librte_sched/rte_sched_version.map
+
#
# all source are stored in SRCS-y
#
diff --git a/lib/librte_sched/rte_sched_version.map b/lib/librte_sched/rte_sched_version.map
new file mode 100644
index 0000000..b5877ce
--- /dev/null
+++ b/lib/librte_sched/rte_sched_version.map
@@ -0,0 +1,22 @@
+DPDK_1.8 {
+ global:
+
+ rte_approx;
+ rte_red_rt_data_init;
+ rte_red_config_init;
+ rte_sched_port_config;
+ rte_sched_port_free;
+ rte_sched_subport_config;
+ rte_sched_pipe_config;
+ rte_sched_port_get_memory_footprint;
+ rte_sched_subport_read_stats;
+ rte_sched_queue_read_stats;
+ rte_sched_port_enqueue;
+ rte_sched_port_dequeue;
+ rte_red_log2_1_minus_Wq;
+ rte_red_pow2_frac_inv;
+ rte_red_rand_val;
+ rte_red_rand_seed;
+
+ local: *;
+};
diff --git a/lib/librte_table/Makefile b/lib/librte_table/Makefile
index dd684cc..5b54acc 100644
--- a/lib/librte_table/Makefile
+++ b/lib/librte_table/Makefile
@@ -39,6 +39,8 @@ LIB = librte_table.a
CFLAGS += -O3
CFLAGS += $(WERROR_FLAGS)
+EXPORT_MAP := $(RTE_SDK)/lib/librte_table/rte_table_version.map
+
#
# all source are stored in SRCS-y
#
diff --git a/lib/librte_table/rte_table_version.map b/lib/librte_table/rte_table_version.map
new file mode 100644
index 0000000..86f16b8
--- /dev/null
+++ b/lib/librte_table/rte_table_version.map
@@ -0,0 +1,22 @@
+DPDK_1.8 {
+ global:
+
+ rte_table_stub_ops;
+ rte_table_lpm_ops;
+ rte_table_array_ops;
+ rte_table_hash_key8_lru_ops;
+ rte_table_hash_key8_lru_dosig_ops;
+ rte_table_hash_key8_ext_ops;
+ rte_table_hash_key8_ext_dosig_ops;
+ rte_table_lpm_ipv6_ops;
+ rte_table_hash_key16_lru_ops;
+ rte_table_hash_key32_lru_ops;
+ rte_table_hash_key16_ext_ops;
+ rte_table_hash_key32_ext_ops;
+ rte_table_acl_ops;
+ rte_table_hash_lru_ops;
+ rte_table_hash_ext_ops;
+
+ local: *;
+};
+
diff --git a/lib/librte_timer/Makefile b/lib/librte_timer/Makefile
index 07eb0c6..f703e5f 100644
--- a/lib/librte_timer/Makefile
+++ b/lib/librte_timer/Makefile
@@ -36,6 +36,8 @@ LIB = librte_timer.a
CFLAGS += $(WERROR_FLAGS) -I$(SRCDIR) -O3
+EXPORT_MAP := $(RTE_SDK)/lib/librte_timer/rte_timer_version.map
+
# all source are stored in SRCS-y
SRCS-$(CONFIG_RTE_LIBRTE_TIMER) := rte_timer.c
diff --git a/lib/librte_timer/rte_timer_version.map b/lib/librte_timer/rte_timer_version.map
new file mode 100644
index 0000000..00b6b52
--- /dev/null
+++ b/lib/librte_timer/rte_timer_version.map
@@ -0,0 +1,16 @@
+DPDK_1.8 {
+ global:
+
+ rte_timer_subsystem_init;
+ rte_timer_init;
+ rte_timer_reset;
+ rte_timer_reset_sync;
+ rte_timer_stop;
+ rte_timer_stop_sync;
+ rte_timer_pending;
+ rte_timer_manage;
+ rte_timer_dump_stats;
+
+ local: *;
+};
+
diff --git a/lib/librte_vhost/Makefile b/lib/librte_vhost/Makefile
index c008d64..7f8c5dc 100644
--- a/lib/librte_vhost/Makefile
+++ b/lib/librte_vhost/Makefile
@@ -34,6 +34,8 @@ include $(RTE_SDK)/mk/rte.vars.mk
# library name
LIB = librte_vhost.a
+EXPORT_MAP := $(RTE_SDK)/lib/librte_vhost/rte_vhost_version.map
+
CFLAGS += $(WERROR_FLAGS) -I$(SRCDIR) -O3 -D_FILE_OFFSET_BITS=64 -lfuse
LDFLAGS += -lfuse
# all source are stored in SRCS-y
diff --git a/lib/librte_vhost/rte_vhost_version.map b/lib/librte_vhost/rte_vhost_version.map
new file mode 100644
index 0000000..7685bb8
--- /dev/null
+++ b/lib/librte_vhost/rte_vhost_version.map
@@ -0,0 +1,14 @@
+DPDK_1.8 {
+ global:
+ rte_vhost_feature_disable;
+ rte_vhost_feature_enable;
+ rte_vhost_feature_get;
+ rte_vhost_enable_guest_notification;
+ rte_vhost_driver_register;
+ rte_vhost_driver_callback_register;
+ rte_vhost_driver_session_start;
+ rte_vhost_enqueue_burst;
+ rte_vhost_dequeue_burst;
+
+ local: *;
+};
--
1.9.3
^ permalink raw reply [flat|nested] 43+ messages in thread