]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
ethtool: rss: support setting flow hashing fields
authorJakub Kicinski <kuba@kernel.org>
Wed, 16 Jul 2025 00:03:30 +0000 (17:03 -0700)
committerJakub Kicinski <kuba@kernel.org>
Thu, 17 Jul 2025 23:13:59 +0000 (16:13 -0700)
commit2f70251112ec412b6edf9769b2f9dd572145f38b
treee67d694192833e6d8f9945d1f7dc51a9eb5b1b3d
parentd3e2c7bab12409e87bd6b20505c19f5532a727db
ethtool: rss: support setting flow hashing fields

Add support for ETHTOOL_SRXFH (setting hashing fields) in RSS_SET.

The tricky part is dealing with symmetric hashing. In netlink user
can change the hashing fields and symmetric hash in one request,
in IOCTL the two used to be set via different uAPI requests.
Since fields and hash function config are still separate driver
callbacks - changes to the two are not atomic. Keep things simple
and validate the settings against both pre- and post- change ones.
Meaning that we will reject the config request if user tries
to correct the flow fields and set input_xfrm in one request,
or disables input_xfrm and makes flow fields non-symmetric.

We can adjust it later if there's a real need. Starting simple feels
right, and potentially partially applying the settings isn't nice,
either.

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