[PATCH 6/7] pcapng: add user-supplied timestamp support
Stephen Hemminger
stephen at networkplumber.org
Mon Jun 8 18:38:06 CEST 2026
On Wed, 29 Apr 2026 03:31:10 -0400
Dawid Wesierski <dawid.wesierski at intel.com> wrote:
> @@ -737,16 +736,6 @@ rte_pcapng_write_packets(rte_pcapng_t *self,
> return -1;
> }
>
> - /*
> - * When data is captured by pcapng_copy the current TSC is stored.
> - * Adjust the value recorded in file to PCAP epoch units.
> - */
> - cycles = (uint64_t)epb->timestamp_hi << 32;
> - cycles += epb->timestamp_lo;
> - timestamp = tsc_to_ns_epoch(&self->clock, cycles);
> - epb->timestamp_hi = timestamp >> 32;
> - epb->timestamp_lo = (uint32_t)timestamp;
> -
> /*
> * Handle case of highly fragmented and large burst size
> * Note: this assumes that max segments per mbuf < IOV_MAX
> diff --git a/lib/pcapng/rte_pcapng.h b/lib/pcapng/rte_pcapng.h
NAK
You need to keep the correct timestamp correction.
PCAPNG specifies times as nanoseconds since 1/1/1970.
Any new API needs a test as well.
More information about the dev
mailing list