DPDK patches and discussions
 help / color / mirror / Atom feed
From: Shahaf Shuler <shahafs@mellanox.com>
To: Tom Barbette <barbette@kth.se>, "dev@dpdk.org" <dev@dpdk.org>
Cc: Yongseok Koh <yskoh@mellanox.com>,
	"john.mcnamara@intel.com" <john.mcnamara@intel.com>,
	"marko.kovacevic@intel.com" <marko.kovacevic@intel.com>
Subject: Re: [dpdk-dev] MLX5 should define the timestamp field in the doc
Date: Wed, 5 Sep 2018 05:29:55 +0000	[thread overview]
Message-ID: <DB7PR05MB4426AEBCAD72FFBBFF394B00C3020@DB7PR05MB4426.eurprd05.prod.outlook.com> (raw)
In-Reply-To: <1536071162684.44442@kth.se>

Hi Tom,

Tuesday, September 4, 2018 5:26 PM, Tom Barbette:
>

>Hi all,

>

>As far as I know, MLX5 is the only driver to support hardware timestamping.

>

>It would be great to update the doc to explain what the hardware timestamp is supposed to be.



We probably need to update the doc, but the current timestamp support is very basic. It just provide a raw timestamp from the NIC running clock. The granularity of each “tick” is undefined.

It is not yet the full IEEE1588 you seek to put all the events in the system on a single time axis.



>If it's nanoseconds, then just a shift regarding system time is enough ? Does it also need a >multiplication? Can we query that from hardware? Or provide a piece of code to be used. As it, the feature >is useless...



Unfortunately we lack the APIs to query the offset and multiplication factor from the device/kernel. This is why the current feature is very basic.

It can be used only to understand the order of the events at the NIC (for example if one packet passed the NIC before the other), however one cannot understand the absolute diff between 2 events in a common clock granularity.





>

>It would be interesting to normalize the hardware timestamping. I guess for any driver, an offset and a multiplication(shift+multiplier eventually) would be enough, and the API should be updated to >provide a function to convert a hardware timestamp to software (or that should be part of the driver and done automatically if offloading is enabled?) and probably one to initialize the time, much >like the Linux one at https://elixir.bootlin.com/linux/v4.18.5/source/drivers/net/ethernet/mellanox/mlx5/core/lib/clock.c#L488<https://emea01.safelinks.protection.outlook.com/?url=https%3A%2F%2Felixir.bootlin.com%2Flinux%2Fv4.18.5%2Fsource%2Fdrivers%2Fnet%2Fethernet%2Fmellanox%2Fmlx5%2Fcore%2Flib%2Fclock.c%23L488&data=02%7C01%7Cshahafs%40mellanox.com%7Ce1623f43e33c4c9e2a3308d612726753%7Ca652971c7d2e4d9ba6a4d149256f461b%7C0%7C0%7C636716679902892854&sdata=Xus3oma6Rig2AAxrBCUNgSvWx1NSYSbiFO0ei%2Bz0R40%3D&reserved=0> .



Of course, when we will have the APIs to support it, the PMD will do the conversion into the real clock units, no need for the application to do it by itself.



It will be interesting to me to completely understand your use case in order to evaluate the need and priority for such API.



>

>Thanks,

  reply	other threads:[~2018-09-05  5:29 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-09-04 14:26 Tom Barbette
2018-09-05  5:29 ` Shahaf Shuler [this message]
2018-09-05  7:11   ` Tom Barbette
2018-09-05  8:18     ` Shahaf Shuler
2018-09-05  9:00       ` Tom Barbette
2018-09-06  9:07         ` Shahaf Shuler
2018-09-06  9:33           ` Tom Barbette
2018-09-06 14:21             ` Shahaf Shuler

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=DB7PR05MB4426AEBCAD72FFBBFF394B00C3020@DB7PR05MB4426.eurprd05.prod.outlook.com \
    --to=shahafs@mellanox.com \
    --cc=barbette@kth.se \
    --cc=dev@dpdk.org \
    --cc=john.mcnamara@intel.com \
    --cc=marko.kovacevic@intel.com \
    --cc=yskoh@mellanox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).