From mboxrd@z Thu Jan 1 00:00:00 1970 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) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=PgSLmXBFo6Sq3xA+F9K1Zt4HozypIApBoUqdtRhlJ58=; b=eU4rHqI5K4RtFNmUrdB+Vm9qL7kwhleEzVJwXfNfKobenHFZDBEZkV0Yam0cqdI61P l/PKY4OCy2EW0PPVgEU7THYuX83cfnxYxzzBSdhv8NLEpwX9DCNbDfEbfI3It0oNVqRT DcYdbJRqr98HmmStHzTv1eVoScHLVpBtRJz+bGgzw3C2lgbW5IC3Ae0Mjjaygq2AR5wD /dVMctk094mTSvwu5lDfaeWQumKo89P7pVLi4e48uTIWA4mIUyLn5NGTZyb0WJUjC/JP 83LknEWTKUpu0jNhoGvPzUcmduBUa5v5twdn2sD0W4xW0TVVSJ00sQR5vto6dRAiZqEM qPPg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=PgSLmXBFo6Sq3xA+F9K1Zt4HozypIApBoUqdtRhlJ58=; b=sO319h5UCM+/3pUFLFMlMwdmlWustvl6vdsFaZgrDNZ1lczHdydKO8NbzA9G4kTwja Xo7CzDX6BcuCK1AQDD8ACFQvQ/kGzaP0TZGYTKpNTCAW68+z2P/hQV1lF1/S/5qJUqbY Du7TXur+qLctiyOBcdILWXeW8cI9gj+rW6UuGmYfsLHsl4GeUjZgw1IAEDL8i4S8bFa/ 6aaUqtaoPSF1OxCqJ/+poxo7KBYVHqSe2qnw5lrl/jXWM6DDF36pzAKBCBGflNouy0Sr YxYDTvGKrTSljePZahvsO8gKc+Z0MGpjUnhKxOzsq+FCtdTG3PG0N/S9oIe+s2elZmel +j3w== X-Gm-Message-State: AMke39mAEMhKLMjXJOq+xA3dJowopxJBCOWoedJv+f9bEruLm6L8yXK2lxpe3WFAXIJKjzdQ7PwVfAYe3le1BQ== X-Received: by 10.223.132.166 with SMTP id 35mr29256564wrg.122.1487171111816; Wed, 15 Feb 2017 07:05:11 -0800 (PST) MIME-Version: 1.0 Sender: jblunck@gmail.com Received: by 10.28.211.20 with HTTP; Wed, 15 Feb 2017 07:05:11 -0800 (PST) In-Reply-To: <303901dd-da3c-38ea-2979-01ee66387b68@nxp.com> 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> From: Jan Blunck Date: Wed, 15 Feb 2017 16:05:11 +0100 X-Google-Sender-Auth: q6dinUNj8HWggwQWOXyCtPU5ksg Message-ID: To: Shreyansh Jain Cc: dev Content-Type: text/plain; charset=UTF-8 Subject: Re: [dpdk-dev] [PATCH 1/7] eal: use different constructor priorities for initcalls 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: , X-List-Received-Date: Wed, 15 Feb 2017 15:05:12 -0000 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.