[dpdk-dev] [PATCH v2 1/8] eal: use different constructor priorities for initcalls

Ferruh Yigit ferruh.yigit at intel.com
Tue Feb 21 13:30:04 CET 2017


On 2/20/2017 2:17 PM, Jan Blunck wrote:
> This introduces different initcall macros to allow for late registration of
> the virtual device bus.
> 
> Signed-off-by: Jan Blunck <jblunck at infradead.org>
> Tested-by: Ferruh Yigit <ferruh.yigit at intel.com>

<...>

>  
> -#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)
> +
> +#define RTE_INIT(func) RTE_DEV_INIT(func)

Does it make sense to give some gaps among priorities,
101, 102, 103 --> 100, 200 , 300

When new priorities added (not sure if that ever will happen), is
changing previous priorities cause a ABI breakage?


More information about the dev mailing list