On 2020-05-07 15:16 GMT+0300 tal...@mellanox.com wrote: > From: Tal Shnaiderman <tal...@mellanox.com> > > Move common functions between Unix and Windows to eal_common_config.c. > > Those simple functions are getter functions for IOVA, > configuration, Multi-process. > > Move rte_config and runtime_dir to be defined in a common file. > > Signed-off-by: Tal Shnaiderman <tal...@mellanox.com> > --- [snip] > + > +/* early configuration structure, when memory config is not mmapped */ > +static struct rte_mem_config early_mem_config; > + > +/* Address of global and public configuration */ > +static struct rte_config rte_config = { > + .mem_config = &early_mem_config, > +}; > +
This declarations result in numerous -Wunused-variable warnings from all files includeing eal_private.h, and rightfully so, because there must be only one configuration structure in the program. You can use `extern` to declare variables here and then define them non-static, e.g. in eal_common_config.c. > /** > * Get the global configuration structure. > * > diff --git a/lib/librte_eal/common/meson.build > b/lib/librte_eal/common/meson.build > index 9bb234009..83bac5884 100644 > --- a/lib/librte_eal/common/meson.build > +++ b/lib/librte_eal/common/meson.build [snip] -- Dmitry Kozlyuk