From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <nhorman@tuxdriver.com>
Received: from smtp.tuxdriver.com (charlotte.tuxdriver.com [70.61.120.58])
 by dpdk.org (Postfix) with ESMTP id BFD85C84E
 for <dev@dpdk.org>; Fri, 19 Jun 2015 17:32:19 +0200 (CEST)
Received: from hmsreliant.think-freely.org
 ([2001:470:8:a08:7aac:c0ff:fec2:933b] helo=localhost)
 by smtp.tuxdriver.com with esmtpsa (TLSv1:AES128-SHA:128) (Exim 4.63)
 (envelope-from <nhorman@tuxdriver.com>)
 id 1Z5yH8-0007cG-Is; Fri, 19 Jun 2015 11:32:17 -0400
Date: Fri, 19 Jun 2015 11:32:08 -0400
From: Neil Horman <nhorman@tuxdriver.com>
To: "Gajdzica, MaciejX T" <maciejx.t.gajdzica@intel.com>
Message-ID: <20150619153208.GC4619@hmsreliant.think-freely.org>
References: <9CC680510C0AC140A846FED2EF7F96281383E81B@IRSMSX102.ger.corp.intel.com>
 <2048288.aStCxb75UN@xps13>
 <9CC680510C0AC140A846FED2EF7F96281383E8B5@IRSMSX102.ger.corp.intel.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <9CC680510C0AC140A846FED2EF7F96281383E8B5@IRSMSX102.ger.corp.intel.com>
User-Agent: Mutt/1.5.23 (2014-03-12)
X-Spam-Score: -2.9 (--)
X-Spam-Status: No
Cc: "dev@dpdk.org" <dev@dpdk.org>
Subject: Re: [dpdk-dev] Issue with rte_compat versioning macros
X-BeenThere: dev@dpdk.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: patches and discussions about DPDK <dev.dpdk.org>
List-Unsubscribe: <http://dpdk.org/ml/options/dev>,
 <mailto:dev-request@dpdk.org?subject=unsubscribe>
List-Archive: <http://dpdk.org/ml/archives/dev/>
List-Post: <mailto:dev@dpdk.org>
List-Help: <mailto:dev-request@dpdk.org?subject=help>
List-Subscribe: <http://dpdk.org/ml/listinfo/dev>,
 <mailto:dev-request@dpdk.org?subject=subscribe>
X-List-Received-Date: Fri, 19 Jun 2015 15:32:20 -0000

On Fri, Jun 19, 2015 at 03:04:17PM +0000, Gajdzica, MaciejX T wrote:
> > -----Original Message-----
> > From: Thomas Monjalon [mailto:thomas.monjalon@6wind.com]
> > Sent: Friday, June 19, 2015 4:48 PM
> > To: Gajdzica, MaciejX T
> > Cc: dev@dpdk.org; nhorman@tuxdriver.com
> > Subject: Re: [dpdk-dev] Issue with rte_compat versioning macros
> > 
> > 2015-06-19 14:38, Gajdzica, MaciejX T:
> > > There is an issue with macros in rte_compat.h. For shared library 
> > > case, macro BIND_DEFAULT_SYMBOL takes three arguments and for other 
> > > case it takes only two arguments. Also letters for macro variable 
> > > names are
> > not consistent in these two cases.
> > 
> > Yes, and your patch fix it:
> > 	http://dpdk.org/dev/patchwork/patch/5475/
> > But it is part of a series which is not accepted yet.
> > 
> > It would be faster merged if you send it as a standalone patch.
> > Thanks
> 
> But simple solution with adding third argument to static library case doesn't work. Comment in rte_compat.h file describes steps needed to add new version of the function and it says:
> 
> * 2) rename the existing function int foo(char *string) to
> * 	int __vsym foo_v20(char *string)
> *
> * 3) Add this macro immediately below the function
> * 	VERSION_SYMBOL(foo, _v20, 2.0);
> *
> * 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, 2.1);
> 
> So probably BIND_DEFAULT_SYMBOL macro for shared library case needs to be modified to have two arguments.
> I'm not familiar with that symver syntax so I need some help. It would be better when original author say how it should look like.
> 
> Best Regards
> Maciek
> 
> 

No adding the third parameter will work just fine.  The documentation needs to
be updated as well to reflect the 3rd argument:
* 5) Mark the newest version as the default version
*      BIND_DEFAULT_SYMBOL(foo, foo, 2.1);


Neil