patch 'test/ring: fix init with custom number of lcores' has been queued to stable release 23.11.4

Xueming Li xuemingl at nvidia.com
Tue Feb 18 13:33:56 CET 2025


Hi,

FYI, your patch has been queued to stable release 23.11.4

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
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://git.dpdk.org/dpdk-stable/log/?h=23.11-staging

This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=8c0b8af3bd76eb9d19ade4503b72a901b6e9780b

Thanks.

Xueming Li <xuemingl at nvidia.com>

---
>From 8c0b8af3bd76eb9d19ade4503b72a901b6e9780b Mon Sep 17 00:00:00 2001
From: Konstantin Ananyev <konstantin.ananyev at huawei.com>
Date: Fri, 6 Dec 2024 13:35:54 -0500
Subject: [PATCH] test/ring: fix init with custom number of lcores
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: Xueming Li <xuemingl at nvidia.com>

[ upstream commit 2cf3a8d35d2db1cee1523e6e9ef5553432fbf56f ]

ring_stress_autotest fails to initialize the ring when RTE_MAX_LCORE value
is not a number of 2.
There is a flaw in calculation required number of elements in the ring.
Fix it by aligning number of elements to next power of 2.

Fixes: bf28df24e915 ("test/ring: add contention stress test")

Reported-by: Phanendra Vukkisala <pvukkisala at marvell.com>
Signed-off-by: Konstantin Ananyev <konstantin.ananyev at huawei.com>
Acked-by: Morten Brørup <mb at smartsharesystems.com>
Acked-by: Stephen Hemminger <stephen at networkplumber.org>
---
 app/test/test_ring_stress_impl.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/app/test/test_ring_stress_impl.h b/app/test/test_ring_stress_impl.h
index 62f046a91a..373091957b 100644
--- a/app/test/test_ring_stress_impl.h
+++ b/app/test/test_ring_stress_impl.h
@@ -295,7 +295,7 @@ mt1_init(struct rte_ring **rng, void **data, uint32_t num)
 	*data = elm;

 	/* alloc ring */
-	nr = 2 * num;
+	nr = rte_align32pow2(2 * num);
 	sz = rte_ring_get_memsize(nr);
 	r = rte_zmalloc(NULL, sz, __alignof__(*r));
 	if (r == NULL) {
--
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2025-02-18 19:39:00.800358318 +0800
+++ 0001-test-ring-fix-init-with-custom-number-of-lcores.patch	2025-02-18 19:39:00.388244089 +0800
@@ -1 +1 @@
-From 2cf3a8d35d2db1cee1523e6e9ef5553432fbf56f Mon Sep 17 00:00:00 2001
+From 8c0b8af3bd76eb9d19ade4503b72a901b6e9780b Mon Sep 17 00:00:00 2001
@@ -7,0 +8,3 @@
+Cc: Xueming Li <xuemingl at nvidia.com>
+
+[ upstream commit 2cf3a8d35d2db1cee1523e6e9ef5553432fbf56f ]
@@ -15 +17,0 @@
-Cc: stable at dpdk.org
@@ -26 +28 @@
-index 8b0bfb11fe..ee5274aeef 100644
+index 62f046a91a..373091957b 100644
@@ -29 +31 @@
-@@ -297,7 +297,7 @@ mt1_init(struct rte_ring **rng, void **data, uint32_t num)
+@@ -295,7 +295,7 @@ mt1_init(struct rte_ring **rng, void **data, uint32_t num)
@@ -36 +38 @@
- 	r = rte_zmalloc(NULL, sz, alignof(typeof(*r)));
+ 	r = rte_zmalloc(NULL, sz, __alignof__(*r));


More information about the stable mailing list