From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp.tuxdriver.com (charlotte.tuxdriver.com [70.61.120.58]) by dpdk.org (Postfix) with ESMTP id 0C6F42C72 for ; Mon, 6 Jul 2015 15:35:57 +0200 (CEST) Received: from voip-107-15-76-160.kyn.rr.com ([107.15.76.160] helo=localhost) by smtp.tuxdriver.com with esmtpsa (TLSv1:AES128-SHA:128) (Exim 4.63) (envelope-from ) id 1ZC6Yj-0000CB-85; Mon, 06 Jul 2015 09:35:55 -0400 Date: Mon, 6 Jul 2015 09:35:44 -0400 From: Neil Horman To: Thomas Monjalon Message-ID: <20150706133544.GA30816@hmsreliant.think-freely.org> References: <1435874746-32095-1-git-send-email-thomas.monjalon@6wind.com> <10048439.cxXN29b43P@xps13> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <10048439.cxXN29b43P@xps13> User-Agent: Mutt/1.5.23 (2014-03-12) X-Spam-Score: -2.9 (--) X-Spam-Status: No Cc: dev@dpdk.org Subject: Re: [dpdk-dev] [PATCH] mk: enable next abi in static libs 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: Mon, 06 Jul 2015 13:35:57 -0000 On Mon, Jul 06, 2015 at 03:18:51PM +0200, Thomas Monjalon wrote: > Any comment or ack? > > 2015-07-03 00:05, Thomas Monjalon: > > When a change makes really hard to keep ABI compatibility, > > instead of waiting next release to break the ABI, it is smoother > > to introduce the new code and enable it only for static libraries. > > The flag RTE_NEXT_ABI may be used to "ifdef" the new code. > > When the release is out, a dynamically linked application can use > > the new shared libraries without rebuild while developpers can prepare > > their application for the next ABI by reading the deprecation notice > > and easily testing the new code. > > When starting the next release cycle, the "ifdefs" will be removed > > and the ABI break will be marked by incrementing LIBABIVER. > > > > The new option CONFIG_RTE_NEXT_ABI is not defined in the configuration > > templates because it is deduced from CONFIG_RTE_BUILD_SHARED_LIB. > > It is automatically enabled for static libraries and disabled for > > shared libraries. > > It can be forced to another value by editing the generated .config file. > > It shouldn't be enabled for shared libraries because it would break the > > ABI without changing the version number LIBABIVER. That's why a warning > > is printed in this case. > > > > The guideline is also updated to integrate this new possibility. > > > > Signed-off-by: Thomas Monjalon > > Yeah, I'm not sure why this is necessecary. That is to say, if you want to introduce a new ABI operation prior to the old one being removed, that is precisely what the versioning macros are for, and can be used to map the static api to the new version. e.g, given function X that you want to enhance in an ABI breaking way: 1) Separate function X to X_v1 and X_v2 2) Map X_v2 to X@DPDK_v2, map X_v1 to X@DPDK_v1 3) Map the static symbol X to X_v2 4) Post the deprecation notice of X for release 3 immediately Splitting the static ABI from the shared ABI just means that applications will have the opportunity to isolate themselves to one kind of build, which is a bad idea. Neil