From: Ferruh Yigit <ferruh.yigit@intel.com>
To: Tom Barbette <barbette@kth.se>, dev@dpdk.org
Cc: bruce.richardson@intel.com, john.mcnamara@intel.com,
Thomas Monjalon <thomas@monjalon.net>,
Andrew Rybchenko <arybchenko@solarflare.com>,
Shahaf Shuler <shahafs@mellanox.com>,
Yongseok Koh <yskoh@mellanox.com>,
olivier.matz@6wind.com
Subject: Re: [dpdk-dev] [PATCH v4 0/3] Add rte_eth_read_clock API
Date: Fri, 31 May 2019 08:46:27 +0100 [thread overview]
Message-ID: <06a590d0-e0bf-53d2-7b40-94f55ea1f141@intel.com> (raw)
In-Reply-To: <20190502121135.18775-1-barbette@kth.se>
On 5/2/2019 1:11 PM, Tom Barbette wrote:
> Some NICs allow to timestamp packets, but do not support the full
> PTP synchronization process. Hence, the value set in the mbuf
> timestamp field is only the raw value of an internal clock.
>
> To make sense of this value, one at least needs to be able to query
> the current hardware clock value. This patch series adds a new API to do
> so, rte_eth_read_clock. As with the TSC, from there
> a frequency can be derieved by querying multiple time the current value of the
> internal clock with some known delay between the queries (example
> provided in the API doc).
>
> This patch series adds support of read_clock for MLX5.
>
> An example app is provided in the rxtx_callback application.
> It has been updated to display, on top of the software latency
> in cycles, the total latency since the packet was received in hardware.
> The API is used to compute a delta in the Tx callback. The raw amount of
> ticks is converted to cycles using a variation of the technique describe above.
>
> Aside from offloading timestamping, which relieve the
> software from a few operations, this allows to get much more precision
> when studying the source of the latency in a system.
> Eg. in our 100G, CX5 setup the rxtx callback application shows
> SW latency is around 74 cycles (TSC is 3.2Ghz), but the latency
> including NIC processing, PCIe, and queuing is around 196 cycles.
>
> One may think at first this API is overlapping with te_eth_timesync_read_time.
> rte_eth_timesync_read_time is clearly identified as part of a set of functions
> to use PTP synchronization.
> The device raw clock is not "sync" in any way. More importantly, the returned
> value is not a timeval, but an amount of ticks. We could have a cast-based
> solution, but on top of being an ugly solution, some people seeing the timeval
> type of rte_eth_timesync_read_time could use it blindly.
>
> Change in v2:
> - Rebase on current master
>
> Change in v3:
> - Address comments from Ferruh Yigit
>
> Changes in v4:
> - Address comments from Keith Wiles and Andrew Rybchenko
> - Use "clock" as argunment name everywhere.
> - Expand the API description to make clear that read_clock gives an
> amount in ticks, and that it has no unit.
>
> Tom Barbette (3):
> rte_ethdev: Add API function to read dev clock
> mlx5: Implement support for read_clock
> rxtx_callbacks: Add support for HW timestamp
Series applied to dpdk-next-net/master, thanks.
prev parent reply other threads:[~2019-05-31 7:46 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-05-02 12:11 Tom Barbette
2019-05-02 12:11 ` Tom Barbette
2019-05-02 12:11 ` [dpdk-dev] [PATCH v4 1/3] rte_ethdev: Add API function to read dev clock Tom Barbette
2019-05-02 12:11 ` Tom Barbette
2019-05-08 7:54 ` Andrew Rybchenko
2019-05-08 7:54 ` Andrew Rybchenko
2019-06-04 13:57 ` Ferruh Yigit
2019-05-02 12:11 ` [dpdk-dev] [PATCH v4 2/3] mlx5: Implement support for read_clock Tom Barbette
2019-05-02 12:11 ` Tom Barbette
2019-05-02 12:11 ` [dpdk-dev] [PATCH v4 3/3] rxtx_callbacks: Add support for HW timestamp Tom Barbette
2019-05-02 12:11 ` Tom Barbette
2019-05-31 7:46 ` Ferruh Yigit
2019-06-13 5:55 ` Thomas Monjalon
2019-05-08 7:49 ` [dpdk-dev] [PATCH v4 0/3] Add rte_eth_read_clock API Tom Barbette
2019-05-08 7:49 ` Tom Barbette
2019-05-31 7:46 ` Ferruh Yigit [this message]
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=06a590d0-e0bf-53d2-7b40-94f55ea1f141@intel.com \
--to=ferruh.yigit@intel.com \
--cc=arybchenko@solarflare.com \
--cc=barbette@kth.se \
--cc=bruce.richardson@intel.com \
--cc=dev@dpdk.org \
--cc=john.mcnamara@intel.com \
--cc=olivier.matz@6wind.com \
--cc=shahafs@mellanox.com \
--cc=thomas@monjalon.net \
--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).