* [PATCH v6 1/7] test/ring: fix failure with custom number of lcores
[not found] ` <20241021160823.1072-1-konstantin.v.ananyev@yandex.ru>
@ 2024-10-21 16:08 ` Konstantin Ananyev
0 siblings, 0 replies; 7+ messages in thread
From: Konstantin Ananyev @ 2024-10-21 16:08 UTC (permalink / raw)
To: dev
Cc: honnappa.nagarahalli, jerinj, hemant.agrawal, drc, ruifeng.wang,
mb, eimear.morrissey, stephen, Konstantin Ananyev, stable,
Phanendra Vukkisala
From: Konstantin Ananyev <konstantin.ananyev@huawei.com>
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")
Cc: stable@dpdk.org
Reported-by: Phanendra Vukkisala <pvukkisala@marvell.com>
Signed-off-by: Konstantin Ananyev <konstantin.ananyev@huawei.com>
---
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 8b0bfb11fe..ee5274aeef 100644
--- a/app/test/test_ring_stress_impl.h
+++ b/app/test/test_ring_stress_impl.h
@@ -297,7 +297,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(typeof(*r)));
if (r == NULL) {
--
2.35.3
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH v6 1/7] test/ring: fix failure with custom number of lcores
[not found] ` <20241021174745.1843-1-konstantin.ananyev@huawei.com>
@ 2024-10-21 17:47 ` Konstantin Ananyev
[not found] ` <20241030212304.104180-1-konstantin.ananyev@huawei.com>
1 sibling, 0 replies; 7+ messages in thread
From: Konstantin Ananyev @ 2024-10-21 17:47 UTC (permalink / raw)
To: dev
Cc: honnappa.nagarahalli, jerinj, hemant.agrawal, drc, ruifeng.wang,
mb, eimear.morrissey, stephen, stable, Phanendra Vukkisala
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")
Cc: stable@dpdk.org
Reported-by: Phanendra Vukkisala <pvukkisala@marvell.com>
Signed-off-by: Konstantin Ananyev <konstantin.ananyev@huawei.com>
---
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 8b0bfb11fe..ee5274aeef 100644
--- a/app/test/test_ring_stress_impl.h
+++ b/app/test/test_ring_stress_impl.h
@@ -297,7 +297,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(typeof(*r)));
if (r == NULL) {
--
2.35.3
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH v7 1/7] test/ring: fix failure with custom number of lcores
[not found] ` <20241030212304.104180-1-konstantin.ananyev@huawei.com>
@ 2024-10-30 21:22 ` Konstantin Ananyev
2024-11-07 11:50 ` Morten Brørup
[not found] ` <20241107182429.60406-1-konstantin.ananyev@huawei.com>
1 sibling, 1 reply; 7+ messages in thread
From: Konstantin Ananyev @ 2024-10-30 21:22 UTC (permalink / raw)
To: dev
Cc: honnappa.nagarahalli, jerinj, hemant.agrawal, bruce.richardson,
drc, ruifeng.wang, mb, eimear.morrissey, stephen, stable
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")
Cc: stable@dpdk.org
Signed-off-by: Konstantin Ananyev <konstantin.ananyev@huawei.com>
---
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 8b0bfb11fe..ee5274aeef 100644
--- a/app/test/test_ring_stress_impl.h
+++ b/app/test/test_ring_stress_impl.h
@@ -297,7 +297,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(typeof(*r)));
if (r == NULL) {
--
2.35.3
^ permalink raw reply [flat|nested] 7+ messages in thread
* RE: [PATCH v7 1/7] test/ring: fix failure with custom number of lcores
2024-10-30 21:22 ` [PATCH v7 " Konstantin Ananyev
@ 2024-11-07 11:50 ` Morten Brørup
0 siblings, 0 replies; 7+ messages in thread
From: Morten Brørup @ 2024-11-07 11:50 UTC (permalink / raw)
To: Konstantin Ananyev, dev
Cc: honnappa.nagarahalli, jerinj, hemant.agrawal, bruce.richardson,
drc, ruifeng.wang, eimear.morrissey, stephen, stable
Simple change,
Acked-by: Morten Brørup <mb@smartsharesystems.com>
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH v8 1/7] test/ring: fix failure with custom number of lcores
[not found] ` <20241107182429.60406-1-konstantin.ananyev@huawei.com>
@ 2024-11-07 18:24 ` Konstantin Ananyev
[not found] ` <20241111122535.6214-1-konstantin.ananyev@huawei.com>
1 sibling, 0 replies; 7+ messages in thread
From: Konstantin Ananyev @ 2024-11-07 18:24 UTC (permalink / raw)
To: dev
Cc: honnappa.nagarahalli, jerinj, hemant.agrawal, bruce.richardson,
drc, ruifeng.wang, mb, eimear.morrissey, stephen, stable,
Phanendra Vukkisala
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")
Cc: stable@dpdk.org
Reported-by: Phanendra Vukkisala <pvukkisala@marvell.com>
Signed-off-by: Konstantin Ananyev <konstantin.ananyev@huawei.com>
Acked-by: Morten Brørup <mb@smartsharesystems.com>
Acked-by: Stephen Hemminger <stephen@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 8b0bfb11fe..ee5274aeef 100644
--- a/app/test/test_ring_stress_impl.h
+++ b/app/test/test_ring_stress_impl.h
@@ -297,7 +297,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(typeof(*r)));
if (r == NULL) {
--
2.35.3
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH v9 1/7] test/ring: fix failure with custom number of lcores
[not found] ` <20241111122535.6214-1-konstantin.ananyev@huawei.com>
@ 2024-11-11 12:25 ` Konstantin Ananyev
[not found] ` <20241111141910.40604-1-konstantin.ananyev@huawei.com>
1 sibling, 0 replies; 7+ messages in thread
From: Konstantin Ananyev @ 2024-11-11 12:25 UTC (permalink / raw)
To: dev
Cc: honnappa.nagarahalli, jerinj, hemant.agrawal, bruce.richardson,
drc, ruifeng.wang, mb, eimear.morrissey, stephen, stable,
Phanendra Vukkisala
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")
Cc: stable@dpdk.org
Reported-by: Phanendra Vukkisala <pvukkisala@marvell.com>
Signed-off-by: Konstantin Ananyev <konstantin.ananyev@huawei.com>
Acked-by: Morten Brørup <mb@smartsharesystems.com>
Acked-by: Stephen Hemminger <stephen@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 8b0bfb11fe..ee5274aeef 100644
--- a/app/test/test_ring_stress_impl.h
+++ b/app/test/test_ring_stress_impl.h
@@ -297,7 +297,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(typeof(*r)));
if (r == NULL) {
--
2.35.3
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH v10 1/7] test/ring: fix failure with custom number of lcores
[not found] ` <20241111141910.40604-1-konstantin.ananyev@huawei.com>
@ 2024-11-11 14:19 ` Konstantin Ananyev
0 siblings, 0 replies; 7+ messages in thread
From: Konstantin Ananyev @ 2024-11-11 14:19 UTC (permalink / raw)
To: dev
Cc: honnappa.nagarahalli, jerinj, hemant.agrawal, bruce.richardson,
drc, ruifeng.wang, mb, eimear.morrissey, stephen, stable,
Phanendra Vukkisala
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")
Cc: stable@dpdk.org
Reported-by: Phanendra Vukkisala <pvukkisala@marvell.com>
Signed-off-by: Konstantin Ananyev <konstantin.ananyev@huawei.com>
Acked-by: Morten Brørup <mb@smartsharesystems.com>
Acked-by: Stephen Hemminger <stephen@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 8b0bfb11fe..ee5274aeef 100644
--- a/app/test/test_ring_stress_impl.h
+++ b/app/test/test_ring_stress_impl.h
@@ -297,7 +297,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(typeof(*r)));
if (r == NULL) {
--
2.35.3
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2024-11-11 13:29 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <20241015130111.826-1-konstantin.v.ananyev@yandex.ru>
[not found] ` <20241021160823.1072-1-konstantin.v.ananyev@yandex.ru>
2024-10-21 16:08 ` [PATCH v6 1/7] test/ring: fix failure with custom number of lcores Konstantin Ananyev
[not found] ` <20241021174745.1843-1-konstantin.ananyev@huawei.com>
2024-10-21 17:47 ` Konstantin Ananyev
[not found] ` <20241030212304.104180-1-konstantin.ananyev@huawei.com>
2024-10-30 21:22 ` [PATCH v7 " Konstantin Ananyev
2024-11-07 11:50 ` Morten Brørup
[not found] ` <20241107182429.60406-1-konstantin.ananyev@huawei.com>
2024-11-07 18:24 ` [PATCH v8 " Konstantin Ananyev
[not found] ` <20241111122535.6214-1-konstantin.ananyev@huawei.com>
2024-11-11 12:25 ` [PATCH v9 " Konstantin Ananyev
[not found] ` <20241111141910.40604-1-konstantin.ananyev@huawei.com>
2024-11-11 14:19 ` [PATCH v10 " Konstantin Ananyev
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).