[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <5b407dd1-6a02-44f0-8fcf-5f3786c1ffbb@nvidia.com>
Date: Tue, 15 Jul 2025 09:32:09 +0300
From: Gal Pressman <gal@...dia.com>
To: Jakub Kicinski <kuba@...nel.org>
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 14/07/2025 19:21, Jakub Kicinski wrote:
> 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).
There's no harm in passing NO_CHANGE in such cases, but it is not
something that the driver developers will be able to rely on. There's a
certain risk of someone assuming ioctl will behave the same.
Powered by blists - more mailing lists