[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAF=yD-+O6QxuYJzijMes7J_DHHd7yYCz8sBLFERM1U6pYN0Gkg@mail.gmail.com>
Date: Thu, 19 Oct 2023 10:48:04 -0400
From: Willem de Bruijn <willemdebruijn.kernel@...il.com>
To: Kory Maincent <kory.maincent@...tlin.com>
Cc: Florian Fainelli <florian.fainelli@...adcom.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>,
"David S. Miller" <davem@...emloft.net>,
Eric Dumazet <edumazet@...gle.com>,
Jakub Kicinski <kuba@...nel.org>,
Paolo Abeni <pabeni@...hat.com>,
Richard Cochran <richardcochran@...il.com>,
Radu Pirea <radu-nicolae.pirea@....nxp.com>,
Jay Vosburgh <j.vosburgh@...il.com>,
Andy Gospodarek <andy@...yhouse.net>,
Nicolas Ferre <nicolas.ferre@...rochip.com>,
Claudiu Beznea <claudiu.beznea@...on.dev>,
Jonathan Corbet <corbet@....net>,
Horatiu Vultur <horatiu.vultur@...rochip.com>,
UNGLinuxDriver@...rochip.com, Simon Horman <horms@...nel.org>,
Vladimir Oltean <vladimir.oltean@....com>,
Thomas Petazzoni <thomas.petazzoni@...tlin.com>,
netdev@...r.kernel.org, linux-kernel@...r.kernel.org,
linux-doc@...r.kernel.org,
Maxime Chevallier <maxime.chevallier@...tlin.com>
Subject: Re: [PATCH net-next v6 07/16] net_tstamp: Add TIMESTAMPING SOFTWARE
and HARDWARE mask
On Thu, Oct 19, 2023 at 10:29 AM Kory Maincent
<kory.maincent@...tlin.com> wrote:
>
> Timestamping software or hardware flags are often used as a group,
> therefore adding these masks will easier future use.
This assumes that device support for timestamping is often symmetric:
a device supports both rx and tx, or neither.
All devices support software receive timestamping, as that timestamp
is taken in the core network stack. But to support transmit timestamps
drivers have to call sbk_tstamp_tx in their ndo_start_xmit.
For hardware timestamping it may be more common to support both or
neither, not sure.
> I did not use SOF_TIMESTAMPING_SYS_HARDWARE flag as it is deprecated and
> not use at all.
>
> Signed-off-by: Kory Maincent <kory.maincent@...tlin.com>
> ---
> include/uapi/linux/net_tstamp.h | 8 ++++++++
> 1 file changed, 8 insertions(+)
>
> diff --git a/include/uapi/linux/net_tstamp.h b/include/uapi/linux/net_tstamp.h
> index a2c66b3d7f0f..df8091998c8d 100644
> --- a/include/uapi/linux/net_tstamp.h
> +++ b/include/uapi/linux/net_tstamp.h
> @@ -48,6 +48,14 @@ enum {
> SOF_TIMESTAMPING_TX_SCHED | \
> SOF_TIMESTAMPING_TX_ACK)
>
> +#define SOF_TIMESTAMPING_SOFTWARE_MASK (SOF_TIMESTAMPING_RX_SOFTWARE | \
> + SOF_TIMESTAMPING_TX_SOFTWARE | \
> + SOF_TIMESTAMPING_SOFTWARE)
> +
> +#define SOF_TIMESTAMPING_HARDWARE_MASK (SOF_TIMESTAMPING_RX_HARDWARE | \
> + SOF_TIMESTAMPING_TX_HARDWARE | \
> + SOF_TIMESTAMPING_RAW_HARDWARE)
> +
> /**
> * struct so_timestamping - SO_TIMESTAMPING parameter
> *
>
> --
> 2.25.1
>
Powered by blists - more mailing lists