Skip to content

net/pcap: bug fixes and new features

Stephen Hemminger dpdk-dev 22 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v25 Latest24 patches 1 replyIn review
  2. v24 posting 2/224 patches 0 repliesSuperseded
  3. v24 posting 1/210 of 24 patches 0 repliesSuperseded
Earlier versions · 19
VersionPostedPatchesRepliesStatus
v2324 patches0 repliesSuperseded
v2224 patches0 repliesSuperseded
v2125 patches0 repliesSuperseded
v2025 patches40 repliesSuperseded
v19 posting 2/225 patches0 repliesSuperseded
v19 posting 1/20 of 24 patches0 repliesSuperseded
v1823 patches2 repliesSuperseded
v1723 patches0 repliesSuperseded
v1621 patches0 repliesSuperseded
v1518 patches1 replySuperseded
v1418 patches0 repliesSuperseded
v1316 patches2 repliesSuperseded
v1219 patches0 repliesSuperseded
v1119 patches0 repliesSuperseded
v1019 patches0 repliesSuperseded
v915 patches0 repliesSuperseded
v814 patches0 repliesSuperseded
v713 patches0 repliesSuperseded
v613 patches0 repliesSuperseded

Patches in v25 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/24maintainers: update for pcap driverMAINTAINERS+1 -00 replies
2/24net/pcap: fix build on Windowsdrivers/net/pcap/pcap_osdep_windows.c+4 -40 replies
3/24doc: update features for PCAP PMDdoc/guides/nics/features/pcap.ini+7 -00 replies
4/24net/pcap: include used headersdrivers/net/pcap/pcap_ethdev.c drivers/net/pcap/pcap_osdep.h+9 -10 replies
5/24net/pcap: remove unnecessary castsdrivers/net/pcap/pcap_ethdev.c+6 -110 replies
6/24net/pcap: avoid using rte_malloc and rte_memcpydrivers/net/pcap/pcap_ethdev.c drivers/net/pcap/pcap_osdep_freebsd.c drivers/net/pcap/pcap_osdep_linux.c+10 -110 replies
7/24net/pcap: advertise Tx multi segmentdrivers/net/pcap/pcap_ethdev.c+1 -00 replies
8/24net/pcap: replace stack bounce bufferdrivers/net/pcap/pcap_ethdev.c+37 -230 replies
9/24net/pcap: fix error accounting and backpressure on transmitdrivers/net/pcap/pcap_ethdev.c+22 -120 replies
10/24net/pcap: clean up TX dumper return value and typesdrivers/net/pcap/pcap_ethdev.c+11 -100 replies
11/24net/pcap: add datapath debug loggingdrivers/net/pcap/pcap_ethdev.c drivers/net/pcap/pcap_osdep.h+15 -10 replies
12/24net/pcap: consolidate boolean flag handlingdrivers/net/pcap/pcap_ethdev.c+29 -380 replies
13/24net/pcap: support VLAN strip and insert offloadsdoc/guides/nics/features/pcap.ini doc/guides/nics/pcap.rst doc/guides/rel_notes/release_26_07.rst +1 more+132 -40 replies
14/24net/pcap: add link status for interface modedoc/guides/rel_notes/release_26_07.rst drivers/net/pcap/pcap_ethdev.c drivers/net/pcap/pcap_osdep.h +3 more+154 -230 replies
15/24net/pcap: support nanosecond timestamp precisiondoc/guides/nics/pcap.rst doc/guides/rel_notes/release_26_07.rst drivers/net/pcap/pcap_ethdev.c+130 -350 replies
16/24net/pcap: reject non-Ethernet interfacesdrivers/net/pcap/pcap_ethdev.c+11 -00 replies
17/24net/pcap: reduce scope of file-level variablesdrivers/net/pcap/pcap_ethdev.c+4 -20 replies
18/24net/pcap: clarify maximum received packetdrivers/net/pcap/pcap_ethdev.c+2 -10 replies
19/24eal/windows: add wrapper for access functionlib/eal/windows/include/rte_os_shim.h lib/eal/windows/include/unistd.h+8 -00 replies
20/24net/pcap: add snapshot length devargdoc/guides/nics/pcap.rst doc/guides/rel_notes/release_26_07.rst drivers/net/pcap/pcap_ethdev.c+154 -700 replies
21/24net/pcap: add Rx scatter offloaddrivers/net/pcap/pcap_ethdev.c+45 -20 replies
22/24net/pcap: add link status change support for iface modedoc/guides/nics/features/pcap.ini doc/guides/nics/pcap.rst doc/guides/rel_notes/release_26_07.rst +1 more+52 -00 replies
23/24net/pcap: add EOF notification via link status changedoc/guides/nics/pcap.rst doc/guides/rel_notes/release_26_07.rst drivers/net/pcap/pcap_ethdev.c+91 -30 replies
24/24test: add comprehensive test suite for pcap PMDapp/test/meson.build app/test/test_pmd_pcap.c doc/guides/rel_notes/release_26_07.rst+3455 -00 replies

Reviews trailers per patch

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

PatchBruce RichardsonChengwen FengDavid MarchandMarat Khalili
1/24A-b
2/24A-b A-b
3/24A-b
4/24A-b
5/24
6/24
7/24A-b
8/24A-b
9/24
10/24
11/24
12/24A-b
13/24
14/24
15/24
16/24
17/24A-b A-b
18/24A-b
19/24A-b
20/24A-b
21/24A-b
22/24
23/24
24/24

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 v25 thread

Cover letter [PATCH v25 00/24] net/pcap: bug fixes and new features

This series contains improvements to the PCAP PMD including new features, bug fixes, code cleanup, and a comprehensive test suite.

New features:
- Nanosecond precision timestamps (when libpcap supports it)
- VLAN tag support
- Link state reporting in interface mode
- Link status change (LSC) interrupt support in interface mode
- EOF notification via link status change for rx_pcap mode
- Advertise RTE_ETH_TX_OFFLOAD_MULTI_SEGS capability
- Configurable snapshot length via snaplen devarg
- Rx scatter offload support with mbuf pool validation

Bug fixes:
- Fix build on Windows from RTE_LOG_LINE changes.
- Fix multi-segment transmit to dynamically allocate instead of silently truncating packets larger than 9K stack buffer
- Fix Tx burst error handling: distinguish malformed mbufs (counted as errors) from pcap_sendpacket backpressure (break and retry)
- Reject non-Ethernet interfaces to prevent malformed packets and kernel warnings on FreeBSD/macOS loopback

Code cleanup:
- Convert internal flags from int to bool
- Remove unnecessary casts of void* from rte_zmalloc
- Replace rte_malloc/rte_memcpy with libc equivalents in osdep code
- Include headers explicitly rather than relying on indirect includes
- Reduce scope of file-level variables

Testing:
- Add comprehensive unit test suite
- Make test suite packet generator handle larger packets

v25 - fix build on one intermediate step for bisectability

v24 - fix format string warning in test code.

Stephen Hemminger (24):
maintainers: update for pcap driver
net/pcap: fix build on Windows
doc: update features for PCAP PMD
net/pcap: include used headers
net/pcap: remove unnecessary casts
net/pcap: avoid using rte_malloc and rte_memcpy net/pcap: advertise Tx multi segment
net/pcap: replace stack bounce buffer
net/pcap: fix error accounting and backpressure on transmit net/pcap: clean up TX dumper return value and types net/pcap: add datapath debug logging
net/pcap: consolidate boolean flag handling net/pcap: support VLAN strip and insert offloads net/pcap: add link status for interface mode net/pcap: support nanosecond timestamp precision net/pcap: reject non-Ethernet interfaces net/pcap: reduce scope of file-level variables net/pcap: clarify maximum received packet eal/windows: add wrapper for access function net/pcap: add snapshot length devarg
net/pcap: add Rx scatter offload
net/pcap: add link status change support for iface mode net/pcap: add EOF notification via link status change
test: add comprehensive test suite for pcap PMD

 MAINTAINERS                            |    1 +
 app/test/meson.build                   |    2 +
 app/test/test_pmd_pcap.c               | 3452 ++++++++++++++++++++++++
 doc/guides/nics/features/pcap.ini      |    9 +
 doc/guides/nics/pcap.rst               |   47 +
 doc/guides/rel_notes/release_26_07.rst |   12 +
 drivers/net/pcap/pcap_ethdev.c         |  859 ++++--
 drivers/net/pcap/pcap_osdep.h          |   27 +
 drivers/net/pcap/pcap_osdep_freebsd.c  |   43 +-
 drivers/net/pcap/pcap_osdep_linux.c    |   33 +-
 drivers/net/pcap/pcap_osdep_windows.c  |   76 +-
 lib/eal/windows/include/rte_os_shim.h  |    1 +
 lib/eal/windows/include/unistd.h       |    7 +
 13 files changed, 4354 insertions(+), 215 deletions(-)
 create mode 100644 app/test/test_pmd_pcap.c
Signature · 1 line
2.53.0