patch 'bus/vmbus: remove packed attribute from ring buffer' has been queued to stable release 25.11.5
Kevin Traynor
ktraynor at redhat.com
Thu Dec 3 14:01:31 CET 2026
Hi,
FYI, your patch has been queued to stable release 25.11.5
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 12/08/26. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable
This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/4871e03082dc89bb5245bda32fd4b5706bc340a4
Thanks.
Kevin
---
>From 4871e03082dc89bb5245bda32fd4b5706bc340a4 Mon Sep 17 00:00:00 2001
From: Stephen Hemminger <stephen at networkplumber.org>
Date: Tue, 13 Oct 2026 15:22:15 -0700
Subject: [PATCH] bus/vmbus: remove packed attribute from ring buffer
[ upstream commit f3a26c3c17a7a6f3b5301cbb5c2f7669aa5ad434 ]
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. The write index store
in vmbus_txbr_write() no longer needs a cast through uintptr_t to
launder the alignment, so drop it and the comment explaining it.
This is not a fix on its own, so it carries no Fixes: tag, but the
two ordering fixes that follow do not build with clang without it.
Signed-off-by: Stephen Hemminger <stephen at networkplumber.org>
Reviewed-by: Wei Hu <weh at microsoft.com>
---
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
@@ -70,5 +70,5 @@ struct __rte_packed_begin vmbus_mon_page {
*/
-struct __rte_packed_begin vmbus_bufring {
+struct vmbus_bufring {
volatile uint32_t windex;
volatile uint32_t rindex;
@@ -112,5 +112,5 @@ struct __rte_packed_begin vmbus_bufring {
* of this structure
*/
-} __rte_packed_end;
+};
/*
--
2.56.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2026-12-03 12:52:43.943965318 +0000
+++ 0165-bus-vmbus-remove-packed-attribute-from-ring-buffer.patch 2026-12-03 12:52:39.143628009 +0000
@@ -1 +1 @@
-From f3a26c3c17a7a6f3b5301cbb5c2f7669aa5ad434 Mon Sep 17 00:00:00 2001
+From 4871e03082dc89bb5245bda32fd4b5706bc340a4 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit f3a26c3c17a7a6f3b5301cbb5c2f7669aa5ad434 ]
+
@@ -21,2 +22,0 @@
-Cc: stable at dpdk.org
-
@@ -27,2 +27 @@
- drivers/bus/vmbus/vmbus_bufring.c | 7 ++-----
- 2 files changed, 4 insertions(+), 7 deletions(-)
+ 1 file changed, 2 insertions(+), 2 deletions(-)
@@ -48,16 +46,0 @@
-diff --git a/drivers/bus/vmbus/vmbus_bufring.c b/drivers/bus/vmbus/vmbus_bufring.c
-index dcd66390a3..b49725da3e 100644
---- a/drivers/bus/vmbus/vmbus_bufring.c
-+++ b/drivers/bus/vmbus/vmbus_bufring.c
-@@ -161,9 +161,6 @@ vmbus_txbr_write(struct vmbus_br *tbr, const struct iovec iov[], int iovlen,
- rte_wait_until_equal_32(&vbr->windex, old_windex, rte_memory_order_acquire);
-
-- /* Publish our windex update; prior data writes ordered via release.
-- * windex is 4-byte aligned in practice (struct is page-aligned, windex
-- * at offset 0); cast launders the packed-struct alignment-1 attribute.
-- */
-- rte_atomic_store_explicit((volatile __rte_atomic uint32_t *)(uintptr_t)&vbr->windex,
-+ /* Publish our windex update; prior data writes ordered via release. */
-+ rte_atomic_store_explicit((volatile uint32_t __rte_atomic *)&vbr->windex,
- next_windex, rte_memory_order_release);
-
More information about the stable
mailing list