[PATCH v1 52/73] net/ntnic: update alignment for virt queue structs
Stephen Hemminger
stephen at networkplumber.org
Tue Oct 22 01:12:49 CEST 2024
On Mon, 21 Oct 2024 23:04:54 +0200
Serhii Iliushyk <sil-plv at napatech.com> wrote:
> truct __rte_aligned(8) virtq_avail {
> +struct __rte_packed __rte_aligned(1) virtq_avail {
> uint16_t flags;
> uint16_t idx;
> uint16_t ring[]; /* Queue Size */
> };
>
> -struct __rte_aligned(8) virtq_used_elem {
> +struct __rte_packed __rte_aligned(1) virtq_used_elem {
> /* Index of start of used descriptor chain. */
> uint32_t id;
> /* Total length of the descriptor chain which was used (written to) */
> uint32_t len;
> };
>
> -struct __rte_aligned(8) virtq_used {
> +struct __rte_packed __rte_aligned(1) virtq_used {
> uint16_t flags;
> uint16_t idx;
> struct virtq_used_elem ring[]; /* Queue Size */
If you use __rte_packed doesn't it assume no alignment.
More information about the dev
mailing list