From: Stephen Hemminger <stephen@networkplumber.org>
To: dev@dpdk.org
Cc: Stephen Hemminger <stephen@networkplumber.org>
Subject: [RFC 4/6] dumpcap: handle pdump requests from primary
Date: Mon, 11 Aug 2025 14:35:02 -0700 [thread overview]
Message-ID: <20250811213632.16023-5-stephen@networkplumber.org> (raw)
In-Reply-To: <20250811213632.16023-1-stephen@networkplumber.org>
The primary process will start to notify all secondary processes
about pdump changes. The dumpcap secondary process can just call
rte_pdump_init() and it take care of that.
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
app/dumpcap/main.c | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/app/dumpcap/main.c b/app/dumpcap/main.c
index 7b19c830b5..c734fc7b9d 100644
--- a/app/dumpcap/main.c
+++ b/app/dumpcap/main.c
@@ -528,6 +528,8 @@ cleanup_pdump_resources(void)
if (intf->opts.promisc_mode)
rte_eth_promiscuous_disable(intf->port);
}
+
+ rte_pdump_uninit();
}
/* Alarm signal handler, used to check that primary process */
@@ -659,6 +661,14 @@ static void dpdk_init(void)
if (rte_eal_init(eal_argc, eal_argv) < 0)
rte_exit(EXIT_FAILURE, "EAL init failed: is primary process running?\n");
+ /*
+ * Register pdump callback handler.
+ * Primary will notify all secondary processes of change.
+ * No impact for this application, but need to reply.
+ */
+ if (rte_pdump_init() < 0)
+ rte_exit(EXIT_FAILURE, "EAL pdump init failed\n");
+
/*
* If no lcore argument was specified, then run this program as a normal process
* which can be scheduled on any non-isolated CPU.
--
2.47.2
next prev parent reply other threads:[~2025-08-11 21:37 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-08-11 21:34 [RFC 0/6] Packet capture fixes Stephen Hemminger
2025-08-11 21:34 ` [RFC 1/6] dumpcap: handle primary process exit Stephen Hemminger
2025-08-11 21:35 ` [RFC 2/6] pdump: " Stephen Hemminger
2025-08-11 21:35 ` [RFC 3/6] pdump: fix races in callbacks Stephen Hemminger
2025-08-11 21:35 ` Stephen Hemminger [this message]
2025-08-11 21:35 ` [RFC 5/6] pdump: handle pdump requests from primary Stephen Hemminger
2025-08-11 21:35 ` [RFC 6/6] pdump: forward callback enable to secondary Stephen Hemminger
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=20250811213632.16023-5-stephen@networkplumber.org \
--to=stephen@networkplumber.org \
--cc=dev@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).