ethdev: add API to read device clock
authorTom Barbette <barbette@kth.se>
Thu, 2 May 2019 12:11:33 +0000 (14:11 +0200)
committerFerruh Yigit <ferruh.yigit@intel.com>
Thu, 6 Jun 2019 11:21:20 +0000 (20:21 +0900)
commit5e741377657c8fce28037e025ea2f12371400476
treec50c1f0422097d53a88a26d852a211973fbab4c8
parent6d84612124417acbe0bbb0b9952cf3270b3b3a0f
ethdev: add API to read device clock

Add rte_eth_read_clock to read the raw clock of a device.

The main use is to get the device clock conversion co-efficients to be
able to translate the raw clock of the timestamp field of the pkt mbuf
to a local synced time value.

This function was missing to allow users to convert the Rx timestamp
field to real time without the complexity of the rte_timesync* facility.
One can derivate the clock frequency by calling twice read_clock and
then keep a common time base.

Signed-off-by: Tom Barbette <barbette@kth.se>
Acked-by: Andrew Rybchenko <arybchenko@solarflare.com>
doc/guides/nics/features.rst
lib/librte_ethdev/rte_ethdev.c
lib/librte_ethdev/rte_ethdev.h
lib/librte_ethdev/rte_ethdev_core.h
lib/librte_ethdev/rte_ethdev_version.map
lib/librte_mbuf/rte_mbuf.h