[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20240219115736.7138a2a0@kmaincent-XPS-13-7390>
Date: Mon, 19 Feb 2024 11:57:36 +0100
From: Köry Maincent <kory.maincent@...tlin.com>
To: Rahul Rameshbabu <rrameshbabu@...dia.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>,
Willem de Bruijn <willemdebruijn.kernel@...il.com>, 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 RFC net-next v8 06/13] net: Add struct
kernel_ethtool_ts_info
On Fri, 16 Feb 2024 10:27:32 -0800
Rahul Rameshbabu <rrameshbabu@...dia.com> wrote:
> > +/**
> > + * struct kernel_ethtool_ts_info - kernel copy of struct ethtool_ts_info
> > + * @cmd: command number = %ETHTOOL_GET_TS_INFO
> > + * @so_timestamping: bit mask of the sum of the supported SO_TIMESTAMPING
> > flags
> > + * @phc_index: device index of the associated PHC, or -1 if there is none
> > + * @tx_types: bit mask of the supported hwtstamp_tx_types enumeration
> > values
> > + * @rx_filters: bit mask of the supported hwtstamp_rx_filters enumeration
> > values
> > + */
> > +struct kernel_ethtool_ts_info {
> > + u32 cmd;
> > + u32 so_timestamping;
> > + int phc_index;
> > + enum hwtstamp_tx_types tx_types;
>
> I might just be terrible at reading code, but isn't this what
> tx_reserved in ethtool_ts_info is for? I feel like using one of the
> reserved memspaces for this enum removes the need to make
> kernel_ethtool_ts_info? I might be missing something obvious however.
I did it to prepare the introduction phc_qualifier in patch 12. I am not sure it
would be wise to put it under tx/rx_reserved field. IMHO create a new kernel
structure is cleaner for that than the hack of using one of the tx/rx_reserved
field.
Regards,
--
Köry Maincent, Bootlin
Embedded Linux and kernel engineering
https://bootlin.com
Powered by blists - more mailing lists