ethtool: rss: support setting hfunc via Netlink
authorJakub Kicinski <kuba@kernel.org>
Wed, 16 Jul 2025 00:03:25 +0000 (17:03 -0700)
committerJakub Kicinski <kuba@kernel.org>
Thu, 17 Jul 2025 23:13:58 +0000 (16:13 -0700)
commit82ae67cbc423425ecc5836daa520442d4c8bdb33
tree9cdaa1c598c4f26b7cb309b2db72d5e8118d806c
parent6e7eb93a692c21d8d1496e31df8b0d5f77d98ea2
ethtool: rss: support setting hfunc via Netlink

Support setting RSS hash function / algo via ethtool Netlink.
Like IOCTL we don't validate that the function is within the
range known to the kernel. The drivers do a pretty good job
validating the inputs, and the IDs are technically "dynamically
queried" rather than part of uAPI.

Only change should be that in Netlink we don't support user
explicitly passing ETH_RSS_HASH_NO_CHANGE (0), if no change
is requested the attribute should be absent.

The ETH_RSS_HASH_NO_CHANGE is retained in driver-facing
API for consistency (not that I see a strong reason for it).

Reviewed-by: Gal Pressman <gal@nvidia.com>
Link: https://patch.msgid.link/20250716000331.1378807-6-kuba@kernel.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Documentation/netlink/specs/ethtool.yaml
Documentation/networking/ethtool-netlink.rst
net/ethtool/rss.c