[PATCH net-next v5 05/13] net: ethtool: Allow passing a phy index for some commands
Maxime Chevallier
maxime.chevallier at bootlin.com
Fri Jan 5 01:30:45 PST 2024
Hello Jakub,
On Thu, 4 Jan 2024 15:15:16 -0800
Jakub Kicinski <kuba at kernel.org> wrote:
> On Thu, 21 Dec 2023 19:00:38 +0100 Maxime Chevallier wrote:
> > @@ -20,6 +21,7 @@ const struct nla_policy ethnl_header_policy[] = {
> > .len = ALTIFNAMSIZ - 1 },
> > [ETHTOOL_A_HEADER_FLAGS] = NLA_POLICY_MASK(NLA_U32,
> > ETHTOOL_FLAGS_BASIC),
> > + [ETHTOOL_A_HEADER_PHY_INDEX] = NLA_POLICY_MIN(NLA_U32, 1),
> > };
> >
> > const struct nla_policy ethnl_header_policy_stats[] = {
> > @@ -28,6 +30,7 @@ const struct nla_policy ethnl_header_policy_stats[] = {
> > .len = ALTIFNAMSIZ - 1 },
> > [ETHTOOL_A_HEADER_FLAGS] = NLA_POLICY_MASK(NLA_U32,
> > ETHTOOL_FLAGS_STATS),
> > + [ETHTOOL_A_HEADER_PHY_INDEX] = NLA_POLICY_MIN(NLA_U32, 1),
> > };
>
> You should define (copy/paste) a new header policy and use it
> only for commands which actually make use of the PHY index.
> That's why we have separate copies already for stats.
Ah OK I didn't know that, I'll do this. Thanks !
Maxime
More information about the linux-arm-kernel
mailing list