[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250714092139.7862e752@kernel.org>
Date: Mon, 14 Jul 2025 09:21:39 -0700
From: Jakub Kicinski <kuba@...nel.org>
To: Gal Pressman <gal@...dia.com>
Cc: davem@...emloft.net, netdev@...r.kernel.org, edumazet@...gle.com,
pabeni@...hat.com, andrew+netdev@...n.ch, horms@...nel.org,
donald.hunter@...il.com, shuah@...nel.org, kory.maincent@...tlin.com,
maxime.chevallier@...tlin.com, sdf@...ichev.me, ecree.xilinx@...il.com
Subject: Re: [PATCH net-next 05/11] ethtool: rss: support setting hfunc via
Netlink
On Sun, 13 Jul 2025 14:10:20 +0300 Gal Pressman wrote:
> > @@ -617,7 +623,11 @@ ethnl_rss_set(struct ethnl_req_info *req_info, struct genl_info *info)
> > goto exit_clean_data;
> > mod |= indir_mod;
> >
> > - rxfh.hfunc = ETH_RSS_HASH_NO_CHANGE;
> > + rxfh.hfunc = data.hfunc;
>
> What is this for?
WDYM? data is filled in by the GET handler. So we init rxfh.hfunc
to what driver returned from GET.
> > + ethnl_update_u8(&rxfh.hfunc, tb[ETHTOOL_A_RSS_HFUNC], &mod);
> > + if (rxfh.hfunc == data.hfunc)
> > + rxfh.hfunc = ETH_RSS_HASH_NO_CHANGE;
>
> I think that this is a distinction that we don't currently make in the
> drivers/ioctl flow.
>
> NO_CHANGE was specifically used for cases where the user didn't specify
> a parameter, not for cases where the request is equal to the configured one.
> mlx5 for example, performs this check internally because it can't rely
> on NO_CHANGE for requested == configured.
Yeah, no strong preference. We have to live with the ioctl path so
the drivers will need to keep handling all corner cases. In this case
I chose behaving somewhat consistently with the ioctl behavior (assuming
user space is well behaved). Otherwise if we move ethtool CLI to netlink
new drivers may forget that NO_CHANGE is a thing.
Powered by blists - more mailing lists