[dpdk-dev] [PATCH v2 02/12] mldev: support PMD functions for ML device
Thomas Monjalon
thomas at monjalon.net
Mon Feb 6 23:17:47 CET 2023
06/02/2023 22:04, Stephen Hemminger:
> On Tue, 7 Feb 2023 01:54:43 +0530
> <jerinj at marvell.com> wrote:
>
> > +static struct rte_ml_dev ml_devices[RTE_MLDEV_MAX_DEVS];
> >
>
> This will reserve space for 64 devices, but almost all users
> will only have one. Maybe a level of indirection and allocate as needed?
>
> You could even use a single allocation for the pmd and device private
> data portion.
I like what we did for GPU class: rte_gpu_init(size_t dev_max)
If not called by the app, it is called automatically with a default size.
So you can have a small default and there is no compilation settings.
More information about the dev
mailing list