From mboxrd@z Thu Jan 1 00:00:00 1970 From: Pavan Nikhilesh Subject: Re: [PATCH v3 1/2] eal: add API to align integer to previous power of 2 Date: Thu, 5 Apr 2018 00:06:00 +0530 Message-ID: <20180404183559.GA2381@ltp-pvn> References: <20180217104934.17291-1-pbhagavatula@caviumnetworks.com> <20180404101606.5156-1-pbhagavatula@caviumnetworks.com> <20180404164207.GA21153@ltp-pvn> <20180404175156.GA5416@ltp-pvn> <20180404181557.GA30549@ltp-pvn> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: dev@dpdk.org To: Matan Azrad , "jerin.jacob@caviumnetworks.com" , "keith.wiles@intel.com" , Thomas Monjalon Return-path: Received: from NAM02-SN1-obe.outbound.protection.outlook.com (mail-sn1nam02on0076.outbound.protection.outlook.com [104.47.36.76]) by dpdk.org (Postfix) with ESMTP id 8A1A41C4B6 for ; Wed, 4 Apr 2018 20:36:21 +0200 (CEST) Content-Disposition: inline In-Reply-To: List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On Wed, Apr 04, 2018 at 06:23:19PM +0000, Matan Azrad wrote: > Hi Pavan > > From: Pavan Nikhilesh, Wednesday, April 4, 2018 9:16 PM > > Hi Matan, > > > > > > > > Got you. > > > Looks like you found issue here... > > > The experimental tag probably should be in a root .h file. > > > Probably, need a fix patch to move it for a different\new .h file. > > > > > > What do you think? > > > > > > > Actually thats just start of the rabbit hole, if we succeed to tag a inline > > function in rte_common.h as experimental every lib/driver that uses > > rte_common.h (almost everything) needs to have CFLAGS set to - > > DALLOW_EXPERIMENTAL_API. > > > > Isn't it relevant only for the libs which are using the new tagged APIs? Static inline functions in .h files will be added to each and every .c example preprocessor output for rte_pci.c which includes rte_common.h: # 231 "/home/pavan/Work/clean/dpdk/build/include/rte_common.h" extern int RTE_BUILD_BUG_ON_detected_error; # 249 "/home/pavan/Work/clean/dpdk/build/include/rte_common.h" static inline uint32_t __attribute__((deprecated("Symbol is not yet part of stable ABI"), section(".text.experimental"))) rte_combine32ms1b(register uint32_t x) { x |= x >> 1; x |= x >> 2; x |= x >> 4; x |= x >> 8; x |= x >> 16; return x; } # 271 "/home/pavan/Work/clean/dpdk/build/include/rte_common.h" static inline uint64_t rte_combine64ms1b(register uint64_t v) { v |= v >> 1; v |= v >> 2; v |= v >> 4; v |= v >> 8; v |= v >> 16; v |= v >> 32; return v; } Which causes compiler to throw error as DALLOW_EXPERIMENTAL_API is not added to cflags. > > > Regards, > > Pavan.