From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jan Blunck Subject: Re: [PATCH 1/7] eal: use different constructor priorities for initcalls Date: Wed, 15 Feb 2017 16:05:11 +0100 Message-ID: References: <1487152929-23627-1-git-send-email-jblunck@infradead.org> <1487152929-23627-2-git-send-email-jblunck@infradead.org> <303901dd-da3c-38ea-2979-01ee66387b68@nxp.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Cc: dev To: Shreyansh Jain Return-path: Received: from mail-wr0-f195.google.com (mail-wr0-f195.google.com [209.85.128.195]) by dpdk.org (Postfix) with ESMTP id 2C7CF2BA4 for ; Wed, 15 Feb 2017 16:05:12 +0100 (CET) Received: by mail-wr0-f195.google.com with SMTP id i10so31617626wrb.0 for ; Wed, 15 Feb 2017 07:05:12 -0800 (PST) In-Reply-To: <303901dd-da3c-38ea-2979-01ee66387b68@nxp.com> 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, Feb 15, 2017 at 3:37 PM, Shreyansh Jain wrote: > On Wednesday 15 February 2017 03:32 PM, Jan Blunck wrote: >> >> --- a/lib/librte_eal/common/include/rte_eal.h >> +++ b/lib/librte_eal/common/include/rte_eal.h >> @@ -258,8 +258,16 @@ static inline int rte_gettid(void) >> return RTE_PER_LCORE(_thread_id); >> } >> >> -#define RTE_INIT(func) \ >> -static void __attribute__((constructor, used)) func(void) >> +#define RTE_EAL_INIT(func) \ >> +static void __attribute__((constructor(101), used)) func(void) >> + >> +#define RTE_POST_EAL_INIT(func) \ >> +static void __attribute__((constructor(102), used)) func(void) >> + >> +#define RTE_DEV_INIT(func) \ >> +static void __attribute__((constructor(103), used)) func(void) > > > Shouldn't we simply allow this priority to be default to allow for some > priority space between buses and default init? > The absolute numbers are not that important. We can always adjust them. Important is the relative order. If you have a use-case for something that needs to be initialized before the devices but can't get initialized with the eal/post-eal then please speak up.