]> www.infradead.org Git - users/hch/misc.git/commit
net: ethtool: fix ioctl confusing drivers about desired HDS user config
authorJakub Kicinski <kuba@kernel.org>
Fri, 21 Feb 2025 02:51:40 +0000 (18:51 -0800)
committerJakub Kicinski <kuba@kernel.org>
Mon, 24 Feb 2025 22:15:42 +0000 (14:15 -0800)
commitdb10fde5c4f96231e1d2bbfd01feb5f2f59b96d1
tree705b4dc2a417e4ec180d1e95c54fcfe9fdb78faa
parentf15176b8b6e72ac30e14fd273282d2b72562d26b
net: ethtool: fix ioctl confusing drivers about desired HDS user config

The legacy ioctl path does not have support for extended attributes.
So we issue a GET to fetch the current settings from the driver,
in an attempt to keep them unchanged. HDS is a bit "special" as
the GET only returns on/off while the SET takes a "ternary" argument
(on/off/default). If the driver was in the "default" setting -
executing the ioctl path binds it to on or off, even tho the user
did not intend to change HDS config.

Factor the relevant logic out of the netlink code and reuse it.

Fixes: 87c8f8496a05 ("bnxt_en: add support for tcp-data-split ethtool command")
Acked-by: Stanislav Fomichev <sdf@fomichev.me>
Tested-by: Daniel Xu <dxu@dxuuu.xyz>
Tested-by: Taehee Yoo <ap420073@gmail.com>
Link: https://patch.msgid.link/20250221025141.1132944-1-kuba@kernel.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
net/ethtool/common.c
net/ethtool/common.h
net/ethtool/ioctl.c
net/ethtool/rings.c