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]
Date:   Sun, 2 Apr 2023 20:36:53 +0300
From:   Vladimir Oltean <vladimir.oltean@....com>
To:     Maxime Chevallier <maxime.chevallier@...tlin.com>
Cc:     Köry Maincent <kory.maincent@...tlin.com>,
        Andrew Lunn <andrew@...n.ch>,
        Florian Fainelli <f.fainelli@...il.com>,
        Heiner Kallweit <hkallweit1@...il.com>, netdev@...r.kernel.org,
        devicetree@...r.kernel.org, linux-kernel@...r.kernel.org,
        linux-doc@...r.kernel.org, linux-omap@...r.kernel.org,
        Michael Walle <michael@...le.cc>,
        Richard Cochran <richardcochran@...il.com>,
        thomas.petazzoni@...tlin.com, Russell King <linux@...linux.org.uk>,
        "David S. Miller" <davem@...emloft.net>,
        Eric Dumazet <edumazet@...gle.com>,
        Jakub Kicinski <kuba@...nel.org>,
        Paolo Abeni <pabeni@...hat.com>,
        Rob Herring <robh+dt@...nel.org>,
        Krzysztof Kozlowski <krzysztof.kozlowski+dt@...aro.org>,
        Jonathan Corbet <corbet@....net>,
        Jay Vosburgh <j.vosburgh@...il.com>,
        Veaceslav Falico <vfalico@...il.com>,
        Andy Gospodarek <andy@...yhouse.net>,
        Claudiu Manoil <claudiu.manoil@....com>,
        Alexandre Belloni <alexandre.belloni@...tlin.com>,
        UNGLinuxDriver@...rochip.com, Minghao Chi <chi.minghao@....com.cn>,
        Jie Wang <wangjie125@...wei.com>,
        Oleksij Rempel <linux@...pel-privat.de>,
        Sean Anderson <sean.anderson@...o.com>,
        "Gustavo A. R. Silva" <gustavoars@...nel.org>,
        Wolfram Sang <wsa+renesas@...g-engineering.com>,
        Alexander Lobakin <alexandr.lobakin@...el.com>,
        Marco Bonelli <marco@...eim.net>
Subject: Re: [PATCH v3 3/5] net: Let the active time stamping layer be
 selectable.

Hello Maxime,

On Fri, Mar 24, 2023 at 11:25:41AM +0100, Maxime Chevallier wrote:
> I'd like to point out a series sent a while ago :
> 
> https://lore.kernel.org/netdev/3a14f417-1ae1-9434-5532-4b3387f25d18@orolia.com/
> 
> Here, the MAC's timestamping unit can be configured in 2 ways, which
> boils down to either more accurate timestamps, or better accuracy in
> frequency adjustments for the clock.
> 
> The need is to be able to change this mode at runtime, as we can change
> the clock source for the timestamping unit to a very precise-one,
> therefore using the "accurate timestamps mode" working as a
> grand-master, or switching to slave mode, where we would sacrifice a
> little bit the timestamping precision to get better frequency
> precision.
> 
> So, we can consider here that not only the MAC's timestamping unit has
> a non-fixed precision, but if we go through the route a a new API,
> maybe we can also take this case into account, allowing for a bit of
> configuration of the timestamping unit from userspace?

How would you suggest that this API looks like, what would be there to
configure on the timestamping unit? You're not looking for something
specific like "fine vs coarse" to be accepted, I hope?

Perhaps the stmmac is patched to expose 2 PHCs, one for fine mode and
one for coarse mode, and the timestamping PHC selection enables one more
or the other? In other words, if we expressed this stmmac specific thing
in vendor-agnostic terminology that we already understand, would that work?

The ability of a single MAC to register 2 PHCs might be useful for TSN
switches as well. Long story short, sometimes those expose a free
running clock (uncorrectable in offset and frequency), as well as a
correctable one, and they give the option for PTP hardware timestamps to
sample one clock or the other. TSN offloads (tc-taprio, tc-gate etc)
always use the correctable clock, and 802.1AS / gPTP has the option to
use the free running clock. I'm not interested in this personally, but
there were some talks about the value of doing this some time ago, and I
thought it would be worth mentioning it in this context, as something
else that could benefit from a more generic UAPI.

> > Is it plausible that over time, when PTP timestamping matures and,
> > for example, MDIO devices get support for PTP_SYS_OFFSET_EXTENDED
> > (an attempt was here: https://lkml.org/lkml/2019/8/16/638), the
> > relationship between PTP clock qualities changes, and so does the
> > preference change?
> 
> I'm not exactly familiar with PTP_SYS_OFFSET_EXTENDED, but it looks a
> bit similar in purpose to the above-mentionned use-case.

Nope, not similar at all.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ