intel-wired-lan.osuosl.org archive mirror
 help / color / mirror / Atom feed
* [Intel-wired-lan] [PATCH iwl-next 0/1] ice: Fix persistent failure in ice_get_rxfh
@ 2025-12-03 18:49 Cody Haas
  2025-12-03 18:49 ` [Intel-wired-lan] [PATCH iwl-next 1/1] " Cody Haas
  0 siblings, 1 reply; 6+ messages in thread
From: Cody Haas @ 2025-12-03 18:49 UTC (permalink / raw)
  To: intel-wired-lan
  Cc: anthony.l.nguyen, przemyslaw.kitszel, andrew+netdev, davem, kuba,
	pabeni, Cody Haas

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.50.0


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2025-12-12 18:04 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-12-03 18:49 [Intel-wired-lan] [PATCH iwl-next 0/1] ice: Fix persistent failure in ice_get_rxfh Cody Haas
2025-12-03 18:49 ` [Intel-wired-lan] [PATCH iwl-next 1/1] " Cody Haas
2025-12-05 10:36   ` Przemek Kitszel
2025-12-10  0:57     ` Cody Haas
2025-12-09  8:51   ` Dawid Osuchowski
2025-12-12 18:03     ` Cody Haas

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).