[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20251213002226.556611-1-chaas@riotgames.com>
Date: Fri, 12 Dec 2025 16:22:25 -0800
From: Cody Haas <chaas@...tgames.com>
To: intel-wired-lan@...ts.osuosl.org
Cc: anthony.l.nguyen@...el.com,
przemyslaw.kitszel@...el.com,
andrew+netdev@...n.ch,
davem@...emloft.net,
kuba@...nel.org,
pabeni@...hat.com,
netdev@...r.kernel.org,
Cody Haas <chaas@...tgames.com>
Subject: [PATCH iwl-net v2 0/1] ice: Fix persistent failure in ice_get_rxfh
Hey all,
This is a small bug fix for an issue I found when testing some e810 NICs
on kernel 6.16.5-200.fc42.x86_64. I originally reported the bug in
https://lore.kernel.org/intel-wired-lan/CAH7f-UKkJV8MLY7zCdgCrGE55whRhbGAXvgkDnwgiZ9gUZT7_w@mail.gmail.com/
User Impact of the Bug
----------------------
In the current in-tree ice driver, if a user tries to get the
indirection table using the SIOCETHTOOL command and the
ETHTOOL_GRXFHINDIR subcommand the subsequent function call with always
fail with -EINVAL.
Cause of the Bug
----------------
When a user gets the indirection table using SIOCETHTOOL and ETHTOOL_GRXFHINDIR
ethtool_get_rxfh_indir is called. This function will end up calling
ice_get_rxfh which then calls ice_get_rss_key. The function
ice_get_rss_key expects its *seed parameter to never be null. This *seed
parameter is the key field in ethtool_rxfh_param. Neither ice_get_rxfh
nor ethtool_get_rxfh_indir set this value, so it will always be null.
This causes the *seed parameter for ice_get_rss_key to always be null,
ultimately causing ice_get_rss_key to always return -EINVAL.
Fix for the Bug
---------------
To fix this, I went ahead and implemented ice_get_rss which checks if
the rss_key is not null before calling ice_key_rss_key. This follows
suit with the i40e driver's implementation.
Cody Haas (1):
ice: Fix persistent failure in ice_get_rxfh
drivers/net/ethernet/intel/ice/ice.h | 1 +
drivers/net/ethernet/intel/ice/ice_ethtool.c | 6 +----
drivers/net/ethernet/intel/ice/ice_main.c | 28 ++++++++++++++++++++
3 files changed, 30 insertions(+), 5 deletions(-)
base-commit: 67181985211850332c8ff942815c1961fd7058b9
--
2.51.1
Powered by blists - more mailing lists