patch 'bus/vmbus: remove packed attribute from ring buffer' has been queued to stable release 24.11.9
luca.boccassi at gmail.com
luca.boccassi at gmail.com
Tue Oct 27 12:50:33 CET 2026
Hi,
FYI, your patch has been queued to stable release 24.11.9
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 10/29/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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/6593cd161c754d0c8ac4d3b9bcc326d15cb98faf
Thanks.
Luca Boccassi
---
>From 6593cd161c754d0c8ac4d3b9bcc326d15cb98faf 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 | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/bus/vmbus/rte_vmbus_reg.h b/drivers/bus/vmbus/rte_vmbus_reg.h
index a12c7e2715f..8072094fed3 100644
--- a/drivers/bus/vmbus/rte_vmbus_reg.h
+++ b/drivers/bus/vmbus/rte_vmbus_reg.h
@@ -105,7 +105,7 @@ struct vmbus_bufring {
* page aligned and starts at rte_mem_page_size() from the beginning
* of this structure
*/
-} __rte_packed;
+};
/*
* Channel packets
--
2.47.3
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2026-10-27 11:43:59.045988222 +0000
+++ 0139-bus-vmbus-remove-packed-attribute-from-ring-buffer.patch 2026-10-27 11:43:53.662064030 +0000
@@ -1 +1 @@
-From f3a26c3c17a7a6f3b5301cbb5c2f7669aa5ad434 Mon Sep 17 00:00:00 2001
+From 6593cd161c754d0c8ac4d3b9bcc326d15cb98faf Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit f3a26c3c17a7a6f3b5301cbb5c2f7669aa5ad434 ]
+
@@ -21,2 +22,0 @@
-Cc: stable at dpdk.org
-
@@ -26,3 +26,2 @@
- drivers/bus/vmbus/rte_vmbus_reg.h | 4 ++--
- drivers/bus/vmbus/vmbus_bufring.c | 7 ++-----
- 2 files changed, 4 insertions(+), 7 deletions(-)
+ drivers/bus/vmbus/rte_vmbus_reg.h | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
@@ -31 +30 @@
-index 6370a07f95..210328c877 100644
+index a12c7e2715f..8072094fed3 100644
@@ -34,10 +33 @@
-@@ -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 {
+@@ -105,7 +105,7 @@ struct vmbus_bufring {
@@ -47 +37 @@
--} __rte_packed_end;
+-} __rte_packed;
@@ -52,18 +41,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
-@@ -160,11 +160,8 @@ vmbus_txbr_write(struct vmbus_br *tbr, const struct iovec iov[], int iovlen,
- /* Wait for previous producer to publish their windex update */
- 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);
-
- /* If host had read all data before this, then need to signal */
More information about the stable
mailing list