From: Thomas Gleixner <tglx@linutronix.de>
To: Miroslav Lichvar <mlichvar@redhat.com>
Cc: LKML <linux-kernel@vger.kernel.org>,
netdev@vger.kernel.org,
"Richard Cochran" <richardcochran@gmail.com>,
"Christopher Hall" <christopher.s.hall@intel.com>,
"John Stultz" <jstultz@google.com>,
"Frederic Weisbecker" <frederic@kernel.org>,
"Anna-Maria Behnsen" <anna-maria@linutronix.de>,
"Werner Abt" <werner.abt@meinberg-usa.com>,
"David Woodhouse" <dwmw2@infradead.org>,
"Stephen Boyd" <sboyd@kernel.org>,
"Thomas Weißschuh" <thomas.weissschuh@linutronix.de>,
"Kurt Kanzenbach" <kurt@linutronix.de>,
"Nam Cao" <namcao@linutronix.de>,
"Antoine Tenart" <atenart@kernel.org>
Subject: Re: [patch 0/3] ptp: Provide support for auxiliary clocks for PTP_SYS_OFFSET_EXTENDED
Date: Thu, 26 Jun 2025 20:36:06 +0200 [thread overview]
Message-ID: <87y0tepcyx.ffs@tglx> (raw)
In-Reply-To: <aF1e40rkAO5mOFBZ@localhost>
On Thu, Jun 26 2025 at 16:53, Miroslav Lichvar wrote:
> On Thu, Jun 26, 2025 at 03:27:28PM +0200, Thomas Gleixner wrote:
>> This is obviously incomplete as the user space steering daemon needs to be
>> able to correlate timestamps from these auxiliary clocks with the
>> associated PTP device timestamp. The PTP_SYS_OFFSET_EXTENDED IOCTL command
>> already supports to select clock IDs for pre and post hardware timestamps,
>> so the first step for correlation is to extend that IOCTL to allow
>> selecting auxiliary clocks.
>
>> Miroslav: This branch should enable you to test the actual steering via a
>> PTP device which has PTP_SYS_OFFSET_EXTENDED support in the driver.
>
> Nice! I ran few quick tests and it seems to be working great. The
> observed delay and stability with an AUX clock synchronized to a PHC
> seems to be the same as with CLOCK_REALTIME.
Thank you for taking the time!
> Are there any plans to enable software timestamping of packets by
> AUX clocks?
I'm not aware of any plans or efforts so far, but obviously that'd be
the next logical step.
> That would allow an NTP/PTP instance using SW timestamps
> to be fully isolated from the adjustments of the CLOCK_REALTIME clock,
> e.g. to run an independent NTP/PTP server in a container. This might
> be tricky as the skb would likely need to contain the MONOTONIC_RAW
> timestamp to be converted later when it gets to a socket, so some
> history of adjustments of each clock would need to be saved and
> reapplied to the raw timestamp.
Either that or you could go and implement some BPF magic to take a
timestamp with a particular clock ID based on the packet type. But what
do I know? That's something the network wizards needs to figure out.
Thanks,
tglx
next prev parent reply other threads:[~2025-06-26 18:36 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-06-26 13:27 [patch 0/3] ptp: Provide support for auxiliary clocks for PTP_SYS_OFFSET_EXTENDED Thomas Gleixner
2025-06-26 13:27 ` [patch 1/3] timekeeping: Provide ktime_get_clock_ts64() Thomas Gleixner
2025-06-27 5:22 ` John Stultz
2025-06-29 15:49 ` Vadim Fedorenko
2025-06-26 13:27 ` [patch 2/3] ptp: Use ktime_get_clock_ts64() for timestamping Thomas Gleixner
2025-06-27 5:23 ` John Stultz
2025-06-29 15:50 ` Vadim Fedorenko
2025-06-26 13:27 ` [patch 3/3] ptp: Enable auxiliary clocks for PTP_SYS_OFFSET_EXTENDED Thomas Gleixner
2025-06-29 15:57 ` Vadim Fedorenko
2025-07-01 13:00 ` Thomas Gleixner
2025-06-26 14:53 ` [patch 0/3] ptp: Provide support for " Miroslav Lichvar
2025-06-26 18:36 ` Thomas Gleixner [this message]
2025-07-01 10:16 ` Paolo Abeni
2025-07-01 12:23 ` Thomas Gleixner
2025-07-01 23:56 ` Jakub Kicinski
2025-07-02 8:19 ` Thomas Gleixner
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=87y0tepcyx.ffs@tglx \
--to=tglx@linutronix.de \
--cc=anna-maria@linutronix.de \
--cc=atenart@kernel.org \
--cc=christopher.s.hall@intel.com \
--cc=dwmw2@infradead.org \
--cc=frederic@kernel.org \
--cc=jstultz@google.com \
--cc=kurt@linutronix.de \
--cc=linux-kernel@vger.kernel.org \
--cc=mlichvar@redhat.com \
--cc=namcao@linutronix.de \
--cc=netdev@vger.kernel.org \
--cc=richardcochran@gmail.com \
--cc=sboyd@kernel.org \
--cc=thomas.weissschuh@linutronix.de \
--cc=werner.abt@meinberg-usa.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