From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by dpdk.space (Postfix) with ESMTP id CEA15A0679 for ; Wed, 3 Apr 2019 22:07:53 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id A972A1B12A; Wed, 3 Apr 2019 22:07:52 +0200 (CEST) Received: from out4-smtp.messagingengine.com (out4-smtp.messagingengine.com [66.111.4.28]) by dpdk.org (Postfix) with ESMTP id 07B2E1B11A for ; Wed, 3 Apr 2019 22:07:51 +0200 (CEST) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id 9876D21F83; Wed, 3 Apr 2019 16:07:50 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute1.internal (MEProxy); Wed, 03 Apr 2019 16:07:50 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h= from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding:content-type; s=mesmtp; bh=CtEouhRqbPGBujVhrOKrh/IdR0tSbEgyeVKreDhVqS0=; b=NMZ01z97mint k0wQqgyDDxQ2kFJF0rT2VtzM65KjLpHb4G4bknQmhwRHYELYhrtot8EcQf/qwZDw YkjXqyG3kr/K1YL13DCzav4aBw2s3kx143+3qTii+s/ivDpbv9Zd1VN5W6uqRFJ5 X/eN0Mib81RLBCBwoD8kqZGufE6ydPk= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm2; bh=CtEouhRqbPGBujVhrOKrh/IdR0tSbEgyeVKreDhVq S0=; b=d0nTX+mIEY9BdCWvCQr20kuwA58iswsrEyYsq1qakHyh0QsHUJAdEPOFY n536XosP9eOZOmc3oH/1jjPlN6jywwjC/Ryt7NSTkMkL6jNvCFqiZpd9rqk+S69j 13+06ohe6Ctpi9/urLVe9+TEjO/lTTH66ZJU0MBqSRDA/ZYeRnhqqkkxCH4qCTrb /aXNz4hsTzoUrXG6mnT5Zc70fmsbMM57TL4lRxs7vQhpNjTmjzFz9ZKLPNQ0Ph0E 8qyKrI9thKjQqAzX+iCJQ/59feJe+Pxyddl5eJh/uwo8cP2uEW8I6i8OO9Uybu+5 wZZiPVD4eJWJCyTebNyUt+GxKm4/Q== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduuddrtdefgdduudelucdltddurdeguddtrddttd dmucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfv pdfurfetoffkrfgpnffqhgenuceurghilhhouhhtmecufedttdenucesvcftvggtihhpih gvnhhtshculddquddttddmnecujfgurhephffvufffkfgjfhgggfgtsehtufertddttddv necuhfhrohhmpefvhhhomhgrshcuofhonhhjrghlohhnuceothhhohhmrghssehmohhnjh grlhhonhdrnhgvtheqnecukfhppeejjedrudefgedrvddtfedrudekgeenucfrrghrrghm pehmrghilhhfrhhomhepthhhohhmrghssehmohhnjhgrlhhonhdrnhgvthenucevlhhush htvghrufhiiigvpedt X-ME-Proxy: Received: from xps.localnet (184.203.134.77.rev.sfr.net [77.134.203.184]) by mail.messagingengine.com (Postfix) with ESMTPA id 1DC70E4176; Wed, 3 Apr 2019 16:07:49 -0400 (EDT) From: Thomas Monjalon To: Jerin Jacob Kollanukkaran Cc: "dev@dpdk.org" Date: Wed, 03 Apr 2019 22:07:47 +0200 Message-ID: <12240942.ao6TnDaj5f@xps> In-Reply-To: <20190403192819.20243-1-jerinj@marvell.com> References: <20170807120408.21975-1-jerin.jacob@caviumnetworks.com> <20190403192819.20243-1-jerinj@marvell.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="UTF-8" Subject: Re: [dpdk-dev] [PATCH v2] eal: change init macro as exec environment specific X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Message-ID: <20190403200747.pKa-xdcSNrPl7amp1j7EF1-fKgyrb_-8Y8aPf_x6tOA@z> 03/04/2019 21:28, Jerin Jacob Kollanukkaran: > From: Jerin Jacob > > baremetal execution environments may have a different > method to enable RTE_INIT instead of using compiler > constructor and/or OS specific linker scheme. > Allow an option to override RTE_INIT* macros using > rte_os.h or appropriate header file. > > Signed-off-by: Jerin Jacob > --- > > v2: > - Leverage the rte_os.h created by Windows port to override RTE_INIT* macro if needed. > - Removed the exec environment specific librte_eal//eal/include/exec-env/rte_exec-env.h > file creation > - Removed the duplication of RTE_INIT_* definition on each rte_exec-env.h file > as it is common for Linux,FreeBSD and Windows port > > --- a/lib/librte_eal/common/include/rte_common.h > +++ b/lib/librte_eal/common/include/rte_common.h > @@ -106,8 +106,10 @@ typedef uint16_t unaligned_uint16_t; > * Priority number must be above 100. > * Lowest number is the first to run. > */ > +#ifndef RTE_INIT_PRIO /* Allow to override from eal */ > #define RTE_INIT_PRIO(func, prio) \ > static void __attribute__((constructor(RTE_PRIO(prio)), used)) func(void) > +#endif I did not think about such #ifndef, it's a lot simpler :) As a nit, I would just fix eal to uppercase EAL in the above comment. I may do it on apply. Acked-by: Thomas Monjalon