DPDK patches and discussions
 help / color / mirror / Atom feed
From: Stephen Hemminger <stephen@networkplumber.org>
To: dev@dpdk.org
Cc: Stephen Hemminger <stephen@networkplumber.org>,
	Reshma Pattan <reshma.pattan@intel.com>,
	Bruce Richardson <bruce.richardson@intel.com>,
	Khadem Ullah <14pwcse1224@uetpeshawar.edu.pk>
Subject: [PATCH 2/2] pdump: fix race in pdump disabling
Date: Wed, 12 Nov 2025 12:05:10 -0800	[thread overview]
Message-ID: <20251112200510.332651-2-stephen@networkplumber.org> (raw)
In-Reply-To: <20251112200510.332651-1-stephen@networkplumber.org>

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@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


      reply	other threads:[~2025-11-12 20:05 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-11-12 20:05 [PATCH 1/2] pdump: avoid integer issues Stephen Hemminger
2025-11-12 20:05 ` 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=20251112200510.332651-2-stephen@networkplumber.org \
    --to=stephen@networkplumber.org \
    --cc=14pwcse1224@uetpeshawar.edu.pk \
    --cc=bruce.richardson@intel.com \
    --cc=dev@dpdk.org \
    --cc=reshma.pattan@intel.com \
    /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).