net/octeontx2: support read clock
authorHarman Kalra <hkalra@marvell.com>
Sun, 28 Jul 2019 09:09:45 +0000 (09:09 +0000)
committerFerruh Yigit <ferruh.yigit@intel.com>
Mon, 29 Jul 2019 10:24:39 +0000 (12:24 +0200)
This patch implements read clock api whose purpose is to return
raw clock ticks. Using this API real time ticks spent in
processing a packet can be known:
    <read_clock val at any time> - mbuf->timestamp

Calling mbox for reading raw clock ticks in fastpath is very
expensive so its value is derived from time stamp counter(tsc)
using freq multiplier (ratio of raw clock ticks and tsc) and clock
delta (by how much tsc is lagging from raw clock value).

Signed-off-by: Harman Kalra <hkalra@marvell.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>

No differences found