[PATCH v2] app/testpmd: stop secondary process fwd_lcores during primary teardown
Stephen Hemminger
stephen at networkplumber.org
Fri Sep 12 01:50:58 CEST 2025
On Thu, 11 Sep 2025 03:25:01 -0700
Khadem Ullah <14pwcse1224 at uetpeshawar.edu.pk> wrote:
> When the secondary process testpmd application running any fwd_engine
> and after that primary has exited will cause a crash.
>
> This patch forces secondary process forwarding lcores
> in fwd_engine to stop before the primary process exits.
>
> Fixes: a550baf24af90f ("app/testpmd: support multi-process")
> Cc: stable at dpdk.org
>
> Signed-off-by: Khadem Ullah <14pwcse1224 at uetpeshawar.edu.pk>
Ok, the Windows #ifdef was confusing me then looked more closely.
This patch is adding a set of rings so that primary and secondary
can communicate, the adding one command.
The idea is good, but there is a better way to handle this.
There already exists a way for primary and secondary to communicate
through the mp service. This is used for hotplug and pdump and probably
other things as well.
The communication can be either way, for example I proposed patches
to pdump so that primary can tell secondary to participate.
https://patchwork.dpdk.org/project/dpdk/patch/20250814165307.12786-7-stephen@networkplumber.org/
This of testpmd can be done in similar way.
The handler in secondary should be able to act same as
when SIGINT is received. Set the flag f_exit which will cause the main
loop to exit.
This can then happen immediately, and the proc monitor alarm function
is only then needed to handle when primary process crashes.
More information about the dev
mailing list