[PATCH net-next v3 0/3] net: dsa: mv88e6xxx: various hwstamp fixes

Luke Howard posted 3 patches 5 days, 21 hours ago
drivers/net/dsa/mv88e6xxx/chip.c     |   4 ++
drivers/net/dsa/mv88e6xxx/chip.h     |  15 +++-
drivers/net/dsa/mv88e6xxx/hwtstamp.c | 134 +++++++++++++++++++++++++++++------
drivers/net/dsa/mv88e6xxx/hwtstamp.h |  14 ++++
drivers/net/dsa/mv88e6xxx/ptp.c      |  65 ++++++++++++++---
drivers/net/dsa/mv88e6xxx/ptp.h      |   1 +
6 files changed, 202 insertions(+), 31 deletions(-)
[PATCH net-next v3 0/3] net: dsa: mv88e6xxx: various hwstamp fixes
Posted by Luke Howard 5 days, 21 hours ago
Three fixes for improving the reliably of hardware timestamp acquisition
on Marvell switches. In our tests this eliminated missed timestamps in
ptp4l, whilst also preserving PTP event and general message ordering on
switches that support embedded timestamps.

Note: squashing the two embedded timestamp patches into a single commit
may be desirable.

Signed-off-by: Luke Howard <lukeh@padl.com>
---
Changes in v3:
- Unset UDP checksum on all embedded timestamp cases
- Handle embedded PTP arrival times without worker dispatch
- Link to v2: https://patch.msgid.link/20260710-mv88e6xxx-ptp-fixes-v2-0-af97c38df247@padl.com

Changes in v2:
- Lineraize SKBs before retrieving embedded timestamp
- Hoist driver register lock out of per-frame loop
- Link to v1: https://patch.msgid.link/20260703-mv88e6xxx-ptp-fixes-v1-0-0138581889a9@padl.com

To: Andrew Lunn <andrew@lunn.ch>
To: Vladimir Oltean <olteanv@gmail.com>
To: "David S. Miller" <davem@davemloft.net>
To: Eric Dumazet <edumazet@google.com>
To: Jakub Kicinski <kuba@kernel.org>
To: Paolo Abeni <pabeni@redhat.com>
To: Richard Cochran <richardcochran@gmail.com>
Cc: netdev@vger.kernel.org
Cc: linux-kernel@vger.kernel.org

---
Luke Howard (3):
      net: dsa: mv88e6xxx: use ARRIVAL1 counter for all peer delay messages
      net: dsa: mv88e6xxx: embedded PTP timestamp support
      net: dsa: mv88e6xxx: apply embedded PTP arrival times inline

 drivers/net/dsa/mv88e6xxx/chip.c     |   4 ++
 drivers/net/dsa/mv88e6xxx/chip.h     |  15 +++-
 drivers/net/dsa/mv88e6xxx/hwtstamp.c | 134 +++++++++++++++++++++++++++++------
 drivers/net/dsa/mv88e6xxx/hwtstamp.h |  14 ++++
 drivers/net/dsa/mv88e6xxx/ptp.c      |  65 ++++++++++++++---
 drivers/net/dsa/mv88e6xxx/ptp.h      |   1 +
 6 files changed, 202 insertions(+), 31 deletions(-)
---
base-commit: f6f3b36c15ed44de1fbb44e645e4fae8c4a4453e
change-id: 20260630-mv88e6xxx-ptp-fixes-1732570b8829

Best regards,
--  
Luke Howard <lukeh@padl.com>
Re: [PATCH net-next v3 0/3] net: dsa: mv88e6xxx: various hwstamp fixes
Posted by Jakub Kicinski 3 hours ago
On Sun, 19 Jul 2026 15:30:52 +1000 Luke Howard wrote:
> Three fixes for improving the reliably of hardware timestamp acquisition
> on Marvell switches. In our tests this eliminated missed timestamps in
> ptp4l, whilst also preserving PTP event and general message ordering on
> switches that support embedded timestamps.

Do you know if there's any precedent in the existing upstream drivers
for overriding the reserved bytes? It's not normal for devices to modify
the ingress frames. Perhaps there's some precedent, but if not I think
we should gate this (eg with a devlink param?)

Andrew, do you have any opinion? Or perhaps Richard?

> Note: squashing the two embedded timestamp patches into a single commit
> may be desirable.

I think it would be great to invert the order. Revamp the locking as
patch 2 then add the new feature as patch 3.