| 16659193 | 17-Nov-2023 |
Stephen Hemminger <stephen@networkplumber.org> |
pcapng: modify timestamp calculation
The computation of timestamp is best done in the part of pcapng library that is in secondary process. The secondary process is already doing a bunch of system ca
pcapng: modify timestamp calculation
The computation of timestamp is best done in the part of pcapng library that is in secondary process. The secondary process is already doing a bunch of system calls which makes it not performance sensitive. This does change the rte_pcapng_copy() and rte_pcapng_write_stats() functions which were experimental before 23.11.
Simplify the computation of nanoseconds from TSC to a two step process which avoids numeric overflow issues. The previous code was not thread safe as well.
Fixes: c882eb544842 ("pcapng: fix timestamp wrapping in output files") Cc: stable@dpdk.org
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org> Acked-by: Morten Brørup <mb@smartsharesystems.com>
show more ...
|