On Wed, 29 Apr 2026 03:31:10 -0400 Dawid Wesierski <[email protected]> wrote:
> From: Marek Kasiewicz <[email protected]> > > Add rte_pcapng_copy_ts() which accepts an optional timestamp parameter > in nanoseconds. When the timestamp is non-zero, it is used directly > instead of reading the TSC. This allows applications to provide > hardware PTP timestamps from the NIC, enabling accurate packet capture > with PTP-domain timing rather than host-local TSC values. > > The existing rte_pcapng_copy() function is preserved as a static inline > wrapper that passes zero for backward compatibility. > > The TSC-to-epoch conversion in the write path is removed since callers > providing hardware timestamps have already performed the conversion. > > > Signed-off-by: Marek Kasiewicz <[email protected]> > Signed-off-by: Dawid Wesierski <[email protected]> Rather than having two functions, it would simpler to just use function versioning and add timestamp parameter. There is only one caller in the tree right now.

