]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
ice: fix setting RSS VSI hash for E830
authorMarcin Szycik <marcin.szycik@linux.intel.com>
Wed, 6 May 2026 21:48:14 +0000 (14:48 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 1 Jun 2026 15:46:25 +0000 (17:46 +0200)
[ Upstream commit b3cda96feb60d91fe88d52b974ff110dcfa91239 ]

ice_set_rss_hfunc() performs a VSI update, in which it sets hashing
function, leaving other VSI options unchanged. However, ::q_opt_flags is
mistakenly set to the value of another field, instead of its original
value, probably due to a typo. What happens next is hardware-dependent:

On E810, only the first bit is meaningful (see
ICE_AQ_VSI_Q_OPT_PE_FLTR_EN) and can potentially end up in a different
state than before VSI update.

On E830, some of the remaining bits are not reserved. Setting them
to some unrelated values can cause the firmware to reject the update
because of invalid settings, or worse - succeed.

Reproducer:
  sudo ethtool -X $PF1 equal 8

Output in dmesg:
  Failed to configure RSS hash for VSI 6, error -5

Fixes: 352e9bf23813 ("ice: enable symmetric-xor RSS for Toeplitz hash function")
Reviewed-by: Aleksandr Loktionov <aleksandr.loktionov@intel.com>
Reviewed-by: Przemek Kitszel <przemyslaw.kitszel@intel.com>
Signed-off-by: Marcin Szycik <marcin.szycik@linux.intel.com>
Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
Link: https://patch.msgid.link/20260506-jk-iwl-net-2026-05-04-v2-5-a5ea4dc837a9@intel.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/ethernet/intel/ice/ice_main.c

index 2a629b9a9e03a2a2b2b178287b85daac1da825cc..664bedfbd80545aad375bf8aa92f97c95e4d8656 100644 (file)
@@ -8108,7 +8108,7 @@ int ice_set_rss_hfunc(struct ice_vsi *vsi, u8 hfunc)
        ctx->info.q_opt_rss |=
                FIELD_PREP(ICE_AQ_VSI_Q_OPT_RSS_HASH_M, hfunc);
        ctx->info.q_opt_tc = vsi->info.q_opt_tc;
-       ctx->info.q_opt_flags = vsi->info.q_opt_rss;
+       ctx->info.q_opt_flags = vsi->info.q_opt_flags;
 
        err = ice_update_vsi(hw, vsi->idx, ctx, NULL);
        if (err) {