[dpdk-dev] [PATCH v2 2/2] net/octeontx2: support read clock API

Jerin Jacob Kollanukkaran jerinj at marvell.com
Sun Jul 28 09:43:55 CEST 2019


> -----Original Message-----
> From: Harman Kalra <hkalra at marvell.com>
> Sent: Sunday, July 28, 2019 2:11 AM
> To: Jerin Jacob Kollanukkaran <jerinj at marvell.com>; Nithin Kumar Dabilpuram
> <ndabilpuram at marvell.com>; Vamsi Krishna Attunuru
> <vattunuru at marvell.com>; Kiran Kumar Kokkilagadda
> <kirankumark at marvell.com>
> Cc: dev at dpdk.org; Harman Kalra <hkalra at marvell.com>
> Subject: [PATCH v2 2/2] net/octeontx2: support read clock API
> 
> 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 multipler (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 at marvell.com>
> ---
> V2:
> * More detailed commit message
> * changed rdtsc to tsc (timestamp counter)
> * Initialized a variable to zero only when needed
> * changed done label to fail
> 
>  drivers/common/octeontx2/otx2_mbox.h |  2 +
> drivers/net/octeontx2/otx2_ethdev.c  | 89 ++++++++++++++++++++++++++++

Move as much changes to otx2_ptp.c, rest it looks good to me.


More information about the dev mailing list