RE: [PATCH v4 20/35] net/intel: write descriptors using non-volatile pointers

Morten Brørup
2026-02-09T23:08:50Z

> +static inline void
> +write_txd(volatile void *txd, uint64_t qw0, uint64_t qw1)
> +{
> + uint64_t *txd_qw = __rte_assume_aligned(RTE_CAST_PTR(void *,
> txd), 16);
> +
> + txd_qw[0] = rte_cpu_to_le_64(qw0);
> + txd_qw[1] = rte_cpu_to_le_64(qw1);
> +}

How about using __rte_aligned() instead, something like this (untested):

struct __rte_aligned(16) txd_t {
uint64_t qw0;
uint64_t qw1;
};

*RTE_CAST_PTR(volatile struct txd_t *, txd) = {
rte_cpu_to_le_64(qw0),
rte_cpu_to_le_64(qw1)
};

And why strip the "volatile"?