linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Carolina Jubran <cjubran@nvidia.com>
To: Jakub Kicinski <kuba@kernel.org>
Cc: Tariq Toukan <tariqt@nvidia.com>,
	Eric Dumazet <edumazet@google.com>,
	Paolo Abeni <pabeni@redhat.com>,
	Andrew Lunn <andrew+netdev@lunn.ch>,
	"David S. Miller" <davem@davemloft.net>,
	Saeed Mahameed <saeedm@nvidia.com>,
	Leon Romanovsky <leon@kernel.org>, Mark Bloch <mbloch@nvidia.com>,
	Richard Cochran <richardcochran@gmail.com>,
	netdev@vger.kernel.org, linux-rdma@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH net-next 0/3] Support exposing raw cycle counters in PTP and mlx5
Date: Thu, 31 Jul 2025 22:03:02 +0300	[thread overview]
Message-ID: <c52004ea-16dd-4131-b58a-4a7f7c6be758@nvidia.com> (raw)
In-Reply-To: <20250729154012.5d540144@kernel.org>



On 30/07/2025 1:40, Jakub Kicinski wrote:
> On Tue, 29 Jul 2025 09:57:13 +0300 Carolina Jubran wrote:
>> One concrete use case is monitoring the frequency stability of the
>> device clock in FreeRunning mode. User space can periodically sample the
>> (cycle, time) pairs returned by the new ioctl to estimate the clock’s
>> frequency and detect anomalies, for example, drift caused by temperature
>> changes. This is especially useful in holdover scenarios.
> 
> Because the servo running on the host doesn't know the stability?
> Seems like your real use case is the one below.
> 
>> Another practical case is with DPDK. When the hardware is in FreeRunning
>> mode, the CQE contains raw cycle counter values. DPDK returns these
>> values directly to user space without converting them. The new ioctl
>> provides a generic and consistent way to translate those raw values to
>> host time.
>>
>> As for XDP, you’re right that it doesn’t expose raw cycles today. The
>> point here is more future-looking: if drivers ever choose to emit raw
>> cycles into metadata for performance, this API gives user space a clean
>> way to interpret those timestamps.
> 
> Got it, I can see how DPDK / kernel bypass may need this.
> 
> Please include this justification in the commit message for v2
> and let's see if anyone merges it.

Thanks, I’ll include the DPDK/kernel bypass justification clearly in the 
v2 commit message and cover letter.

Additionally, I wanted to mention another relevant use case that wasn’t 
brought up earlier: fwctl can expose event records tagged with raw cycle 
counter timestamps. When the device is in free-running mode, correlating 
those with host time becomes difficult unless user space has access to 
both cycle and system time snapshots.

  reply	other threads:[~2025-07-31 19:03 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-07-15  5:15 [PATCH net-next 0/3] Support exposing raw cycle counters in PTP and mlx5 Tariq Toukan
2025-07-15  5:15 ` [PATCH net-next 1/3] ptp: Add ioctl commands to expose raw cycle counter values Tariq Toukan
2025-07-15  5:15 ` [PATCH net-next 2/3] net/mlx5: Extract MTCTR register read logic into helper function Tariq Toukan
2025-07-15  5:15 ` [PATCH net-next 3/3] net/mlx5: Support getcyclesx and getcrosscycles Tariq Toukan
2025-07-17 10:55   ` Paolo Abeni
2025-07-17 15:56     ` Carolina Jubran
2025-07-18  9:09       ` Paolo Abeni
2025-07-18 23:29 ` [PATCH net-next 0/3] Support exposing raw cycle counters in PTP and mlx5 Jakub Kicinski
2025-07-21 17:14   ` Thomas Gleixner
2025-07-29 23:33   ` Jacob Keller
2025-07-31 19:05     ` Carolina Jubran
2025-07-22  0:09 ` Jakub Kicinski
2025-07-29  6:57   ` Carolina Jubran
2025-07-29 22:40     ` Jakub Kicinski
2025-07-31 19:03       ` Carolina Jubran [this message]
2025-08-01 20:23         ` Jakub Kicinski

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=c52004ea-16dd-4131-b58a-4a7f7c6be758@nvidia.com \
    --to=cjubran@nvidia.com \
    --cc=andrew+netdev@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=kuba@kernel.org \
    --cc=leon@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rdma@vger.kernel.org \
    --cc=mbloch@nvidia.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=richardcochran@gmail.com \
    --cc=saeedm@nvidia.com \
    --cc=tariqt@nvidia.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).