[dpdk-dev] [PATCH v2 02/12] mldev: support PMD functions for ML device
Stephen Hemminger
stephen at networkplumber.org
Mon Feb 6 22:04:32 CET 2023
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.
> + */
> +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?
More information about the dev
mailing list