[dpdk-dev] [PATCH 1/3] rte_ethdev: Add API function to read dev clock

Yigit, Ferruh ferruh.yigit at linux.intel.com
Tue Mar 19 14:32:56 CET 2019


On 1/8/2019 11:30 AM, Tom Barbette wrote:
> Ferruh Yigit wrote:
>> Why timestamp offloading become useless? When timestamp offloading enabled,
>> device fills 'mbuf.timestamp' and you can use it.
> But the frequency is unknown, and the reference time neither. So it can be used only to know that "some time passed" between packets.
> 
>> For your case this timestamp for mlx is device clock and you are adding this API
>> to be able to convert device clock to real time, this is not something enables
>> the timestamp offload.
> I get your point, but a keyboard is highly required to use a computer. It's pretty much useless without it. Without this API, the timestamp offload makes no sense. It's a random number generator at best...
> 
>> Technically driver can set the 'mbuf.timestamp' with the real clock right, if it
>> is required? Or this can be defined by a devarg?
> I don't think so. Device have no sense of system time. And doing it in the driver is tricky because it depends on the user needs. Catch-up with NTP updates would need a timer and various parameters... Hence we prefer to give a simple working code, and users may do this if they want.
> 
> 
> For the other comments it's not my call... I would just underline that timestamp offload is not usable in the current state, and there is a lot of use case for monitoring latency-sensitive applications.

Hi Thomas, Andrew,

CAn you please comment on patch, it adds a new 'rte_eth_read_clock()' API to
read device clock to read timestamp value, later to use this value to map to the
actual time.
So that can convert timestamp information from each packet into real time.

My question was if this is common requirement or specific to single device? And
if can be handles in driver level.

Thanks,
ferruh


More information about the dev mailing list