summaryrefslogtreecommitdiffstats
path: root/net/ethtool/ioctl.c
diff options
context:
space:
mode:
authorDaniel Zahka <daniel.zahka@gmail.com>2024-10-03 18:23:10 +0200
committerJakub Kicinski <kuba@kernel.org>2024-10-04 21:34:13 +0200
commit5c2ab978f9c90384198000a032d10382f44c3530 (patch)
tree5502d5e4c587c57ac959f0f55e82927a6d9e3342 /net/ethtool/ioctl.c
parentMerge branch '100GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/... (diff)
downloadlinux-5c2ab978f9c90384198000a032d10382f44c3530.tar.xz
linux-5c2ab978f9c90384198000a032d10382f44c3530.zip
ethtool: rss: fix rss key initialization warning
This warning is emitted when a driver does not default populate an rss key when one is not provided from userspace. Some devices do not support individual rss keys per context. For these devices, it is ok to leave the key zeroed out in ethtool_rxfh_context. Do not warn on zeroed key when ethtool_ops.rxfh_per_ctx_key == 0. Signed-off-by: Daniel Zahka <daniel.zahka@gmail.com> Link: https://patch.msgid.link/20241003162310.1310576-1-daniel.zahka@gmail.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to '')
-rw-r--r--net/ethtool/ioctl.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/net/ethtool/ioctl.c b/net/ethtool/ioctl.c
index 65cfe76dafbe..04b34dc6b369 100644
--- a/net/ethtool/ioctl.c
+++ b/net/ethtool/ioctl.c
@@ -1505,6 +1505,7 @@ static noinline_for_stack int ethtool_set_rxfh(struct net_device *dev,
extack);
/* Make sure driver populates defaults */
WARN_ON_ONCE(!ret && !rxfh_dev.key &&
+ ops->rxfh_per_ctx_key &&
!memchr_inv(ethtool_rxfh_context_key(ctx),
0, ctx->key_size));
} else if (rxfh_dev.rss_delete) {