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.

> + */
> +struct rte_ml_dev_data {
> +     /** Unique identifier name. */
> +     char name[RTE_ML_STR_MAX];


Why is name first, it is the least used field. Might want it to be last
for cache locality.

> +     /** Reserved for future fields */
> +     uint64_t reserved[3];

Reserved fields have been a problem in the past.
Why do this? Are thy just available pad elements to be cache line size?

And why bother being cache aligned for an info struct?

Reply via email to