Skip to content

Packet capture framework update

Stephen Hemminger dpdk-dev 15 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v15 Latest12 patches 15 repliesIn review
  2. v1412 patches 3 repliesSuperseded
  3. v1312 patches 0 repliesSuperseded
Earlier versions · 12
VersionPostedPatchesRepliesStatus
v1212 patches15 repliesSuperseded
v1112 patches0 repliesSuperseded
v1012 patches5 repliesSuperseded
v912 patches1 replySuperseded
v812 patches9 repliesSuperseded
v711 patches0 repliesSuperseded
v610 patches2 repliesSuperseded
v59 patches0 repliesSuperseded
v48 patches0 repliesSuperseded
v38 patches0 repliesSuperseded
v25 patches0 repliesSuperseded
v15 patches1 replySuperseded

v10 from the cover letter

- fix to rte_bpf_dump to handle more instructions make sure all bpf_test cases are decoded

Patches in v15 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/12lib: pdump is not supported on Windowslib/meson.build+0 -10 replies
2/12librte_pcapng: add new library for writing pcapng fileslib/meson.build lib/pcapng/meson.build lib/pcapng/pcapng_proto.h +3 more+952 -010 replies
3/12bpf: allow self-xor operationlib/bpf/bpf_validate.c+8 -10 replies
4/12bpf: add function to convert classic BPF to DPDK BPFlib/bpf/bpf_convert.c lib/bpf/meson.build lib/bpf/rte_bpf.h +1 more+611 -01 reply
5/12bpf: add function to dump eBPF instructionslib/bpf/bpf_dump.c lib/bpf/meson.build lib/bpf/rte_bpf.h +1 more+155 -01 reply
6/12pdump: support pcapng and filteringlib/meson.build lib/pdump/meson.build lib/pdump/rte_pdump.c +2 more+433 -1263 replies
7/12app/dumpcap: add new packet capture applicationapp/dumpcap/main.c app/dumpcap/meson.build app/meson.build+861 -00 replies
8/12test: add test for bpf_convertapp/test/test_bpf.c+200 -00 replies
9/12test: add a test for pcapng libraryapp/test/meson.build app/test/test_pcapng.c+276 -00 replies
10/12test: enable bpf autotestapp/test/meson.build+2 -00 replies
11/12doc: changes for new pcapng and dumpcap utilitydoc/api/doxy-api-index.md doc/api/doxy-api.conf.in doc/guides/howto/img/packet_capture_framework.svg +7 more+251 -880 replies
12/12MAINTAINERS: add entry for new packet capture featuresMAINTAINERS+8 -31 reply

Reviews trailers per patch

8 of 12 patches have a Reviewed-by or Acked-by.

PatchDmitry KozlyukReshma PattanKonstantin AnanyevRay Kinsella
1/12A-b
2/12A-b A-b
3/12A-b
4/12A-b A-b
5/12A-b A-b
6/12A-b A-b
7/12
8/12
9/12
10/12A-b
11/12A-b
12/12

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 4 reviewers.

Read the v15 thread

Cover letter [dpdk-dev] [PATCH v15 00/12] Packet capture framework update

This patch set is a more complete version of the the enhanced packet capture support described last year.

The new capture library and utility are:
- faster avoids lots of extra I/O, does bursting, etc.
- gives more information (multiple ports, queues, etc)
- has a better user interface (same as Wireshark dumpcap)
- fixes structural problems with VLAN's and timestamps

There are no blocker items.
The following are worth noting:
* bogus checkpatch warnings
- the correct flag to open is O_CREAT
- intentionally keeping macro with goto since that was in original code and is clearer
- the tempfile name can not be const since it is overwritten by tmpfile() call

v15
- fix minor spelling in doc
make sure CI tests are rerun after test/bpf fix

v14
- fix checkpatch whitespace warning
- enhance the pcapng prog guide documentation

v13
- integrate feedback in documentation and pcapng library
- rebase to align with rte_ether_addr changes

v12
- fixes for capture offloaded VLAN tags. look at direction flag and handle QinQ offload.

v11
- address review comments for pdump (patch 6)

v10:
- fix to rte_bpf_dump to handle more instructions make sure all bpf_test cases are decoded

v9:
- incorporate suggested change to BPF XOR
- make autotest for pcapng more complete by reading the resulting file with libpcap

v8:
- enable BPF tests in autotest
- add more BPF test strings
- use rte_strscpy to satisfy checkpatch
- merge MAINTAINERS (put this in with existing pdump)

v7:
- add functional tests for pcapng lib
- bug fix for error returns in pcapng lib
- handle long osname on FreeBSD
- resolve almost all checkpatch issues

v5:
- minor build and checkpatch fixes for RHEL/FreeBSD
- disable lib/pdump on Windows. It was not useful before and now pdump depends on bpf.

v4:
- minor checkpatch fixes.
Note: some of the checkpatch warnings are bogus and won't be fixed.
- fix build of dumpcap on FreeBSD

v3:
- introduce packet filters using classic BPF to eBPF converter required small fix to DPDK BPF interpreter
- introduce function to decode eBPF instructions
- add option to dumpcap to show both classic BPF and eBPF result
- drop some un-useful stubs
- minor checkpatch warning cleanup

v2:
fix formatting of packet blocks
fix the new packet capture statistics
fix crash when primary process exits
record start/end time
various whitespace/checkpatch warnings

Stephen Hemminger (12):
lib: pdump is not supported on Windows
librte_pcapng: add new library for writing pcapng files
bpf: allow self-xor operation
bpf: add function to convert classic BPF to DPDK BPF
bpf: add function to dump eBPF instructions
pdump: support pcapng and filtering app/dumpcap: add new packet capture application
test: add test for bpf_convert
test: add a test for pcapng library
test: enable bpf autotest
doc: changes for new pcapng and dumpcap utility
MAINTAINERS: add entry for new packet capture features

 MAINTAINERS                                   |  11 +-
 app/dumpcap/main.c                            | 844 ++++++++++++++++++
 app/dumpcap/meson.build                       |  16 +
 app/meson.build                               |   1 +
 app/test/meson.build                          |   6 +
 app/test/test_bpf.c                           | 200 +++++
 app/test/test_pcapng.c                        | 272 ++++++
 doc/api/doxy-api-index.md                     |   1 +
 doc/api/doxy-api.conf.in                      |   1 +
 .../howto/img/packet_capture_framework.svg    |  96 +-
 doc/guides/howto/packet_capture_framework.rst |  69 +-
 doc/guides/prog_guide/index.rst               |   1 +
 doc/guides/prog_guide/pcapng_lib.rst          |  46 +
 doc/guides/prog_guide/pdump_lib.rst           |  28 +-
 doc/guides/rel_notes/release_21_11.rst        |  10 +
 doc/guides/tools/dumpcap.rst                  |  86 ++
 doc/guides/tools/index.rst                    |   1 +
 lib/bpf/bpf_convert.c                         | 575 ++++++++++++
 lib/bpf/bpf_dump.c                            | 139 +++
 lib/bpf/bpf_validate.c                        |   9 +-
 lib/bpf/meson.build                           |   6 +
 lib/bpf/rte_bpf.h                             |  39 +
 lib/bpf/version.map                           |   7 +
 lib/meson.build                               |   6 +-
 lib/pcapng/meson.build                        |   8 +
 lib/pcapng/pcapng_proto.h                     | 129 +++
 lib/pcapng/rte_pcapng.c                       | 607 +++++++++++++
 lib/pcapng/rte_pcapng.h                       | 195 ++++
 lib/pcapng/version.map                        |  12 +
 lib/pdump/meson.build                         |   2 +-
 lib/pdump/rte_pdump.c                         | 432 ++++++---
 lib/pdump/rte_pdump.h                         | 113 ++-
 lib/pdump/version.map                         |   8 +
 33 files changed, 3757 insertions(+), 219 deletions(-)
 create mode 100644 app/dumpcap/main.c
 create mode 100644 app/dumpcap/meson.build
 create mode 100644 app/test/test_pcapng.c
 create mode 100644 doc/guides/prog_guide/pcapng_lib.rst
 create mode 100644 doc/guides/tools/dumpcap.rst
 create mode 100644 lib/bpf/bpf_convert.c
 create mode 100644 lib/bpf/bpf_dump.c
 create mode 100644 lib/pcapng/meson.build
 create mode 100644 lib/pcapng/pcapng_proto.h
 create mode 100644 lib/pcapng/rte_pcapng.c
 create mode 100644 lib/pcapng/rte_pcapng.h
 create mode 100644 lib/pcapng/version.map
Signature · 1 line
2.30.2