[dpdk-dev] [PATCH v2] net/pcap: support software Tx nanosecond timestamps
Ferruh Yigit
ferruh.yigit at intel.com
Wed Jun 10 15:42:27 CEST 2020
On 6/9/2020 8:07 PM, Vivien Didelot wrote:
> 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 at gmail.com>
Acked-by: Ferruh Yigit <ferruh.yigit at intel.com>
(Since there is a potential patch on top of this, I am merging this quickly)
Applied to dpdk-next-net/master, thanks.
More information about the dev
mailing list