[PATCH v4 00/11] PCAP PMD improvements

Stephen Hemminger
2026-01-17T22:00:39Z

This series improves the PCAP PMD with new features, better code quality,
and a comprehensive test suite.

Changes:
- Update feature matrix to reflect actual capabilities
- Replace unnecessary rte_malloc/rte_memcpy with standard libc
- Fix multi-segment transmit handling (was using 9KB stack buffer)
- Add MTU setting support for single interface mode
- Convert integer flags to bool for type safety
- Add VLAN strip (RX) and insert (TX) offload support
- Support nanosecond timestamp precision
- Localize global variables where possible
- Remove unnecessary volatile from statistics
- Add comprehensive unit test suite (18 test cases)
- Add release notes

The VLAN and timestamp offloads follow the same patterns used by
virtio and af_packet PMDs.

The test suite covers basic TX/RX, varied packet sizes, jumbo frames,
infinite RX mode, statistics, MTU configuration, timestamps, multi-queue
operation, and VLAN offloads.

v4:
- Rebase on current main
- Add VLAN strip
- Add release note
- better multi-segment handling

Stephen Hemminger (11):
doc: update features for PCAP PMD
net/pcap: avoid using rte_malloc and rte_memcpy
net/pcap: cleanup transmit of multi segment
net/pcap: support setting MTU
net/pcap: use bool for flags
net/pcap: support VLAN offloads
net/pcap: support nanosecond timestamp precision
net/pcap: remove global variables
net/pcap: avoid use of volatile
test: add test for pcap PMD
net/pcap: add release note

app/test/meson.build | 2 +
app/test/test_pmd_pcap.c | 2263 ++++++++++++++++++++++++
doc/guides/nics/features/pcap.ini | 10 +
doc/guides/rel_notes/release_26_03.rst | 7 +
drivers/net/pcap/pcap_ethdev.c | 376 ++--
drivers/net/pcap/pcap_osdep.h | 1 +
drivers/net/pcap/pcap_osdep_freebsd.c | 37 +-
drivers/net/pcap/pcap_osdep_linux.c | 21 +
drivers/net/pcap/pcap_osdep_windows.c | 6 +
9 files changed, 2586 insertions(+), 137 deletions(-)
create mode 100644 app/test/test_pmd_pcap.c

--
2.51.0