From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by dpdk.org (Postfix) with ESMTP id 03C74C554 for ; Thu, 25 Jun 2015 09:37:56 +0200 (CEST) Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga102.fm.intel.com with ESMTP; 25 Jun 2015 00:37:55 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.13,675,1427785200"; d="scan'208";a="513974230" Received: from irsmsx109.ger.corp.intel.com ([163.33.3.23]) by FMSMGA003.fm.intel.com with ESMTP; 25 Jun 2015 00:37:48 -0700 Received: from irsmsx102.ger.corp.intel.com ([169.254.2.117]) by IRSMSX109.ger.corp.intel.com ([169.254.13.200]) with mapi id 14.03.0224.002; Thu, 25 Jun 2015 08:37:43 +0100 From: "Gajdzica, MaciejX T" To: Neil Horman , "dev@dpdk.org" Thread-Topic: [dpdk-dev] [PATCH 1/2] rte_compat.h : Clean up some typos Thread-Index: AQHQreumYcrj0CL2A0OEqtvh3ZAnbZ281Rcg Date: Thu, 25 Jun 2015 07:37:43 +0000 Message-ID: <9CC680510C0AC140A846FED2EF7F962813848240@IRSMSX102.ger.corp.intel.com> References: <1435088014-18973-1-git-send-email-nhorman@tuxdriver.com> In-Reply-To: <1435088014-18973-1-git-send-email-nhorman@tuxdriver.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [163.33.239.180] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] [PATCH 1/2] rte_compat.h : Clean up some typos X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 Jun 2015 07:37:57 -0000 > -----Original Message----- > From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Neil Horman > Sent: Tuesday, June 23, 2015 9:34 PM > To: dev@dpdk.org > Subject: [dpdk-dev] [PATCH 1/2] rte_compat.h : Clean up some typos >=20 > Clean up some macro definition typos and comments >=20 > Signed-off-by: Neil Horman > CC: thomas.monjalon@6wind.com > --- > lib/librte_compat/rte_compat.h | 14 +++++++------- > 1 file changed, 7 insertions(+), 7 deletions(-) >=20 > diff --git a/lib/librte_compat/rte_compat.h b/lib/librte_compat/rte_compa= t.h > index fb0dc19..75920a1 100644 > --- a/lib/librte_compat/rte_compat.h > +++ b/lib/librte_compat/rte_compat.h > @@ -54,7 +54,7 @@ > * foo is exported as a global symbol. > * > * 2) rename the existing function int foo(char *string) to > - * int __vsym foo_v20(char *string) > + * int foo_v20(char *string) > * > * 3) Add this macro immediately below the function > * VERSION_SYMBOL(foo, _v20, 2.0); > @@ -63,7 +63,7 @@ > * char foo(int value, int otherval) { ...} > * > * 5) Mark the newest version as the default version > - * BIND_DEFAULT_SYMBOL(foo, 2.1); > + * BIND_DEFAULT_SYMBOL(foo, _v21, 2.1); > * > */ >=20 > @@ -79,21 +79,21 @@ > * Creates a symbol version table entry binding symbol @DPDK_ to t= he > internal > * function name _ > */ > -#define VERSION_SYMBOL(b, e, n) __asm__(".symver " RTE_STR(b) RTE_STR(e) > ", "RTE_STR(b)"@DPDK_"RTE_STR(n)) > +#define VERSION_SYMBOL(b, e, n) __asm__(".symver " RTE_STR(b) > +RTE_STR(e) ", " RTE_STR(b) "@DPDK_" RTE_STR(n)) >=20 > /* > * BASE_SYMBOL > * Creates a symbol version table entry binding unversioned symbol > * to the internal function _ > */ > -#define BASE_SYMBOL(b, e) __asm__(".symver " RTE_STR(b) RTE_STR(e) ", > "RTE_STR(b)"@") > +#define BASE_SYMBOL(b, e) __asm__(".symver " RTE_STR(b) RTE_STR(e) ", " > +RTE_STR(b)"@") >=20 > /* > - * BNID_DEFAULT_SYMBOL > + * BIND_DEFAULT_SYMBOL > * Creates a symbol version entry instructing the linker to bind referen= ces to > * symbol to the internal symbol _ > */ > -#define BIND_DEFAULT_SYMBOL(b, e, n) __asm__(".symver " RTE_STR(b) > RTE_STR(e) ", "RTE_STR(b)"@@DPDK_"RTE_STR(n)) > +#define BIND_DEFAULT_SYMBOL(b, e, n) __asm__(".symver " RTE_STR(b) > +RTE_STR(e) ", " RTE_STR(b) "@@DPDK_" RTE_STR(n)) > #define __vsym __attribute__((used)) >=20 > #else > @@ -103,7 +103,7 @@ > #define VERSION_SYMBOL(b, e, v) > #define __vsym > #define BASE_SYMBOL(b, n) > -#define BIND_DEFAULT_SYMBOL(b, v) > +#define BIND_DEFAULT_SYMBOL(b, e, n) >=20 > /* > * RTE_BUILD_SHARED_LIB=3Dn > -- > 2.1.0 This patch doesn't solves the issue with static build. You have function: int foo(int val) And you want to create new version of it. So after edit you will have: int foo_v20(int val) { [...] } VERSION_SYMBOL(foo, _v20, 2.0); int foo_v21(int val1, int val2) { [...] } BIND_DEFAULT_SYMBOL (foo, _v21, 2.1); You have also external application that uses foo function. You try to compi= le this app with dpdk compiled as shared and static. In first case everything will work fine, but= in second linker won't find definition of foo because it doesn't exist. There are only definitions= of foo_v20 and foo_v21. Best Regards Maciek