[PATCH 2/2] pdump: fix race in pdump disabling
Stephen Hemminger
stephen at networkplumber.org
Wed Nov 12 21:05:10 CET 2025
There is a race where the request to disable pdump may get ahead
of the handling of pdump requests in dumpcap. The fix is to do
local removal of callbacks before forwarding same to secondary.
To reproduce:
1. Start testpmd and start traffic
2. Start dumpcap to capture
3. Interrupt dumpcap with ^C
Testpmd will show missing response and dumpcap will show error:
EAL: Cannot find action: mp_pdump
Only reproducible if additional logging not enabled.
Fixes: c3ceb8742295 ("pdump: forward callback enable to secondary process")
Signed-off-by: Stephen Hemminger <stephen at networkplumber.org>
---
lib/pdump/rte_pdump.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/pdump/rte_pdump.c b/lib/pdump/rte_pdump.c
index c3d0ffa779..ac94efe7ff 100644
--- a/lib/pdump/rte_pdump.c
+++ b/lib/pdump/rte_pdump.c
@@ -576,12 +576,12 @@ __pdump_request(void *param)
PDUMP_LOG_LINE(DEBUG, "primary pdump %s", pdump_opname(req->op));
ret = set_pdump_rxtx_cbs(req);
- ret = pdump_send_response(req, ret, bundle->peer);
/* Primary process is responsible for broadcasting request to all secondaries */
if (ret == 0)
pdump_request_to_secondary(req);
+ pdump_send_response(req, ret, bundle->peer);
free(bundle);
}
--
2.51.0
More information about the dev
mailing list