numam-dpdk/drivers/net/pcap
Vivien Didelot a7d42145cc net/pcap: support Tx nanosecond timestamps
When capturing packets into a PCAP file, DPDK currently uses
microseconds for the timestamps. But libpcap supports interpreting
tv_usec as nanoseconds depending on the file timestamp precision,
as of commit ba89e4a18e8b ("Make timestamps precision configurable").

To support this, use PCAP_TSTAMP_PRECISION_NANO when creating the
empty PCAP file as specified by PCAP_OPEN_DEAD(3PCAP) and implement
nanosecond timeval addition. This also ensures that the precision
reported by capinfos is nanoseconds (9).

Note that NSEC_PER_SEC is defined as 1000000000L instead of 1e9 since
the latter might be interpreted as floating point.

Signed-off-by: Vivien Didelot <vivien.didelot@gmail.com>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
2020-06-16 19:21:07 +02:00
..
Makefile build: remove individual library versions 2019-11-20 23:05:39 +01:00
meson.build port: fix pcap support with meson 2019-10-27 17:23:02 +01:00
rte_eth_pcap.c net/pcap: support Tx nanosecond timestamps 2020-06-16 19:21:07 +02:00
rte_pmd_pcap_version.map build: align symbols with global ABI version 2019-11-20 23:05:39 +01:00