From: Stephen Hemminger <stephen@networkplumber.org>
To: dev@dpdk.org
Cc: Stephen Hemminger <stephen@networkplumber.org>, stable@dpdk.org
Subject: [PATCH v2 6/6] app/dumpcap: disable capture on the interface that failed
Date: Fri, 27 Nov 2026 13:07:08 -0800 [thread overview]
Message-ID: <20261127210806.318387-7-stephen@networkplumber.org> (raw)
In-Reply-To: <20261127210806.318387-1-stephen@networkplumber.org>
The unwind after a failed enable stopped at the interface that
failed, so callbacks installed before the failure kept referencing
the ring after dumpcap freed it.
Disable that interface as well. Promiscuous mode is left alone
since it is only set after a successful enable.
Fixes: cbb44143be74 ("app/dumpcap: add new packet capture application")
Cc: stable@dpdk.org
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
app/dumpcap/main.c | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
diff --git a/app/dumpcap/main.c b/app/dumpcap/main.c
index 47483535fc..5ae85cbdb2 100644
--- a/app/dumpcap/main.c
+++ b/app/dumpcap/main.c
@@ -852,12 +852,16 @@ static void enable_pdump(struct rte_ring *r, struct rte_mempool *mp)
if (ret < 0) {
const struct interface *intf2;
- /* unwind any previous enables */
+ /*
+ * Unwind this interface too, enable can fail after
+ * installing some callbacks. Promiscuous mode is
+ * not set on it yet.
+ */
TAILQ_FOREACH(intf2, &interfaces, next) {
- if (intf == intf2)
- break;
rte_pdump_disable(intf2->port,
RTE_PDUMP_ALL_QUEUES, RTE_PDUMP_FLAG_RXTX);
+ if (intf2 == intf)
+ break;
if (intf2->opts.promisc_mode)
rte_eth_promiscuous_disable(intf2->port);
}
--
2.53.0
next prev parent reply other threads:[~2026-11-27 21:08 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-28 14:16 [PATCH 0/4] pdump: fix capture on ports with hairpin queues Stephen Hemminger
2026-10-28 14:16 ` [PATCH 1/4] ethdev: reject hairpin queue in add first Rx callback Stephen Hemminger
2026-10-28 14:16 ` [PATCH 2/4] pdump: fix error code when adding callback fails Stephen Hemminger
2026-10-28 14:16 ` [PATCH 3/4] pdump: skip hairpin queues Stephen Hemminger
2026-10-28 14:16 ` [PATCH 4/4] pdump: undo partial enable on failure Stephen Hemminger
2026-11-27 21:07 ` [PATCH v2 0/6] pdump: fix bugs related to hairpin queues Stephen Hemminger
2026-11-27 21:07 ` [PATCH v2 1/6] ethdev: reject hairpin queue in add first Rx callback Stephen Hemminger
2026-11-27 21:07 ` [PATCH v2 2/6] pdump: fix error code when adding callback fails Stephen Hemminger
2026-11-27 21:07 ` [PATCH v2 3/6] pdump: validate queues before installing callbacks Stephen Hemminger
2026-11-27 21:07 ` [PATCH v2 4/6] pdump: release BPF filter on error Stephen Hemminger
2026-11-27 21:07 ` [PATCH v2 5/6] pdump: report secondary process failures Stephen Hemminger
2026-11-27 21:07 ` Stephen Hemminger [this message]
2026-12-01 19:31 ` [PATCH v3 0/8] pdump: fix error handling on failed enable Stephen Hemminger
2026-12-01 19:31 ` [PATCH v3 1/8] ethdev: reject hairpin queue in add first Rx callback Stephen Hemminger
2026-12-01 19:31 ` [PATCH v3 2/8] pdump: fix error code when adding callback fails Stephen Hemminger
2026-12-01 19:31 ` [PATCH v3 3/8] pdump: validate queues before installing callbacks Stephen Hemminger
2026-12-01 19:31 ` [PATCH v3 4/8] pdump: release BPF filter on error Stephen Hemminger
2026-12-01 19:31 ` [PATCH v3 5/8] eal: fix IPC request when no handler is registered Stephen Hemminger
2026-12-01 19:31 ` [PATCH v3 6/8] test/mp: check request with no registered handler Stephen Hemminger
2026-12-01 19:31 ` [PATCH v3 7/8] pdump: report secondary process failures Stephen Hemminger
2026-12-01 19:31 ` [PATCH v3 8/8] test/pdump: check secondary process result 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=20261127210806.318387-7-stephen@networkplumber.org \
--to=stephen@networkplumber.org \
--cc=dev@dpdk.org \
--cc=stable@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