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-ukkjv8mly7zcdgcrge55whrhbgaxvgkdnwgiz9guzt...@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
