[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20251015102725.1297985-1-maxime.chevallier@bootlin.com>
Date: Wed, 15 Oct 2025 12:27:20 +0200
From: Maxime Chevallier <maxime.chevallier@...tlin.com>
To: Alexandre Torgue <alexandre.torgue@...s.st.com>,
Jose Abreu <joabreu@...opsys.com>,
Andrew Lunn <andrew+netdev@...n.ch>,
davem@...emloft.net,
Eric Dumazet <edumazet@...gle.com>,
Jakub Kicinski <kuba@...nel.org>,
Paolo Abeni <pabeni@...hat.com>,
Maxime Coquelin <mcoquelin.stm32@...il.com>,
Richard Cochran <richardcochran@...il.com>,
Russell King <linux@...linux.org.uk>,
Köry Maincent <kory.maincent@...tlin.com>
Cc: Maxime Chevallier <maxime.chevallier@...tlin.com>,
Alexis Lothoré <alexis.lothore@...tlin.com>,
Thomas Petazzoni <thomas.petazzoni@...tlin.com>,
netdev@...r.kernel.org,
linux-stm32@...md-mailman.stormreply.com,
linux-arm-kernel@...ts.infradead.org,
linux-kernel@...r.kernel.org
Subject: [PATCH net-next 0/3] net: stmmac: Add support for coarse timestamping
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
Powered by blists - more mailing lists