Skip to content

pcapng: fixes and improvements

Stephen Hemminger dpdk-dev 6 versions – Applied

Status from this message: Applied, thanks.

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v8 Latest8 patches 2 repliesApplied
  2. v77 patches 3 repliesSuperseded
  3. v65 patches 0 repliesSuperseded
Earlier versions · 3
VersionPostedPatchesRepliesStatus
v55 patches0 repliesSuperseded
v47 patches0 repliesSuperseded
v37 patches0 repliesSuperseded

Changes in v8 from the cover letter

- Split patches for clarity (typo, Doxygen, validation, malloc)
- Preserve existing API/ABI — no error return changes
- Drop dumpcap patch (no API change to handle)
- Truncate overlong comments via strnlen on fast path
- Defer port_index update until after successful write

Patches in v8 Applied

#Subject and filesSizeRepliesApplied
1/8pcapng: correct typo in commentlib/pcapng/rte_pcapng.c+1 -10 replies
2/8pcapng: document return valueslib/pcapng/rte_pcapng.h+7 -20 replies
3/8pcapng: add length checks to string argumentsdoc/guides/rel_notes/release_26_03.rst lib/pcapng/rte_pcapng.c lib/pcapng/rte_pcapng.h+39 -61 reply
4/8pcapng: use malloc instead of fixed buffer sizelib/pcapng/rte_pcapng.c lib/pcapng/rte_pcapng.h+33 -180 replies
5/8pcapng: chain additional mbuf when comment exceeds tailroomlib/pcapng/rte_pcapng.c+20 -50 replies
6/8pcapng: improve performance of timestampinglib/pcapng/rte_pcapng.c+73 -240 replies
7/8test/pcapng: skip test if null driver missingapp/test/meson.build+1 -10 replies
8/8test/pcapng: add tests for commentsapp/test/test_pcapng.c+116 -380 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v8 yet.

Read the v8 thread

Cover letter [PATCH v8 0/8] pcapng: fixes and improvements

Fix string handling in the pcapng library and improve test coverage.

The pcapng format uses 16-bit length fields for option data, but the library did not validate input lengths and used fixed-size stack buffers that could overflow with large strings.

Patches 1-4 add string validation, dynamic allocation, and return value documentation. Existing return value conventions are preserved to avoid an ABI break.

Patch 5 chains an additional mbuf segment when a comment exceeds tailroom instead of dropping the packet.

Patch 6 replaces per-packet timestamp divisions with a precomputed reciprocal multiply-shift.

Patches 7-8 improve test coverage and fix the build dependency on the null PMD.

v8:
- Split patches for clarity (typo, Doxygen, validation, malloc)
- Preserve existing API/ABI — no error return changes
- Drop dumpcap patch (no API change to handle)
- Truncate overlong comments via strnlen on fast path
- Defer port_index update until after successful write

v7:
- Add meson build fix for disabled null PMD
- Add dumpcap error reporting improvements

Stephen Hemminger (8):
pcapng: correct typo in comment
pcapng: document return values
pcapng: add length checks to string arguments
pcapng: use malloc instead of fixed buffer size
pcapng: chain additional mbuf when comment exceeds tailroom
pcapng: improve performance of timestamping test/pcapng: skip test if null driver missing test/pcapng: add tests for comments

 app/test/meson.build                   |   2 +-
 app/test/test_pcapng.c                 | 154 +++++++++++++-----
 doc/guides/rel_notes/release_26_03.rst |   5 +
 lib/pcapng/rte_pcapng.c                | 207 +++++++++++++++++++------
 lib/pcapng/rte_pcapng.h                |  13 +-
 5 files changed, 288 insertions(+), 93 deletions(-)
Signature · 1 line
2.51.0