[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CO1PR11MB508922EA06C6A1BD14FF0A3CD6BCA@CO1PR11MB5089.namprd11.prod.outlook.com>
Date: Tue, 28 Nov 2023 20:19:05 +0000
From: "Keller, Jacob E" <jacob.e.keller@...el.com>
To: "Zaki, Ahmed" <ahmed.zaki@...el.com>, Jakub Kicinski <kuba@...nel.org>
CC: "netdev@...r.kernel.org" <netdev@...r.kernel.org>,
"intel-wired-lan@...ts.osuosl.org" <intel-wired-lan@...ts.osuosl.org>,
"corbet@....net" <corbet@....net>, "Brandeburg, Jesse"
<jesse.brandeburg@...el.com>, "Nguyen, Anthony L"
<anthony.l.nguyen@...el.com>, "davem@...emloft.net" <davem@...emloft.net>,
"edumazet@...gle.com" <edumazet@...gle.com>, "pabeni@...hat.com"
<pabeni@...hat.com>, "vladimir.oltean@....com" <vladimir.oltean@....com>,
"andrew@...n.ch" <andrew@...n.ch>, "horms@...nel.org" <horms@...nel.org>,
"mkubecek@...e.cz" <mkubecek@...e.cz>, "willemdebruijn.kernel@...il.com"
<willemdebruijn.kernel@...il.com>, "gal@...dia.com" <gal@...dia.com>,
"alexander.duyck@...il.com" <alexander.duyck@...il.com>,
"linux-doc@...r.kernel.org" <linux-doc@...r.kernel.org>, "Bagnucki, Igor"
<igor.bagnucki@...el.com>
Subject: RE: [PATCH net-next v6 1/7] net: ethtool: pass ethtool_rxfh to
get/set_rxfh ethtool ops
> -----Original Message-----
> From: Zaki, Ahmed <ahmed.zaki@...el.com>
> Sent: Monday, November 27, 2023 6:15 AM
> To: Jakub Kicinski <kuba@...nel.org>
> Cc: netdev@...r.kernel.org; intel-wired-lan@...ts.osuosl.org; corbet@....net;
> Brandeburg, Jesse <jesse.brandeburg@...el.com>; Nguyen, Anthony L
> <anthony.l.nguyen@...el.com>; davem@...emloft.net; edumazet@...gle.com;
> pabeni@...hat.com; vladimir.oltean@....com; andrew@...n.ch;
> horms@...nel.org; mkubecek@...e.cz; willemdebruijn.kernel@...il.com;
> gal@...dia.com; alexander.duyck@...il.com; linux-doc@...r.kernel.org;
> Bagnucki, Igor <igor.bagnucki@...el.com>; Keller, Jacob E
> <jacob.e.keller@...el.com>
> Subject: Re: [PATCH net-next v6 1/7] net: ethtool: pass ethtool_rxfh to
> get/set_rxfh ethtool ops
>
>
>
> On 2023-11-21 16:29, Jakub Kicinski wrote:
> > On Mon, 20 Nov 2023 13:56:08 -0700 Ahmed Zaki wrote:
> >> u32 (*get_rxfh_key_size)(struct net_device *);
> >> u32 (*get_rxfh_indir_size)(struct net_device *);
> >> - int (*get_rxfh)(struct net_device *, u32 *indir, u8 *key,
> >> - u8 *hfunc);
> >> - int (*set_rxfh)(struct net_device *, const u32 *indir,
> >> - const u8 *key, const u8 hfunc);
> >> + int (*get_rxfh)(struct net_device *, struct ethtool_rxfh *,
> >> + u32 *indir, u8 *key);
> >> + int (*set_rxfh)(struct net_device *, struct ethtool_rxfh *,
> >> + const u32 *indir, const u8 *key);
> >> int (*get_rxfh_context)(struct net_device *, u32 *indir, u8 *key,
> >> u8 *hfunc, u32 rss_context);
> >> int (*set_rxfh_context)(struct net_device *, const u32 *indir,
> >
> > This conversion looks 1/4th done. You should do the following:
> >
> > - First simplify the code by always providing a pointer to all params
> > (indir, key and func); the fact that some of them may be NULL seems
> > like a weird historic thing or a premature optimization.
> > It will simplify the drivers if all pointers are always present.
> > You don't have to remove the if () checks in the existing drivers.
> >
> > - Then make the functions take a dev pointer, and a pointer to a
> > single struct wrapping all arguments. The set_* should also take
> > an extack.
>
> Can we skip the "extack" part for this series? There is no
> "ETHTOOL_MSG_RSS_SET" netlink message, which is needed for user-space to
> get the ACK and adding all the netlink stuff seems a bit out of scope.
>
> I will do the rest in the next version.
Please include the extack now even if there isn't an immediate user. A NULL value is acceptable to pass for "there is no extended ACK available", but this way we don't have to modify the drivers *again* when the extack is available if we add a netlink op in the future.
Thanks,
Jake
Powered by blists - more mailing lists