From: Stephen Hemminger <stephen@networkplumber.org>
To: Khadem Ullah <14pwcse1224@uetpeshawar.edu.pk>
Cc: Aman Singh <aman.deep.singh@intel.com>,
Anatoly Burakov <anatoly.burakov@intel.com>,
Ajit Khaparde <ajit.khaparde@broadcom.com>,
Lijun Ou <oulijun@huawei.com>,
Ferruh Yigit <ferruh.yigit@amd.com>,
Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>,
dev@dpdk.org, stable@dpdk.org
Subject: Re: [PATCH v2] app/testpmd: stop secondary process fwd_lcores during primary teardown
Date: Thu, 11 Sep 2025 16:50:58 -0700 [thread overview]
Message-ID: <20250911165058.31fd0101@hermes.local> (raw)
In-Reply-To: <20250911102501.473167-1-14pwcse1224@uetpeshawar.edu.pk>
On Thu, 11 Sep 2025 03:25:01 -0700
Khadem Ullah <14pwcse1224@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@dpdk.org
>
> Signed-off-by: Khadem Ullah <14pwcse1224@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.
prev parent reply other threads:[~2025-09-11 23:51 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-09-10 11:02 [PATCH] " Khadem Ullah
2025-09-10 17:34 ` Stephen Hemminger
2025-09-10 18:16 ` Khadem Ullah
2025-09-11 10:25 ` [PATCH v2] " Khadem Ullah
2025-09-11 17:53 ` Stephen Hemminger
2025-09-11 18:51 ` Khadem Ullah
2025-09-11 19:00 ` Khadem Ullah
2025-09-11 19:23 ` Khadem Ullah
2025-09-11 23:50 ` Stephen Hemminger [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250911165058.31fd0101@hermes.local \
--to=stephen@networkplumber.org \
--cc=14pwcse1224@uetpeshawar.edu.pk \
--cc=ajit.khaparde@broadcom.com \
--cc=aman.deep.singh@intel.com \
--cc=anatoly.burakov@intel.com \
--cc=andrew.rybchenko@oktetlabs.ru \
--cc=dev@dpdk.org \
--cc=ferruh.yigit@amd.com \
--cc=oulijun@huawei.com \
--cc=stable@dpdk.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).