lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <328d5953-aec3-4a1e-b2e3-268155793996@bootlin.com>
Date: Thu, 16 Oct 2025 10:14:56 +0200
From: Maxime Chevallier <maxime.chevallier@...tlin.com>
To: Kory Maincent <kory.maincent@...tlin.com>
Cc: 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>,
 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: Re: [PATCH net-next 0/3] net: stmmac: Add support for coarse
 timestamping

Hi,

On 15/10/2025 14:55, Kory Maincent wrote:
> On Wed, 15 Oct 2025 12:27:20 +0200
> Maxime Chevallier <maxime.chevallier@...tlin.com> wrote:
> 
>> 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).
> 
> https://elixir.bootlin.com/linux/v6.17.1/source/include/uapi/linux/net_tstamp.h#L16
> "approx" was initially added for DMA timestamp point.
> Maybe we should add a new enum value here with a more suitable name.

Yeah, the terminology in stmmac of "coarse/fine" refers to frequency adjustment, while
the "fine/approx" qualifiers refer to timestamping.

I'm OK to add a new value, with the usual risk of seeing the number of qualifiers
explode if different hardware to that in different ways.

I suggest keeping "precise" for the default mode, and maybe use "enhanced" or
a similar term that would imply that the improved precision is done at the expense
of some some other aspect of the system (and therefore probably not
suitable as a default).

Maybe Richard can shed some light on that ?

> Regards,


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ