[dpdk-dev] [PATCH v2 0/3] Allow overriding of build-time constants

Bruce Richardson bruce.richardson at intel.com
Fri Oct 16 17:55:58 CEST 2020


On Fri, Oct 16, 2020 at 05:47:45PM +0200, David Marchand wrote:
> Hello Bruce,
> 
> On Thu, Sep 3, 2020 at 4:50 PM Bruce Richardson
> <bruce.richardson at intel.com> wrote:
> >
> > A number of the more advanced DPDK build settings which are not expected to
> > be user modified are stored in config/rte_config.h. In some cases, for a
> > custom build a user may want to override those settings via CFLAGS, so we
> > need to ensure that the definitions do not override the user-provided
> > values.
> >
> > Bruce Richardson (3):
> >   config: remove explicit undefinition of unset values
> >   config: allow overriding some build defaults
> >   doc: add notes on overriding extra config values
> 
> $ CFLAGS="-DRTE_MAX_MEMSEG_LISTS=64" meson setup
> --default-library=shared --buildtype=debugoptimized
> -Dprefix=/home/dmarchan/git/pub/dpdk.org/build/install build
> $ ninja-build -C build -j4 install
> 
> 
> librte_eal.so is indeed built with the 64 value:
> $ pahole -C rte_mem_config build/install/lib64/librte_eal.so |grep memsegs
> die__process_function: tag not supported (INVALID)!
>     struct rte_memseg_list     memsegs[64];          /*   136  8704 */
> 
> 
> But no trace of the custom value for external applications:
> $ grep -r RTE_MAX_MEMSEG_LISTS build/install
> build/install/include/rte_config.h:#ifndef RTE_MAX_MEMSEG_LISTS
> build/install/include/rte_config.h:#define RTE_MAX_MEMSEG_LISTS 128
> Binary file build/install/lib64/librte_eal.a matches
> Binary file build/install/lib64/librte_eal.so.21.0 matches
> 
> I can see the same using the meson option -Dc_args.
> 

Good point, I had not thought of external apps using these values.

They are mostly for internal use, so maybe its worthwhile looking to not
have them in a public header file. What do you think? Is it likely that
apps would be using some of these values, or needs to know the specifics?

/Bruce


More information about the dev mailing list