From: Stephen Hemminger <stephen@networkplumber.org>
To: dev@dpdk.org
Cc: Stephen Hemminger <stephen@networkplumber.org>
Subject: [PATCH v3 0/4] Wireshark external capture
Date: Thu, 30 Jul 2026 11:22:53 -0700 [thread overview]
Message-ID: <20260730182455.502175-1-stephen@networkplumber.org> (raw)
In-Reply-To: <20260727224417.1419663-1-stephen@networkplumber.org>
This series adds live packet capture from a running DPDK primary over the
telemetry socket. A new capture library installs Rx/Tx callbacks on an
ethdev port and writes pcapng to a caller-supplied path or FIFO, with an
optional libpcap filter and per-queue selection.
Advantages of this:
- no primary/secondary needed; works on Linux and FreeBSD.
can also work on Windows with pcap support.
- installation is just putting script in Wireshark directory.
- script has no dependency on DPDK libraries; can be packaged with Wireshark.
- allows for live capture
- supports BPF (with JIT) for filtering
How it works:
- The capture library registers telemetry commands (/ethdev/capture/*)
- Callbacks are installed on the specified port/queues to copy packets
- Packets are formatted as pcapng and written to the specified output
- No packet data passes through the telemetry socket itself
The pcapng statistics interface has been extended to include the
filter-accepted packet count, which was previously missing.
Testing:
- Run: dpdk-wireshark-extcap.py --extcap-interfaces to list available ports
- The script should be installed in Wireshark's extcap directory for GUI integration
- Comprehensive unit tests are included in app/test/test_capture.c
- Tested on Linux and FreeBSD
v3 - fixed AI review feedback
Stephen Hemminger (4):
pcapng: extend interface statistics
capture: infrastructure wireshark packet capture
test: add test for capture hooks
usertools: add script for wireshark capture
MAINTAINERS | 4 +
app/dumpcap/main.c | 16 +-
app/test/meson.build | 1 +
app/test/test_capture.c | 660 +++++++++++++
app/test/test_pcapng.c | 10 +-
doc/guides/prog_guide/capture_lib.rst | 168 ++++
doc/guides/prog_guide/index.rst | 1 +
doc/guides/rel_notes/release_26_11.rst | 14 +
doc/guides/tools/index.rst | 1 +
doc/guides/tools/wireshark_extcap.rst | 144 +++
lib/capture/capture.c | 1202 ++++++++++++++++++++++++
lib/capture/capture_impl.h | 56 ++
lib/capture/filter.c | 110 +++
lib/capture/meson.build | 19 +
lib/meson.build | 1 +
lib/pcapng/rte_pcapng.c | 50 +-
lib/pcapng/rte_pcapng.h | 33 +-
usertools/dpdk-wireshark-extcap.py | 416 ++++++++
usertools/meson.build | 1 +
19 files changed, 2874 insertions(+), 33 deletions(-)
create mode 100644 app/test/test_capture.c
create mode 100644 doc/guides/prog_guide/capture_lib.rst
create mode 100644 doc/guides/tools/wireshark_extcap.rst
create mode 100644 lib/capture/capture.c
create mode 100644 lib/capture/capture_impl.h
create mode 100644 lib/capture/filter.c
create mode 100644 lib/capture/meson.build
create mode 100755 usertools/dpdk-wireshark-extcap.py
--
2.53.0
next prev parent reply other threads:[~2026-07-30 18:25 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-24 21:11 [PATCH v6 0/5] Wireshark external capture for DPDK Stephen Hemminger
2026-07-24 21:11 ` [PATCH 1/5] pcapng: extend interface statistics Stephen Hemminger
2026-07-24 21:11 ` [PATCH 2/5] capture: infrastructure wireshark packet capture Stephen Hemminger
2026-07-24 21:11 ` [PATCH 3/5] test: add test for capture hooks Stephen Hemminger
2026-07-24 21:11 ` [PATCH 4/5] usertools/dpdk-wireshark-extcap.py: script for external capture Stephen Hemminger
2026-07-24 21:11 ` [PATCH 5/5] usertools/dpdk-dumpcap: add script for file capture Stephen Hemminger
2026-07-27 22:42 ` [PATCH v2 0/4] Wireshark external capture interface Stephen Hemminger
2026-07-27 22:42 ` [PATCH v2 1/4] pcapng: extend interface statistics Stephen Hemminger
2026-07-27 22:42 ` [PATCH v2 2/4] capture: infrastructure wireshark packet capture Stephen Hemminger
2026-07-27 22:42 ` [PATCH v2 3/4] test: add test for capture hooks Stephen Hemminger
2026-07-27 22:42 ` [PATCH v2 4/4] usertools: add script for wireshark capture Stephen Hemminger
2026-07-29 23:28 ` Stephen Hemminger
2026-07-30 18:22 ` Stephen Hemminger [this message]
2026-07-30 18:22 ` [PATCH v3 1/4] pcapng: extend interface statistics Stephen Hemminger
2026-07-30 18:22 ` [PATCH v3 2/4] capture: infrastructure wireshark packet capture Stephen Hemminger
2026-07-30 18:22 ` [PATCH v3 3/4] test: add test for capture hooks Stephen Hemminger
2026-07-30 18:22 ` [PATCH v3 4/4] usertools: add script for wireshark capture 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=20260730182455.502175-1-stephen@networkplumber.org \
--to=stephen@networkplumber.org \
--cc=dev@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;
as well as URLs for NNTP newsgroup(s).