]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
ethtool: rss: don't report key if device doesn't support it
authorJakub Kicinski <kuba@kernel.org>
Sat, 10 Aug 2024 05:37:22 +0000 (22:37 -0700)
committerDavid S. Miller <davem@davemloft.net>
Mon, 12 Aug 2024 13:16:24 +0000 (14:16 +0100)
commitec6e57beaf8bc64ea0c2dc0cc360afcc7f504425
treedc9c2f0c0521bbf54d7fdb8ff8a5bee4fcb5c92c
parentfb770fe7584fb855620216193a34c6fb81830aa6
ethtool: rss: don't report key if device doesn't support it

marvell/otx2 and mvpp2 do not support setting different
keys for different RSS contexts. Contexts have separate
indirection tables but key is shared with all other contexts.
This is likely fine, indirection table is the most important
piece.

Don't report the key-related parameters from such drivers.
This prevents driver-errors, e.g. otx2 always writes
the main key, even when user asks to change per-context key.
The second reason is that without this change tracking
the keys by the core gets complicated. Even if the driver
correctly reject setting key with rss_context != 0,
change of the main key would have to be reflected in
the XArray for all additional contexts.

Since the additional contexts don't have their own keys
not including the attributes (in Netlink speak) seems
intuitive. ethtool CLI seems to deal with it just fine.

Having to set the flag in majority of the drivers is
a bit tedious but not reporting the key is a safer
default.

Reviewed-by: Edward Cree <ecree.xilinx@gmail.com>
Reviewed-by: Joe Damato <jdamato@fastly.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c
drivers/net/ethernet/intel/ice/ice_ethtool.c
drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c
drivers/net/ethernet/sfc/ef100_ethtool.c
drivers/net/ethernet/sfc/ethtool.c
include/linux/ethtool.h
net/ethtool/ioctl.c
net/ethtool/rss.c