[PATCH] libpcapng: fix timestamp wrapping in output files

Stephen Hemminger stephen at networkplumber.org
Mon May 16 15:26:06 CEST 2022


On Sat, 14 May 2022 18:14:48 +0100
Quentin Armitage <quentin at armitage.org.uk> wrote:

> The final statement of pcapng_tsc_to_ns() should be:
> 	return pcapng_time.ns + elapsed * TICK_SCALE;
> 
> There is also a problem that rte_get_tsc_hz() returns eal_tsc_resolution_hz, but
> this is not initialized until rte_eal_init() is called, so rte_get_tsc_hz()
> cannot be called from a constructor function.

Better to do initialization on first use then.
It would be safer than the contstructor.


More information about the stable mailing list