[RFC 4/6] dumpcap: handle pdump requests from primary
Stephen Hemminger
stephen at networkplumber.org
Mon Aug 11 23:35:02 CEST 2025
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 at 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
More information about the dev
mailing list