[dpdk-dev] [PATCH v2] eal: add architecture specific rte_cpuflags.c files

Thomas Monjalon thomas.monjalon at 6wind.com
Tue Feb 2 11:20:21 CET 2016


2016-01-28 12:20, Ferruh Yigit:
> Move cpu_feature_table array from arch specific rte_cpuflags.h files to
> new arch specific rte_cpuflags.c files.
> 
> Main motivation is to escape from static variable declarations in
> header files. cpu_feature_table has many copies in final binary, even
> exist in some object files that does not use this variable at all.
> 
> And this can be a sample to create architecture specific source files
> and move some functions which are not performance sensitive from
> architecture header files to source files.
> 
> v2:
> * rebased for DPDK2.3 (16.04)
> * added arm arch
> * renamed cpu_feature_table[] to rte_cpu_feature_table[]

Applied, thanks.

Now that we have some .c files for rte_cpuflags, I think some code
may be changed.
The function rte_cpu_get_features() and the struct feature_entry are
really specific to each arch and used only by rte_cpu_get_flag_enabled().
So they can be moved in .c and be more specific (leaf/subleaf is unused
for some archs).
Then there is no reason to keep rte_cpu_get_flag_enabled() inline.



More information about the dev mailing list