[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <2fbde275-e60b-473d-8488-8f0aa637c294@broadcom.com>
Date: Mon, 9 Oct 2023 14:20:02 -0700
From: Florian Fainelli <florian.fainelli@...adcom.com>
To: Köry Maincent <kory.maincent@...tlin.com>,
netdev@...r.kernel.org, linux-kernel@...r.kernel.org,
linux-doc@...r.kernel.org
Cc: Thomas Petazzoni <thomas.petazzoni@...tlin.com>,
"David S . Miller" <davem@...emloft.net>, Eric Dumazet
<edumazet@...gle.com>, Jakub Kicinski <kuba@...nel.org>,
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>, Andrew Lunn <andrew@...n.ch>,
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 10/9/23 08:51, Köry Maincent wrote:
> From: Kory Maincent <kory.maincent@...tlin.com>
>
> Time stamping on network packets may happen either in the MAC or in
> the PHY, but not both. In preparation for making the choice
> selectable, expose both the current and available layers via ethtool.
>
> In accordance with the kernel implementation as it stands, the current
> layer will always read as "phy" when a PHY time stamping device is
> present. Future patches will allow changing the current layer
> administratively.
>
> Signed-off-by: Kory Maincent <kory.maincent@...tlin.com>
>
> ---
[snip]
> +/*
> + * Hardware layer of the TIMESTAMPING provider
> + * New description layer should have the NETDEV_TIMESTAMPING or
> + * PHYLIB_TIMESTAMPING bit set to know which API to use for timestamping.
If we are talking about hardware layers, then we shall use either
PHY_TIMESTAMPING or MAC_TIMESTAMPING. PHYLIB is the sub-subsystem to
deal with Ethernet PHYs, and netdev is the object through which we
represent network devices, so they are not even quite describing similar
things. If you go with the {PHY,MAC}_TIMESTAMPING suggestion, then I
could see how we could somewhat easily add PCS_TIMESTAMPING for instance.
> + */
> +enum {
> + NO_TIMESTAMPING = 0,
> + NETDEV_TIMESTAMPING = (1 << 0),
> + PHYLIB_TIMESTAMPING = (1 << 1),
> + SOFTWARE_TIMESTAMPING = (1 << 2) | (1 << 0),
Why do we have to set NETDEV_TIMESTAMPING here, or is this a round-about
way of enumerating 0, 1, 2 and 3?
--
Florian
Download attachment "smime.p7s" of type "application/pkcs7-signature" (4221 bytes)
Powered by blists - more mailing lists