[v6,5/8] pdump: handle pdump requests from primary

Message ID 20251104180927.403355-6-stephen@networkplumber.org (mailing list archive)
State Accepted
Delegated to: Thomas Monjalon
Headers
Series packet capture bugfixes and secondary support |

Checks

Context Check Description
ci/checkpatch success coding style OK

Commit Message

Stephen Hemminger Nov. 4, 2025, 6:07 p.m. UTC
The primary process will start to notify all secondary processes
about pdump changes. The pdump secondary process can just call
rte_pdump_init() and it take care of that.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Khadem Ullah <14pwcse1224@uetpeshawar.edu.pk>
---
 app/pdump/main.c | 4 ++++
 1 file changed, 4 insertions(+)
  

Patch

diff --git a/app/pdump/main.c b/app/pdump/main.c
index 1741d7e709..626ba0ce93 100644
--- a/app/pdump/main.c
+++ b/app/pdump/main.c
@@ -552,6 +552,7 @@  cleanup_pdump_resources(void)
 		}
 
 	}
+	rte_pdump_uninit();
 	cleanup_rings();
 }
 
@@ -822,6 +823,9 @@  enable_pdump(void)
 	struct pdump_tuples *pt;
 	int ret = 0, ret1 = 0;
 
+	if (rte_pdump_init() < 0)
+		rte_exit(EXIT_FAILURE, "pdump init failed\n");
+
 	for (i = 0; i < num_tuples; i++) {
 		pt = &pdump_t[i];
 		if (pt->dir == RTE_PDUMP_FLAG_RXTX) {