> -----Original Message-----
> From: Stephen Hemminger <[email protected]>
> Sent: Monday, September 21, 2026 2:10 AM
> To: [email protected]
> Cc: Stephen Hemminger <[email protected]>; Wei Hu
> <[email protected]>
> Subject: [EXTERNAL] [PATCH v2 02/33] bus/vmbus: remove packed attribute
> from ring buffer
> 
> The attribute came from the FreeBSD structure this was copied from, which
> ends in a flexible array member for the ring data and is asserted to be page
> sized. DPDK computes the data offset from the page size instead and never
> declared that member, so nothing is left that packing affects: all remaining
> members are naturally aligned and the layout is identical without it.
> 
> Byte alignment does prevent atomic access to the ring indexes, which clang
> rejects with -Watomic-alignment.
> 
> Signed-off-by: Stephen Hemminger <[email protected]>

Reviewed-by: [email protected]

> ---
>  drivers/bus/vmbus/rte_vmbus_reg.h | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/bus/vmbus/rte_vmbus_reg.h
> b/drivers/bus/vmbus/rte_vmbus_reg.h
> index 6370a07f95..210328c877 100644
> --- a/drivers/bus/vmbus/rte_vmbus_reg.h
> +++ b/drivers/bus/vmbus/rte_vmbus_reg.h
> @@ -69,7 +69,7 @@ struct __rte_packed_begin vmbus_mon_page {
>   * Buffer ring
>   */
> 
> -struct __rte_packed_begin vmbus_bufring {
> +struct vmbus_bufring {
>       volatile uint32_t windex;
>       volatile uint32_t rindex;
> 
> @@ -111,7 +111,7 @@ struct __rte_packed_begin vmbus_bufring {
>        * page aligned and starts at rte_mem_page_size() from the beginning
>        * of this structure
>        */
> -} __rte_packed_end;
> +};
> 
>  /*
>   * Channel packets
> --
> 2.53.0

Reply via email to