* [PATCH] app/dma_perf: skip case if worker maps to main lcore
@ 2026-06-23 4:58 Rupesh Chiluka
2026-06-23 8:07 ` Bruce Richardson
2026-06-24 4:54 ` Rupesh Chiluka
0 siblings, 2 replies; 7+ messages in thread
From: Rupesh Chiluka @ 2026-06-23 4:58 UTC (permalink / raw)
To: Cheng Jiang, Chengwen Feng; +Cc: dev, gakhil, anoobj, ktejasree, Rupesh Chiluka
Refuse to run DMA/CPU mem-copy cases when any worker is bound to the
EAL main lcore.
Signed-off-by: Rupesh Chiluka <rchiluka@marvell.com>
---
app/test-dma-perf/main.c | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/app/test-dma-perf/main.c b/app/test-dma-perf/main.c
index 4249dcfd3d..b6aa5b8401 100644
--- a/app/test-dma-perf/main.c
+++ b/app/test-dma-perf/main.c
@@ -109,6 +109,7 @@ run_test_case(struct test_configure *case_cfg)
static void
run_test(uint32_t case_id, struct test_configure *case_cfg)
{
+ uint32_t main_lcore = rte_get_main_lcore();
uint32_t nb_lcores = rte_lcore_count();
struct test_configure_entry *mem_size = &case_cfg->mem_size;
struct test_configure_entry *buf_size = &case_cfg->buf_size;
@@ -122,6 +123,14 @@ run_test(uint32_t case_id, struct test_configure *case_cfg)
return;
}
+ for (uint32_t i = 0; i < case_cfg->num_worker; i++) {
+ if (case_cfg->dma_config[i].lcore_dma_map.lcore == main_lcore) {
+ printf("Case %u: worker %u cannot run on the EAL main lcore (%u).\n",
+ case_id, i, main_lcore);
+ return;
+ }
+ }
+
printf("Number of used lcores: %u.\n", nb_lcores);
if (mem_size->incr != 0)
--
2.48.1
^ permalink raw reply related [flat|nested] 7+ messages in thread* Re: [PATCH] app/dma_perf: skip case if worker maps to main lcore
2026-06-23 4:58 [PATCH] app/dma_perf: skip case if worker maps to main lcore Rupesh Chiluka
@ 2026-06-23 8:07 ` Bruce Richardson
2026-06-24 0:57 ` fengchengwen
2026-06-24 4:54 ` Rupesh Chiluka
1 sibling, 1 reply; 7+ messages in thread
From: Bruce Richardson @ 2026-06-23 8:07 UTC (permalink / raw)
To: Rupesh Chiluka; +Cc: Cheng Jiang, Chengwen Feng, dev, gakhil, anoobj, ktejasree
On Tue, Jun 23, 2026 at 10:28:41AM +0530, Rupesh Chiluka wrote:
> Refuse to run DMA/CPU mem-copy cases when any worker is bound to the
> EAL main lcore.
>
Can you explain a bit more why?
> Signed-off-by: Rupesh Chiluka <rchiluka@marvell.com>
> ---
> app/test-dma-perf/main.c | 9 +++++++++
> 1 file changed, 9 insertions(+)
>
> diff --git a/app/test-dma-perf/main.c b/app/test-dma-perf/main.c
> index 4249dcfd3d..b6aa5b8401 100644
> --- a/app/test-dma-perf/main.c
> +++ b/app/test-dma-perf/main.c
> @@ -109,6 +109,7 @@ run_test_case(struct test_configure *case_cfg)
> static void
> run_test(uint32_t case_id, struct test_configure *case_cfg)
> {
> + uint32_t main_lcore = rte_get_main_lcore();
> uint32_t nb_lcores = rte_lcore_count();
> struct test_configure_entry *mem_size = &case_cfg->mem_size;
> struct test_configure_entry *buf_size = &case_cfg->buf_size;
> @@ -122,6 +123,14 @@ run_test(uint32_t case_id, struct test_configure *case_cfg)
> return;
> }
>
> + for (uint32_t i = 0; i < case_cfg->num_worker; i++) {
> + if (case_cfg->dma_config[i].lcore_dma_map.lcore == main_lcore) {
> + printf("Case %u: worker %u cannot run on the EAL main lcore (%u).\n",
> + case_id, i, main_lcore);
> + return;
> + }
> + }
> +
> printf("Number of used lcores: %u.\n", nb_lcores);
>
> if (mem_size->incr != 0)
> --
> 2.48.1
>
^ permalink raw reply [flat|nested] 7+ messages in thread* Re: [PATCH] app/dma_perf: skip case if worker maps to main lcore
2026-06-23 8:07 ` Bruce Richardson
@ 2026-06-24 0:57 ` fengchengwen
2026-06-24 4:24 ` Stephen Hemminger
0 siblings, 1 reply; 7+ messages in thread
From: fengchengwen @ 2026-06-24 0:57 UTC (permalink / raw)
To: Bruce Richardson, Rupesh Chiluka
Cc: Cheng Jiang, dev, gakhil, anoobj, ktejasree
On 6/23/2026 4:07 PM, Bruce Richardson wrote:
> On Tue, Jun 23, 2026 at 10:28:41AM +0530, Rupesh Chiluka wrote:
>> Refuse to run DMA/CPU mem-copy cases when any worker is bound to the
>> EAL main lcore.
>>
>
> Can you explain a bit more why?
+1
I understand this bugfix, as the following config, the test will stuck
because the master lcore is the same with worker lcore.
[GLOBAL]
eal_args=--in-memory --file-prefix=test -l 10-12
[case4]
type=CPU_MEM_COPY
mem_size=10
buf_size=64,8192,2,MUL
src_numa_node=0
dst_numa_node=1
lcore = 10, 11
So please add more explain as Bruce suggest, and also add Fixes/CC tag
>
>> Signed-off-by: Rupesh Chiluka <rchiluka@marvell.com>
>> ---
>> app/test-dma-perf/main.c | 9 +++++++++
>> 1 file changed, 9 insertions(+)
>>
>> diff --git a/app/test-dma-perf/main.c b/app/test-dma-perf/main.c
>> index 4249dcfd3d..b6aa5b8401 100644
>> --- a/app/test-dma-perf/main.c
>> +++ b/app/test-dma-perf/main.c
>> @@ -109,6 +109,7 @@ run_test_case(struct test_configure *case_cfg)
>> static void
>> run_test(uint32_t case_id, struct test_configure *case_cfg)
>> {
>> + uint32_t main_lcore = rte_get_main_lcore();
>> uint32_t nb_lcores = rte_lcore_count();
>> struct test_configure_entry *mem_size = &case_cfg->mem_size;
>> struct test_configure_entry *buf_size = &case_cfg->buf_size;
>> @@ -122,6 +123,14 @@ run_test(uint32_t case_id, struct test_configure *case_cfg)
>> return;
>> }
>>
>> + for (uint32_t i = 0; i < case_cfg->num_worker; i++) {
Please define the variables in front of function impl.
Thanks
>> + if (case_cfg->dma_config[i].lcore_dma_map.lcore == main_lcore) {
>> + printf("Case %u: worker %u cannot run on the EAL main lcore (%u).\n",
>> + case_id, i, main_lcore);
>> + return;
>> + }
>> + }
>> +
>> printf("Number of used lcores: %u.\n", nb_lcores);
>>
>> if (mem_size->incr != 0)
>> --
>> 2.48.1
>>
>
^ permalink raw reply [flat|nested] 7+ messages in thread* Re: [PATCH] app/dma_perf: skip case if worker maps to main lcore
2026-06-24 0:57 ` fengchengwen
@ 2026-06-24 4:24 ` Stephen Hemminger
0 siblings, 0 replies; 7+ messages in thread
From: Stephen Hemminger @ 2026-06-24 4:24 UTC (permalink / raw)
To: fengchengwen
Cc: Bruce Richardson, Rupesh Chiluka, Cheng Jiang, dev, gakhil,
anoobj, ktejasree
On Wed, 24 Jun 2026 08:57:56 +0800
fengchengwen <fengchengwen@huawei.com> wrote:
> >>
> >> + for (uint32_t i = 0; i < case_cfg->num_worker; i++) {
>
> Please define the variables in front of function impl.
No longer required in DPDK coding style.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH] app/dma_perf: skip case if worker maps to main lcore
2026-06-23 4:58 [PATCH] app/dma_perf: skip case if worker maps to main lcore Rupesh Chiluka
2026-06-23 8:07 ` Bruce Richardson
@ 2026-06-24 4:54 ` Rupesh Chiluka
2026-06-24 5:42 ` [PATCH v2] " Rupesh Chiluka
1 sibling, 1 reply; 7+ messages in thread
From: Rupesh Chiluka @ 2026-06-24 4:54 UTC (permalink / raw)
To: dev; +Cc: Rupesh Chiluka, stable
When a configured worker lcore is same as EAL main lcore, the main
thread calls `rte_eal_remote_launch()` on itself and then waits for
`worker_info.ready_flag`. The worker function cannot run on the main
lcore while the main thread is blocked in that loop, and the test hangs.
Reject such cases early in the `run_test()`.
Fixes: 623dc9364dc6 ("app/dma-perf: introduce DMA performance test")
CC: stable@dpdk.org
Signed-off-by: Rupesh Chiluka <rchiluka@marvell.com>
---
app/test-dma-perf/main.c | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/app/test-dma-perf/main.c b/app/test-dma-perf/main.c
index 4249dcfd3d..a22434c558 100644
--- a/app/test-dma-perf/main.c
+++ b/app/test-dma-perf/main.c
@@ -109,7 +109,9 @@ run_test_case(struct test_configure *case_cfg)
static void
run_test(uint32_t case_id, struct test_configure *case_cfg)
{
+ uint32_t worker_lcore;
uint32_t nb_lcores = rte_lcore_count();
+ uint32_t main_lcore = rte_get_main_lcore();
struct test_configure_entry *mem_size = &case_cfg->mem_size;
struct test_configure_entry *buf_size = &case_cfg->buf_size;
struct test_configure_entry *ring_size = &case_cfg->ring_size;
@@ -122,6 +124,15 @@ run_test(uint32_t case_id, struct test_configure *case_cfg)
return;
}
+ for (uint32_t i = 0; i < case_cfg->num_worker; i++) {
+ worker_lcore = case_cfg->dma_config[i].lcore_dma_map.lcore;
+ if (worker_lcore == main_lcore) {
+ printf("Case %u: worker %u (lcore %u) cannot run on the EAL main lcore (%u).\n",
+ case_id, i, worker_lcore, main_lcore);
+ return;
+ }
+ }
+
printf("Number of used lcores: %u.\n", nb_lcores);
if (mem_size->incr != 0)
--
2.48.1
^ permalink raw reply related [flat|nested] 7+ messages in thread* [PATCH v2] app/dma_perf: skip case if worker maps to main lcore
2026-06-24 4:54 ` Rupesh Chiluka
@ 2026-06-24 5:42 ` Rupesh Chiluka
2026-06-24 6:09 ` fengchengwen
0 siblings, 1 reply; 7+ messages in thread
From: Rupesh Chiluka @ 2026-06-24 5:42 UTC (permalink / raw)
To: dev
Cc: honest.jiang, fengchengwen, gakhil, anoobj, ktejasree,
Rupesh Chiluka, stable
When a configured worker lcore is same as EAL main lcore, the main
thread calls `rte_eal_remote_launch()` on itself and then waits for
`worker_info.ready_flag`. The worker function cannot run on the main
lcore while the main thread is blocked in that loop, and the test hangs.
Reject such cases early in the `run_test()`.
Fixes: 623dc9364dc6 ("app/dma-perf: introduce DMA performance test")
CC: stable@dpdk.org
Signed-off-by: Rupesh Chiluka <rchiluka@marvell.com>
---
app/test-dma-perf/main.c | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/app/test-dma-perf/main.c b/app/test-dma-perf/main.c
index 4249dcfd3d..2809e5417c 100644
--- a/app/test-dma-perf/main.c
+++ b/app/test-dma-perf/main.c
@@ -110,6 +110,7 @@ static void
run_test(uint32_t case_id, struct test_configure *case_cfg)
{
uint32_t nb_lcores = rte_lcore_count();
+ uint32_t main_lcore = rte_get_main_lcore();
struct test_configure_entry *mem_size = &case_cfg->mem_size;
struct test_configure_entry *buf_size = &case_cfg->buf_size;
struct test_configure_entry *ring_size = &case_cfg->ring_size;
@@ -122,6 +123,14 @@ run_test(uint32_t case_id, struct test_configure *case_cfg)
return;
}
+ for (uint32_t i = 0; i < case_cfg->num_worker; i++) {
+ if (case_cfg->dma_config[i].lcore_dma_map.lcore == main_lcore) {
+ printf("Case %u: worker %u cannot run on the EAL main lcore (%u).\n",
+ case_id, i, main_lcore);
+ return;
+ }
+ }
+
printf("Number of used lcores: %u.\n", nb_lcores);
if (mem_size->incr != 0)
--
2.48.1
^ permalink raw reply related [flat|nested] 7+ messages in thread* Re: [PATCH v2] app/dma_perf: skip case if worker maps to main lcore
2026-06-24 5:42 ` [PATCH v2] " Rupesh Chiluka
@ 2026-06-24 6:09 ` fengchengwen
0 siblings, 0 replies; 7+ messages in thread
From: fengchengwen @ 2026-06-24 6:09 UTC (permalink / raw)
To: Rupesh Chiluka, dev; +Cc: honest.jiang, gakhil, anoobj, ktejasree, stable
Acked-by: Chengwen Feng <fengchengwen@huawei.com>
On 6/24/2026 1:42 PM, Rupesh Chiluka wrote:
> When a configured worker lcore is same as EAL main lcore, the main
> thread calls `rte_eal_remote_launch()` on itself and then waits for
> `worker_info.ready_flag`. The worker function cannot run on the main
> lcore while the main thread is blocked in that loop, and the test hangs.
>
> Reject such cases early in the `run_test()`.
>
> Fixes: 623dc9364dc6 ("app/dma-perf: introduce DMA performance test")
> CC: stable@dpdk.org
>
> Signed-off-by: Rupesh Chiluka <rchiluka@marvell.com>
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2026-06-24 6:09 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-06-23 4:58 [PATCH] app/dma_perf: skip case if worker maps to main lcore Rupesh Chiluka
2026-06-23 8:07 ` Bruce Richardson
2026-06-24 0:57 ` fengchengwen
2026-06-24 4:24 ` Stephen Hemminger
2026-06-24 4:54 ` Rupesh Chiluka
2026-06-24 5:42 ` [PATCH v2] " Rupesh Chiluka
2026-06-24 6:09 ` fengchengwen
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.