06/02/2023 22:04, Stephen Hemminger: > On Tue, 7 Feb 2023 01:54:43 +0530 > <jer...@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.