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:   Mon, 16 Oct 2023 17:00:27 +0200
From:   Köry Maincent <kory.maincent@...tlin.com>
To:     Jakub Kicinski <kuba@...nel.org>
Cc:     Andrew Lunn <andrew@...n.ch>,
        Florian Fainelli <florian.fainelli@...adcom.com>,
        netdev@...r.kernel.org, linux-kernel@...r.kernel.org,
        linux-doc@...r.kernel.org,
        Thomas Petazzoni <thomas.petazzoni@...tlin.com>,
        "David S . Miller" <davem@...emloft.net>,
        Eric Dumazet <edumazet@...gle.com>,
        Paolo Abeni <pabeni@...hat.com>,
        Jonathan Corbet <corbet@....net>,
        Jay Vosburgh <j.vosburgh@...il.com>,
        Andy Gospodarek <andy@...yhouse.net>,
        Nicolas Ferre <nicolas.ferre@...rochip.com>,
        Claudiu Beznea <claudiu.beznea@...on.dev>,
        Horatiu Vultur <horatiu.vultur@...rochip.com>,
        UNGLinuxDriver@...rochip.com,
        Broadcom internal kernel review list 
        <bcm-kernel-feedback-list@...adcom.com>,
        Heiner Kallweit <hkallweit1@...il.com>,
        Russell King <linux@...linux.org.uk>,
        Richard Cochran <richardcochran@...il.com>,
        Radu Pirea <radu-nicolae.pirea@....nxp.com>,
        Willem de Bruijn <willemdebruijn.kernel@...il.com>,
        Vladimir Oltean <vladimir.oltean@....com>,
        Michael Walle <michael@...le.cc>,
        Jacob Keller <jacob.e.keller@...el.com>,
        Maxime Chevallier <maxime.chevallier@...tlin.com>
Subject: Re: [PATCH net-next v5 08/16] net: ethtool: Add a command to expose
 current time stamping layer

On Mon, 16 Oct 2023 07:22:04 -0700
Jakub Kicinski <kuba@...nel.org> wrote:

> On Mon, 16 Oct 2023 12:41:34 +0200 Köry Maincent wrote:
> > > Netdev vs phylib is an implementation detail of Linux.
> > > I'm also surprised that you changed this.    
> > 
> > This is the main reason I changed this. This is Linux implementation
> > purpose to know whether it should go through netdev or phylib, and then
> > each of these drivers could use other timestamps which are hardware
> > related.  
> 
> For an integrated design there's 90% chance the stamping is done 
> by the MAC. Even if it isn't there's no difference between PHY
> and MAC in terms of quality.

Ok, but there might be quality difference in case of several timestamp
configuration done in the MAC. Like the timestamping precision vs frequency
precision. In that case how ethtool would tell the driver to switch between
them?

My solution could work for this case by simply adding new values to the enum:

enum {
	NETDEV_TIMESTAMPING = (1 << 0),
	PHYLIB_TIMESTAMPING = (1 << 1),
	MAC_TS_PRECISION = (1 << 2)|(1 << 0),
	MAC_FREQ_PRECISION = (2 << 2)|(1 << 0),
}

Automatically Linux will go through the netdev implementation and could pass
the enum value to the netdev driver.

> But there is a big difference between MAC/PHY and DMA which would
> both fall under NETDEV?

Currently there is no DMA timestamping support right? And I suppose it fill fall
under the net device management?

In that case we will have MAC and DMA under netdev and PHY under phylib and
we won't have to do anything more than this timestamping management patch: 
https://lore.kernel.org/netdev/20231009155138.86458-14-kory.maincent@bootlin.com/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ