netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next 0/3] net: stmmac: Add support for coarse timestamping
@ 2025-10-15 10:27 Maxime Chevallier
  2025-10-15 10:27 ` [PATCH net-next 1/3] net: stmmac: Move subsecond increment configuration in dedicated helper Maxime Chevallier
                   ` (3 more replies)
  0 siblings, 4 replies; 23+ messages in thread
From: Maxime Chevallier @ 2025-10-15 10:27 UTC (permalink / raw)
  To: Alexandre Torgue, Jose Abreu, Andrew Lunn, davem, Eric Dumazet,
	Jakub Kicinski, Paolo Abeni, Maxime Coquelin, Richard Cochran,
	Russell King, Köry Maincent
  Cc: Maxime Chevallier, Alexis Lothoré, Thomas Petazzoni, netdev,
	linux-stm32, linux-arm-kernel, linux-kernel

Hello everyone,

This is another attempt to support the fine vs coarse timestamping modes
in stmmac.

This mode allows trading off PTP clock frequency adjustment precision
versus timestamping precision.

In coarse mode, we lose the ability to fine-tune the PTP clock
frequency, but get better timestamping precision instead. This is
especially useful when acting as a PTP Grand Master, where the PTP clock
in sync'd to a high-precision GPS clock through PPS inputs.

This has been submitted before as a dedicated ioctl() back in 2020 [1].
Since then, we now have a better representation of timestamp providers
with a dedicated qualifier (approx vs precise).

This series attempts to map these new qualifiers to stmmac's
timestamping modes, see patch 2 for details.

The main drawback IMO is that the qualifiers don't map very well to our
timestamping modes, as the "approx" qualifier actually maps to stmmac's
"coars" mode, but we actually gain in timestamping precision (while
losing frequency precision).

Patch 1 is prep work for the stmmac driver,
Patch 2 adds the mode adjustment. Most of the plumbing to compute addend
values and sub-second increment is already there in the driver.

Patch 3 makes sure our NDO for timestamping provider reconfiguration is
called upon changing the qualifier.

Let me kow what you think of this approach,

Maxime

[1] : https://lore.kernel.org/netdev/20200514102808.31163-1-olivier.dautricourt@orolia.com/

Maxime Chevallier (3):
  net: stmmac: Move subsecond increment configuration in dedicated
    helper
  net: stmmac: Allow supporting coarse adjustment mode
  net: ethtool: tsconfig: Re-configure hwtstamp upon provider change

 .../ethernet/stmicro/stmmac/stmmac_ethtool.c  |  2 +
 .../net/ethernet/stmicro/stmmac/stmmac_main.c | 62 +++++++++++++------
 net/ethtool/tsconfig.c                        |  2 +-
 3 files changed, 45 insertions(+), 21 deletions(-)

-- 
2.49.0


^ permalink raw reply	[flat|nested] 23+ messages in thread

end of thread, other threads:[~2025-10-23  8:35 UTC | newest]

Thread overview: 23+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-10-15 10:27 [PATCH net-next 0/3] net: stmmac: Add support for coarse timestamping Maxime Chevallier
2025-10-15 10:27 ` [PATCH net-next 1/3] net: stmmac: Move subsecond increment configuration in dedicated helper Maxime Chevallier
2025-10-15 15:06   ` Russell King (Oracle)
2025-10-15 16:20     ` Maxime Chevallier
2025-10-15 17:20       ` Russell King (Oracle)
2025-10-15 10:27 ` [PATCH net-next 2/3] net: stmmac: Allow supporting coarse adjustment mode Maxime Chevallier
2025-10-18  1:23   ` Jakub Kicinski
2025-10-18  7:42     ` Maxime Chevallier
2025-10-20  9:00       ` Kory Maincent
2025-10-20  9:32         ` Maxime Chevallier
2025-10-20 12:52           ` Kory Maincent
2025-10-21  1:03       ` Jakub Kicinski
2025-10-21  8:02         ` Maxime Chevallier
2025-10-21 23:02           ` Jakub Kicinski
2025-10-23  8:29             ` Maxime Chevallier
2025-10-23  8:35               ` Kory Maincent
2025-10-15 10:27 ` [PATCH net-next 3/3] net: ethtool: tsconfig: Re-configure hwtstamp upon provider change Maxime Chevallier
2025-10-15 12:45   ` Kory Maincent
2025-10-16  8:01     ` Maxime Chevallier
2025-10-16  8:44       ` Kory Maincent
2025-10-16  8:53     ` Russell King (Oracle)
2025-10-15 12:55 ` [PATCH net-next 0/3] net: stmmac: Add support for coarse timestamping Kory Maincent
2025-10-16  8:14   ` Maxime Chevallier

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).