[PATCH v1] config: make max memzones definition configurable
Ophir Munk
ophirmu at nvidia.com
Mon Feb 13 18:04:34 CET 2023
Since the new rte API was "discussed in recent years" and it is also dependent on different driver vendors acceptance - I suggest that the compilation option will be applied now.
The new rte API effort will start in parallel. Once accepted - it will replace the compilation option.
> -----Original Message-----
> From: Bruce Richardson <bruce.richardson at intel.com>
> Sent: Monday, 13 February 2023 16:53
> To: NBU-Contact-Thomas Monjalon (EXTERNAL) <thomas at monjalon.net>
> Cc: Ophir Munk <ophirmu at nvidia.com>; dev at dpdk.org; Matan Azrad
> <matan at nvidia.com>; Lior Margalit <lmargalit at nvidia.com>; Asaf Penso
> <asafp at nvidia.com>; david.marchand at redhat.com;
> honnappa.nagarahalli at arm.com; jerinj at marvell.com; rmody at marvell.com;
> dsinghrawat at marvell.com
> Subject: Re: [PATCH v1] config: make max memzones definition configurable
>
> On Mon, Feb 13, 2023 at 02:55:41PM +0100, Thomas Monjalon wrote:
> > 13/02/2023 12:05, Bruce Richardson:
> > > On Sun, Feb 12, 2023 at 10:53:19AM +0200, Ophir Munk wrote:
> > > > In current DPDK the RTE_MAX_MEMZONE definition is unconditionally
> > > > hard coded as 2560. For applications requiring different values
> > > > of this parameter – it is more convenient to set its value as part
> > > > of the meson command line rather than changing the dpdk source
> > > > code per application. An example would be of an application that
> > > > uses the DPDK mempool library which is based on DPDK memzone
> > > > library. The application may need to create a number of steering
> > > > tables, each of which will require its own mempool allocation.
> > > > This commit adds a meson optional parameter named max_memzones.
> If
> > > > not specified - it is set by default to 2560. The hard coded
> > > > definition of RTE_MAX_MEMZONE is removed. During meson build time
> > > > the RTE_MAX_MEMZONE can be optionally defined as the value of
> max_memzones parameter.
> > > >
> > > > Signed-off-by: Ophir Munk <ophirmu at nvidia.com> --- RFC:
> > > >
> https://patchwork.dpdk.org/project/dpdk/patch/20230130092302.37614
> > > > 5-1-ophirmu at nvidia.com/
> > > >
> > > > config/meson.build | 1 + config/rte_config.h | 1 -
> > > > meson_options.txt | 2 ++ 3 files changed, 3 insertions(+), 1
> > > > deletion(-)
> > > >
> > > Acked-by: Bruce Richardson <bruce.richardson at intel.com>
> >
> > Are we going to move all compilation-defined settings to
> > meson_options.txt? The direction discussed in recent years was to
> > configure things at runtime, and stop adding compilation-time settings.
> >
> > In this case, it is quite easy to add a new function void
> > rte_memzone_set_max(int max) to be called before rte_eal_init(). If
> > not called, the historical default is used.
> >
> Good point, I admit I had forgotten that.
>
> Looking at the use of RTE_MAX_MEMZONE, it is used as an array dimension
> in a number of places, but, from what I see on cursory examination, it should
> be replacable with a runtime value without significant pain in most cases.
> The one that probably needs more attention is the fact that the "net/qede"
> driver maintains an array of memzones in it's base-code layer. Therefore, we
> probably need input from that driver maintainer to know the impact there
> and why that array is needed in a net driver. [Adding the two maintainers on
> CC]
>
> /Bruce
More information about the dev
mailing list