From: Paolo Abeni <pabeni@redhat.com>
To: Mahesh Bandewar <maheshb@google.com>,
Netdev <netdev@vger.kernel.org>,
Linux <linux-kernel@vger.kernel.org>,
David Miller <davem@davemloft.net>,
Jakub Kicinski <kuba@kernel.org>,
Eric Dumazet <edumazet@google.com>,
Thomas Gleixner <tglx@linutronix.de>,
Richard Cochran <richardcochran@gmail.com>,
Arnd Bergmann <arnd@arndb.de>,
Sagi Maimon <maimon.sagi@gmail.com>
Cc: Jonathan Corbet <corbet@lwn.net>,
John Stultz <jstultz@google.com>,
Mahesh Bandewar <mahesh@bandewar.net>
Subject: Re: [PATCHv4 net-next] ptp/ioctl: support MONOTONIC_RAW timestamps for PTP_SYS_OFFSET_EXTENDED
Date: Tue, 07 May 2024 10:42:35 +0200 [thread overview]
Message-ID: <bbd6a75b644bf11b82af7fa25a47e4fa20630958.camel@redhat.com> (raw)
In-Reply-To: <20240502211047.2240237-1-maheshb@google.com>
On Thu, 2024-05-02 at 14:10 -0700, Mahesh Bandewar wrote:
> The ability to read the PHC (Physical Hardware Clock) alongside
> multiple system clocks is currently dependent on the specific
> hardware architecture. This limitation restricts the use of
> PTP_SYS_OFFSET_PRECISE to certain hardware configurations.
>
> The generic soultion which would work across all architectures
> is to read the PHC along with the latency to perform PHC-read as
> offered by PTP_SYS_OFFSET_EXTENDED which provides pre and post
> timestamps. However, these timestamps are currently limited
> to the CLOCK_REALTIME timebase. Since CLOCK_REALTIME is affected
> by NTP (or similar time synchronization services), it can
> experience significant jumps forward or backward. This hinders
> the precise latency measurements that PTP_SYS_OFFSET_EXTENDED
> is designed to provide.
>
> This problem could be addressed by supporting MONOTONIC_RAW
> timestamps within PTP_SYS_OFFSET_EXTENDED. Unlike CLOCK_REALTIME
> or CLOCK_MONOTONIC, the MONOTONIC_RAW timebase is unaffected
> by NTP adjustments.
>
> This enhancement can be implemented by utilizing one of the three
> reserved words within the PTP_SYS_OFFSET_EXTENDED struct to pass
> the clock-id for timestamps. The current behavior aligns with
> clock-id for CLOCK_REALTIME timebase (value of 0), ensuring
> backward compatibility of the UAPI.
>
> Signed-off-by: Mahesh Bandewar <maheshb@google.com>
LGTM, but let's wait a bit for Richard ack.
@Richard, could you please have look?
Paolo
next prev parent reply other threads:[~2024-05-07 8:42 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-05-02 21:10 Mahesh Bandewar
2024-05-07 8:42 ` Paolo Abeni [this message]
2024-05-08 4:44 ` Richard Cochran
2024-05-08 7:38 ` Thomas Gleixner
2024-05-10 4:07 ` Richard Cochran
2024-05-10 7:50 ` Thomas Gleixner
2024-05-10 16:45 ` Mahesh Bandewar (महेश बंडेवार)
2024-05-11 9:59 ` Thomas Gleixner
2024-05-09 2:48 ` Mahesh Bandewar (महेश बंडेवार)
2024-05-08 7:35 ` Thomas Gleixner
2024-05-09 2:53 ` Mahesh Bandewar (महेश बंडेवार)
2024-05-10 21:27 ` Yuliang Li
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=bbd6a75b644bf11b82af7fa25a47e4fa20630958.camel@redhat.com \
--to=pabeni@redhat.com \
--cc=arnd@arndb.de \
--cc=corbet@lwn.net \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=jstultz@google.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mahesh@bandewar.net \
--cc=maheshb@google.com \
--cc=maimon.sagi@gmail.com \
--cc=netdev@vger.kernel.org \
--cc=richardcochran@gmail.com \
--cc=tglx@linutronix.de \
/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
all inboxes | Powered by JetHome®