Skip to content

pcapng: fixes for Windows and timestamps

Stephen Hemminger dpdk-dev 4 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 Latest posting 2/25 patches 3 repliesIn review
  2. v3 posting 1/24 patches 0 repliesSuperseded
  3. v24 patches 0 repliesSuperseded
Earlier versions · 1
VersionPostedPatchesRepliesStatus
v12 patches0 repliesSuperseded

Patches in v3 posting 2/2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/5test: fix pcapng test to work on Windowsapp/test/test_pcapng.c+61 -40 replies
2/5test: use fixed time length for write packet testapp/test/test_pcapng.c+20 -90 replies
3/5test: better logging for pcapng testapp/test/test_pcapng.c+27 -210 replies
4/5pcapng: handle packets copied before file openlib/pcapng/rte_pcapng.c+7 -32 replies
5/5test: add pcapng test for copy before openapp/test/test_pcapng.c+82 -00 replies

Reviews trailers per patch

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

Read the v3 thread

Cover letter [PATCH v3 0/5] pcapng: fixes for Windows and timestamps

Fix pcapng test and library issues:

The test did not build on Windows because it used POSIX-only APIs (clock_gettime, mkstemps, unlink). Add Windows wrappers and use portable alternatives where possible.

The test timing was tied to TSC frequency which could make it run excessively long on slow emulated platforms. Use a fixed time bound instead.

The test was mixing stdout and stderr making CI log analysis confusing. Consolidate on stdout and switch to UTC timestamps.

The library timestamp conversion produced bogus values if rte_pcapng_copy() was called before rte_pcapng_fdopen(), since the unsigned TSC delta wraps. Handle the case where the packet TSC precedes the clock baseline.

Add a regression test for the pre-open timestamp fix.

v3 - improve test log output

Stephen Hemminger (5):
test: fix pcapng test to work on Windows
test: use fixed time length for write packet test
test: better logging for pcapng test
pcapng: handle packets copied before file open
test: add pcapng test for copy before open

 app/test/test_pcapng.c  | 224 ++++++++++++++++++++++++++++++++++------
 lib/pcapng/rte_pcapng.c |  10 +-
 2 files changed, 197 insertions(+), 37 deletions(-)
Signature · 1 line
2.51.0