From: Vladimir Oltean <olteanv@gmail.com>
To: Luke Howard <lukeh@padl.com>
Cc: "David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
Vivien Didelot <vivien.didelot@gmail.com>,
Gregory CLEMENT <gregory.clement@bootlin.com>,
Andrew Lunn <andrew@lunn.ch>,
Richard Cochran <richardcochran@gmail.com>,
Cedric Jehasse <cedric.jehasse@gmail.com>,
Kieran Tyrrell <kieran@sienda.com>,
Max Holtmann <mh@rme-audio.de>, Max Hunter <max@huntershome.org>,
Christoph Mellauner <christoph.mellauner@joyned.at>,
Simon Gapp <simon.gapp@gapp-audio.com>,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH net-next v2 0/2] net: dsa: mv88e6xxx: various hwstamp fixes
Date: Sun, 19 Jul 2026 12:53:07 +0300 [thread overview]
Message-ID: <20260719095307.hwtnbrqdkjxntrcr@skbuf> (raw)
In-Reply-To: <0A7B1CC8-F5F6-487E-A14C-1F0C2D5ADC84@padl.com>
On Fri, Jul 17, 2026 at 05:47:49PM +1000, Luke Howard wrote:
>
> > ---
> > Luke Howard (2):
> > net: dsa: mv88e6xxx: embedded PTP timestamp support
>
> This can be improved: there is no need to extract the embedded
> timestamp in the PTP worker as it can be done directly in
> mv88e6xxx_port_rxtstamp() (provided tstamp_{cc,tc} are protected by a
> spinlock). DSA can deliver the frame normally, similar to
> ocelot_ptp_rx_timestamp().
ocelot_ptp_rx_timestamp() accesses MMIO-based registers, which can be
done atomically.
mv88e6xxx_ptp_clock_read() accesses MDIO bus registers, and the MDIO bus
is sleepable. Fundamental difference.
Your hardware only provides 32 bits of partial timestamp, so
mv88e6xxx_ptp_clock_read() will always be needed one way or another, to
recover the full 64 bits. Either through tstamp_{cc,tc} or through
direct calls.
> Deferring to the worker can reorder frames such that PTP general
> messages arrive before the timestamped event messages, which confuses
> some other PTP implementations such as gptp2d [1].
True, this is a caveat, but event messages and general messages can
already take different network paths, especially with PTP over IP where
they go through different UDP ports (even if for gPTP that is not the case).
The PTP user space implementation needs to be prepared to handle this.
> This optimisation of course only works for ArrTSMode because there is
> no MDIO read required.
I don't understand this comment given the partial 32-bit timestamp
limitation.
> Luke
>
> [1] https://github.com/xl4-shiro/excelfore-gptp
next prev parent reply other threads:[~2026-07-19 9:53 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-10 6:43 [PATCH net-next v2 0/2] net: dsa: mv88e6xxx: various hwstamp fixes Luke Howard
2026-07-10 6:43 ` [PATCH net-next v2 1/2] net: dsa: mv88e6xxx: use ARRIVAL1 counter for all peer delay messages Luke Howard
2026-07-10 6:43 ` [PATCH net-next v2 2/2] net: dsa: mv88e6xxx: embedded PTP timestamp support Luke Howard
2026-07-19 10:12 ` Vladimir Oltean
2026-07-19 11:35 ` Luke Howard
2026-07-19 23:04 ` Vladimir Oltean
2026-07-20 1:16 ` Luke Howard
2026-07-16 10:57 ` [PATCH net-next v2 0/2] net: dsa: mv88e6xxx: various hwstamp fixes Simon Horman
2026-07-17 7:47 ` Luke Howard
2026-07-19 9:53 ` Vladimir Oltean [this message]
2026-07-19 11:22 ` Luke Howard
2026-07-19 22:57 ` Vladimir Oltean
2026-07-20 1:13 ` Luke Howard
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=20260719095307.hwtnbrqdkjxntrcr@skbuf \
--to=olteanv@gmail.com \
--cc=andrew@lunn.ch \
--cc=cedric.jehasse@gmail.com \
--cc=christoph.mellauner@joyned.at \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=gregory.clement@bootlin.com \
--cc=kieran@sienda.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lukeh@padl.com \
--cc=max@huntershome.org \
--cc=mh@rme-audio.de \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=richardcochran@gmail.com \
--cc=simon.gapp@gapp-audio.com \
--cc=vivien.didelot@gmail.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