From patchwork Thu Feb 26 14:40:36 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Aleksandr Loktionov X-Patchwork-Id: 2201639 X-Patchwork-Delegate: anthony.l.nguyen@intel.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=osuosl.org header.i=@osuosl.org header.a=rsa-sha256 header.s=default header.b=hjRVzBGs; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=osuosl.org (client-ip=2605:bc80:3010::138; helo=smtp1.osuosl.org; envelope-from=intel-wired-lan-bounces@osuosl.org; receiver=patchwork.ozlabs.org) Received: from smtp1.osuosl.org (smtp1.osuosl.org [IPv6:2605:bc80:3010::138]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4fMDf85hX0z1xyR for ; Fri, 27 Feb 2026 01:40:47 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by smtp1.osuosl.org (Postfix) with ESMTP id 034588461C; Thu, 26 Feb 2026 14:40:45 +0000 (UTC) X-Virus-Scanned: amavis at osuosl.org Received: from smtp1.osuosl.org ([127.0.0.1]) by localhost (smtp1.osuosl.org [127.0.0.1]) (amavis, port 10024) with ESMTP id kfvU9wP2CAGf; Thu, 26 Feb 2026 14:40:44 +0000 (UTC) X-Comment: SPF check N/A for local connections - client-ip=140.211.166.142; helo=lists1.osuosl.org; envelope-from=intel-wired-lan-bounces@osuosl.org; receiver= DKIM-Filter: OpenDKIM Filter v2.11.0 smtp1.osuosl.org 6D90984620 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=osuosl.org; s=default; t=1772116844; bh=6Y0wu0m2S+xmvajj4wnruotNKsfdEgel5Qle4IIau5c=; h=From:To:Date:In-Reply-To:References:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=hjRVzBGsprkyKblD6Uj+oWlpfYRpKpr3mWDGOuaQdSQEVZbpFtaM7nfkKLJS5U789 ZUrYKikKg7h9DL3U1KVtOYYNZ3blTSerjKrSdJ4/ELafw+gXpPQIm4pI/qbdABFXPQ ZBKha2JilgYI3Z808ygdTOyhQvvknyD1afvKHQ2+A2ViZfkgv60jqOZQPEm+NZ21q7 YbibXUwfnmTduougmnk3SjMV8oTjs+ARW5JS5W+M58NeLdJogmTH1AuvT01qGbntTR VKO2xJxC0xeW6flq2myM98ZbCvRRP6KOoKYjY6cPpHGOz9YqAr1MV3vlKrdEK2R7DL XY0/gQh038oCA== Received: from lists1.osuosl.org (lists1.osuosl.org [140.211.166.142]) by smtp1.osuosl.org (Postfix) with ESMTP id 6D90984620; Thu, 26 Feb 2026 14:40:44 +0000 (UTC) X-Original-To: intel-wired-lan@lists.osuosl.org Delivered-To: intel-wired-lan@lists.osuosl.org Received: from smtp1.osuosl.org (smtp1.osuosl.org [140.211.166.138]) by lists1.osuosl.org (Postfix) with ESMTP id 13F9324E for ; Thu, 26 Feb 2026 14:40:43 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp1.osuosl.org (Postfix) with ESMTP id 05A4E844E3 for ; Thu, 26 Feb 2026 14:40:43 +0000 (UTC) X-Virus-Scanned: amavis at osuosl.org Received: from smtp1.osuosl.org ([127.0.0.1]) by localhost (smtp1.osuosl.org [127.0.0.1]) (amavis, port 10024) with ESMTP id ybbcONFJDO43 for ; Thu, 26 Feb 2026 14:40:42 +0000 (UTC) Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=198.175.65.15; helo=mgamail.intel.com; envelope-from=aleksandr.loktionov@intel.com; receiver= DMARC-Filter: OpenDMARC Filter v1.4.2 smtp1.osuosl.org 0FF048446D DKIM-Filter: OpenDKIM Filter v2.11.0 smtp1.osuosl.org 0FF048446D Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.15]) by smtp1.osuosl.org (Postfix) with ESMTPS id 0FF048446D for ; Thu, 26 Feb 2026 14:40:41 +0000 (UTC) X-CSE-ConnectionGUID: FRwcdvdxREmZif6aIROdhA== X-CSE-MsgGUID: VZNZQvceQi+6QTkG/ZyowA== X-IronPort-AV: E=McAfee;i="6800,10657,11713"; a="76784553" X-IronPort-AV: E=Sophos;i="6.21,312,1763452800"; d="scan'208";a="76784553" Received: from orviesa001.jf.intel.com ([10.64.159.141]) by orvoesa107.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 26 Feb 2026 06:40:42 -0800 X-CSE-ConnectionGUID: luwEjM4mTsypoBisDCqIQA== X-CSE-MsgGUID: lLHXtRN8TSOl5auMnhd5YA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.21,312,1763452800"; d="scan'208";a="254353837" Received: from amlin-019-225.igk.intel.com ([10.102.19.225]) by orviesa001.jf.intel.com with ESMTP; 26 Feb 2026 06:40:41 -0800 From: Aleksandr Loktionov To: intel-wired-lan@lists.osuosl.org, netdev@vger.kernel.org, anthony.l.nguyen@intel.com, aleksandr.loktionov@intel.com Date: Thu, 26 Feb 2026 15:40:36 +0100 Message-ID: <20260226144037.400815-2-aleksandr.loktionov@intel.com> X-Mailer: git-send-email 2.52.0 In-Reply-To: <20260226144037.400815-1-aleksandr.loktionov@intel.com> References: <20260226144037.400815-1-aleksandr.loktionov@intel.com> MIME-Version: 1.0 X-Mailman-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1772116842; x=1803652842; h=from:to:subject:date:message-id:in-reply-to:references: mime-version:content-transfer-encoding; bh=t0chq214HkHrpgpq/8q/aGOsHgiMN8Wk/jEfJVeixCU=; b=mPKhaFIycq+sweakqCAzRrzTT1gJ1fB3UI7X9kANITRfBB350uIKqKpY 0xfgImm4RHvy/rWsAwny4GIZYIbVmDBYStwdKGYC4B6lY2v8hQBHd18n7 gmFRPq8myXQcoHckq4s9iNE2ig48k56r3LXnQrx3iIInQ+eSiC9q2IX79 y6NUmwp0zprXtw2FThT7735UKbbMWbB7Hu9/mz/sCmbw3bNSdbcITSQIh w+UBBc1zdEJmNk4O/3zFoNXDxwmpah6XGS889nK12733FBT9wrjdL1Ns3 a1gqtrDtdFJaCSIKY1/CFJjqdAHLq/iMN9+bMnfBUeRiS9uGL9EBX9Y9p A==; X-Mailman-Original-Authentication-Results: smtp1.osuosl.org; dmarc=pass (p=none dis=none) header.from=intel.com X-Mailman-Original-Authentication-Results: smtp1.osuosl.org; dkim=pass (2048-bit key, unprotected) header.d=intel.com header.i=@intel.com header.a=rsa-sha256 header.s=Intel header.b=mPKhaFIy Subject: [Intel-wired-lan] [PATCH iwl-next v4 1/2] ethtool: treat RXH_GTP_TEID as intrinsically symmetric X-BeenThere: intel-wired-lan@osuosl.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Intel Wired Ethernet Linux Kernel Driver Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: intel-wired-lan-bounces@osuosl.org Sender: "Intel-wired-lan" A GTP tunnel uses the same TEID value in both directions of a flow; including TEID in the hash input does not break src/dst symmetry. ethtool_rxfh_config_is_sym() currently rejects any hash field bitmap that contains bits outside the four paired L3/L4 fields. This causes drivers that hash GTP flows on TEID to fail the kernel's preflight validation in ethtool_check_flow_types(), making it impossible for those drivers to support symmetric-xor transforms at all. Strip RXH_GTP_TEID from the bitmap before the paired-field check so that drivers may honestly report TEID hashing without blocking the configuration of symmetric transforms. Signed-off-by: Aleksandr Loktionov --- net/ethtool/common.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/net/ethtool/common.c b/net/ethtool/common.c index 5fae329..9a3fd76 100644 --- a/net/ethtool/common.c +++ b/net/ethtool/common.c @@ -911,6 +911,9 @@ int ethtool_rxfh_config_is_sym(u64 rxfh) { bool sym; + /* Strip TEID before checking - it carries no src/dst asymmetry */ + rxfh &= ~(u64)RXH_GTP_TEID; + sym = rxfh == (rxfh & (RXH_IP_SRC | RXH_IP_DST | RXH_L4_B_0_1 | RXH_L4_B_2_3)); sym &= !!(rxfh & RXH_IP_SRC) == !!(rxfh & RXH_IP_DST); From patchwork Thu Feb 26 14:40:37 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Aleksandr Loktionov X-Patchwork-Id: 2201641 X-Patchwork-Delegate: anthony.l.nguyen@intel.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=osuosl.org header.i=@osuosl.org header.a=rsa-sha256 header.s=default header.b=JFDvmZUG; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=osuosl.org (client-ip=140.211.166.136; helo=smtp3.osuosl.org; envelope-from=intel-wired-lan-bounces@osuosl.org; receiver=patchwork.ozlabs.org) Received: from smtp3.osuosl.org (smtp3.osuosl.org [140.211.166.136]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4fMDfD1034z1xy2 for ; Fri, 27 Feb 2026 01:40:52 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by smtp3.osuosl.org (Postfix) with ESMTP id CD7A961614; Thu, 26 Feb 2026 14:40:46 +0000 (UTC) X-Virus-Scanned: amavis at osuosl.org Received: from smtp3.osuosl.org ([127.0.0.1]) by localhost (smtp3.osuosl.org [127.0.0.1]) (amavis, port 10024) with ESMTP id Y_qYKzm_oWiy; Thu, 26 Feb 2026 14:40:46 +0000 (UTC) X-Comment: SPF check N/A for local connections - client-ip=140.211.166.142; helo=lists1.osuosl.org; envelope-from=intel-wired-lan-bounces@osuosl.org; receiver= DKIM-Filter: OpenDKIM Filter v2.11.0 smtp3.osuosl.org 085666160C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=osuosl.org; s=default; t=1772116846; bh=qARHnqKk21MZqDhxGiWzpYM25hqDkzr2N+z5D2rSXqI=; h=From:To:Date:In-Reply-To:References:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=JFDvmZUGKcCz8F+ZLbcZ1kSHNMepoTwjgTlNVIc7ucv4BtBR4mx9u6QNS4za1irq0 e6c9+/ht4svfnxQpp0JYcnFPt5p1TTToSkjIygD9ZHmUyA4HGZwARZP0jpib4Jv4XS DnPnLGhOXu7FEMWsvwJ8iss3EMWu1OgiYmjUGXNfh6Sm77URX549ZHSZGf0lgCMzq9 JW7P4mzrGdLO8uGm2yB9giN6QN1uv3ksNCNhIuUEY2MVuyWNfYeqxF2IGxsiP/yCug FcIjWdAjtGovCC88nVfX/OZp+eNo3GCPk3mpKPmd3rQ8UHVJ56i32UHYuxkSqEln0A VzqmFq6koeFSw== Received: from lists1.osuosl.org (lists1.osuosl.org [140.211.166.142]) by smtp3.osuosl.org (Postfix) with ESMTP id 085666160C; Thu, 26 Feb 2026 14:40:46 +0000 (UTC) X-Original-To: intel-wired-lan@lists.osuosl.org Delivered-To: intel-wired-lan@lists.osuosl.org Received: from smtp1.osuosl.org (smtp1.osuosl.org [IPv6:2605:bc80:3010::138]) by lists1.osuosl.org (Postfix) with ESMTP id AA1A623D for ; Thu, 26 Feb 2026 14:40:44 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp1.osuosl.org (Postfix) with ESMTP id 9022C84623 for ; Thu, 26 Feb 2026 14:40:44 +0000 (UTC) X-Virus-Scanned: amavis at osuosl.org Received: from smtp1.osuosl.org ([127.0.0.1]) by localhost (smtp1.osuosl.org [127.0.0.1]) (amavis, port 10024) with ESMTP id oIq2R1naUeZA for ; Thu, 26 Feb 2026 14:40:43 +0000 (UTC) Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=198.175.65.15; helo=mgamail.intel.com; envelope-from=aleksandr.loktionov@intel.com; receiver= DMARC-Filter: OpenDMARC Filter v1.4.2 smtp1.osuosl.org 84C958446D DKIM-Filter: OpenDKIM Filter v2.11.0 smtp1.osuosl.org 84C958446D Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.15]) by smtp1.osuosl.org (Postfix) with ESMTPS id 84C958446D for ; Thu, 26 Feb 2026 14:40:43 +0000 (UTC) X-CSE-ConnectionGUID: hksXHY5DRkyf9zA/TYYqXw== X-CSE-MsgGUID: MVNMQJleS+iab+XNGTs+Ug== X-IronPort-AV: E=McAfee;i="6800,10657,11713"; a="76784557" X-IronPort-AV: E=Sophos;i="6.21,312,1763452800"; d="scan'208";a="76784557" Received: from orviesa001.jf.intel.com ([10.64.159.141]) by orvoesa107.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 26 Feb 2026 06:40:44 -0800 X-CSE-ConnectionGUID: ZaJK5DoUShOYUYGVGRiTcg== X-CSE-MsgGUID: jJiAsCLvQJmxDV65pFYD5Q== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.21,312,1763452800"; d="scan'208";a="254353841" Received: from amlin-019-225.igk.intel.com ([10.102.19.225]) by orviesa001.jf.intel.com with ESMTP; 26 Feb 2026 06:40:42 -0800 From: Aleksandr Loktionov To: intel-wired-lan@lists.osuosl.org, netdev@vger.kernel.org, anthony.l.nguyen@intel.com, aleksandr.loktionov@intel.com Date: Thu, 26 Feb 2026 15:40:37 +0100 Message-ID: <20260226144037.400815-3-aleksandr.loktionov@intel.com> X-Mailer: git-send-email 2.52.0 In-Reply-To: <20260226144037.400815-1-aleksandr.loktionov@intel.com> References: <20260226144037.400815-1-aleksandr.loktionov@intel.com> MIME-Version: 1.0 X-Mailman-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1772116844; x=1803652844; h=from:to:subject:date:message-id:in-reply-to:references: mime-version:content-transfer-encoding; bh=LFsIqutAzBuS+JuknBp9P19J4pCJ4Mbz6dWagWkuRNI=; b=VTrTdvqjx7jEYGTw6egCNGL8+JhazNKWVJzANydTfW02L8OVoXJXEDcU uLhP18NzxtYr1+SBpDD+p9VVKUHBzJxZRz+uP4lMb18T0rLn1JP/Xi2H8 o5om1RJZnCBvifnTC8XgEuxl+T5ePisto7KaY/CqgrNy905Nb9cp0XleP vFSW2EcpR/9Ktp1yGRBajEGtCZ/fQ3yK6zSYxylL/ggyWt4zdv3lslW0R OJ9dGFmRNrRcOUz6cE3bbSrg0GYj1j0N7ctQqW1gY7UB38N3zF5td91F0 lGcRBuRe7EeDcBZZBIW43wFYE5u6to9Q4RvQZpOnmOHWSp5WbbjeQ/k8x w==; X-Mailman-Original-Authentication-Results: smtp1.osuosl.org; dmarc=pass (p=none dis=none) header.from=intel.com X-Mailman-Original-Authentication-Results: smtp1.osuosl.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.a=rsa-sha256 header.s=Intel header.b=VTrTdvqj Subject: [Intel-wired-lan] [PATCH iwl-next v4 2/2] ice: implement symmetric RSS hash configuration X-BeenThere: intel-wired-lan@osuosl.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Intel Wired Ethernet Linux Kernel Driver Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: intel-wired-lan-bounces@osuosl.org Sender: "Intel-wired-lan" The driver advertises symmetric RSS support via supported_input_xfrm but ice_set_rxfh() always programmed plain Toeplitz regardless of the requested input_xfrm, making it impossible to actually enable symmetric hashing. Fix ice_set_rxfh() to honour rxfh->input_xfrm: program symmetric Toeplitz (ICE_AQ_VSI_Q_OPT_RSS_HASH_SYM_TPLZ) when RXH_XFRM_SYM_XOR is requested, revert to plain Toeplitz when the transform is cleared, and skip the hardware write when the function has not changed. Make ice_set_rss_vsi_ctx() non-static and export it so ice_set_rxfh() can reprogram the VSI context directly. Change it to preserve vsi->rss_hfunc across VSI reinitialisation instead of always resetting to plain Toeplitz, which would silently undo any previously configured symmetric hash function. Fix ice_get_rxfh_fields() to report the hash fields actually programmed in hardware. When the hardware hashes on only one half of an L3 or L4 pair, complete the pair in the reported bitmap to satisfy the kernel's symmetry validator. For GTP flow types, report RXH_GTP_TEID honestly; ethtool_rxfh_config_is_sym() now accepts TEID as an intrinsically symmetric field (see preceding patch). Tested with tools/testing/selftests/drivers/net/hw/rss_input_xfrm.py Signed-off-by: Aleksandr Loktionov --- drivers/net/ethernet/intel/ice/ice_ethtool.c | 40 ++++++++++++++++---- drivers/net/ethernet/intel/ice/ice_lib.c | 7 ++-- drivers/net/ethernet/intel/ice/ice_lib.h | 1 + 3 files changed, 37 insertions(+), 11 deletions(-) diff --git a/drivers/net/ethernet/intel/ice/ice_ethtool.c b/drivers/net/ethernet/intel/ice/ice_ethtool.c index c6bc29c..6ccfe36 100644 --- a/drivers/net/ethernet/intel/ice/ice_ethtool.c +++ b/drivers/net/ethernet/intel/ice/ice_ethtool.c @@ -3008,14 +3008,17 @@ ice_set_rxfh_fields(struct net_device *netdev, return 0; } +#define ICE_RSS_L3_PAIR (RXH_IP_SRC | RXH_IP_DST) +#define ICE_RSS_L4_PAIR (RXH_L4_B_0_1 | RXH_L4_B_2_3) + static int ice_get_rxfh_fields(struct net_device *netdev, struct ethtool_rxfh_fields *nfc) { struct ice_netdev_priv *np = netdev_priv(netdev); struct ice_vsi *vsi = np->vsi; struct ice_pf *pf = vsi->back; + u64 l3, l4, hash_flds; struct device *dev; - u64 hash_flds; bool symm; u32 hdrs; @@ -3067,6 +3070,13 @@ ice_get_rxfh_fields(struct net_device *netdev, struct ethtool_rxfh_fields *nfc) hash_flds & ICE_FLOW_HASH_FLD_GTPU_DWN_TEID) nfc->data |= (u64)RXH_GTP_TEID; + l3 = nfc->data & ICE_RSS_L3_PAIR; + l4 = nfc->data & ICE_RSS_L4_PAIR; + if (l3 && l3 != ICE_RSS_L3_PAIR) + nfc->data |= ICE_RSS_L3_PAIR; + if (l4 && l4 != ICE_RSS_L4_PAIR) + nfc->data |= ICE_RSS_L4_PAIR; + return 0; } @@ -3667,7 +3677,6 @@ ice_set_rxfh(struct net_device *netdev, struct ethtool_rxfh_param *rxfh, struct netlink_ext_ack *extack) { struct ice_netdev_priv *np = netdev_priv(netdev); - u8 hfunc = ICE_AQ_VSI_Q_OPT_RSS_HASH_TPLZ; struct ice_vsi *vsi = np->vsi; struct ice_pf *pf = vsi->back; struct device *dev; @@ -3689,13 +3698,28 @@ ice_set_rxfh(struct net_device *netdev, struct ethtool_rxfh_param *rxfh, return -EOPNOTSUPP; } - /* Update the VSI's hash function */ - if (rxfh->input_xfrm & RXH_XFRM_SYM_XOR) - hfunc = ICE_AQ_VSI_Q_OPT_RSS_HASH_SYM_TPLZ; + /* Handle RSS symmetric hash transformation */ + if (rxfh->input_xfrm != RXH_XFRM_NO_CHANGE) { + u8 new_hfunc; - err = ice_set_rss_hfunc(vsi, hfunc); - if (err) - return err; + if (rxfh->input_xfrm == RXH_XFRM_SYM_XOR) + new_hfunc = ICE_AQ_VSI_Q_OPT_RSS_HASH_SYM_TPLZ; + else if (!rxfh->input_xfrm) + new_hfunc = ICE_AQ_VSI_Q_OPT_RSS_HASH_TPLZ; + else + return -EOPNOTSUPP; + + if (new_hfunc != vsi->rss_hfunc) { + err = ice_set_rss_hfunc(vsi, new_hfunc); + if (err) { + netdev_err(netdev, "Failed to set RSS hash function\n"); + return err; + } + netdev_dbg(netdev, "RSS hash function: %sToeplitz\n", + new_hfunc == ICE_AQ_VSI_Q_OPT_RSS_HASH_SYM_TPLZ ? + "Symmetric " : ""); + } + } if (rxfh->key) { if (!vsi->rss_hkey_user) { diff --git a/drivers/net/ethernet/intel/ice/ice_lib.c b/drivers/net/ethernet/intel/ice/ice_lib.c index d921269..5b1934b 100644 --- a/drivers/net/ethernet/intel/ice/ice_lib.c +++ b/drivers/net/ethernet/intel/ice/ice_lib.c @@ -1155,7 +1155,7 @@ static void ice_set_fd_vsi_ctx(struct ice_vsi_ctx *ctxt, struct ice_vsi *vsi) * @ctxt: the VSI context being set * @vsi: the VSI being configured */ -static void ice_set_rss_vsi_ctx(struct ice_vsi_ctx *ctxt, struct ice_vsi *vsi) +void ice_set_rss_vsi_ctx(struct ice_vsi_ctx *ctxt, struct ice_vsi *vsi) { u8 lut_type, hash_type; struct device *dev; @@ -1181,8 +1181,9 @@ static void ice_set_rss_vsi_ctx(struct ice_vsi_ctx *ctxt, struct ice_vsi *vsi) return; } - hash_type = ICE_AQ_VSI_Q_OPT_RSS_HASH_TPLZ; - vsi->rss_hfunc = hash_type; + if (!vsi->rss_hfunc) + vsi->rss_hfunc = ICE_AQ_VSI_Q_OPT_RSS_HASH_TPLZ; + hash_type = vsi->rss_hfunc; ctxt->info.q_opt_rss = FIELD_PREP(ICE_AQ_VSI_Q_OPT_RSS_LUT_M, lut_type) | diff --git a/drivers/net/ethernet/intel/ice/ice_lib.h b/drivers/net/ethernet/intel/ice/ice_lib.h index 49454d98..29ba335 100644 --- a/drivers/net/ethernet/intel/ice/ice_lib.h +++ b/drivers/net/ethernet/intel/ice/ice_lib.h @@ -46,6 +46,7 @@ void ice_vsi_delete(struct ice_vsi *vsi); int ice_vsi_cfg_tc(struct ice_vsi *vsi, u8 ena_tc); int ice_vsi_cfg_rss_lut_key(struct ice_vsi *vsi); +void ice_set_rss_vsi_ctx(struct ice_vsi_ctx *ctxt, struct ice_vsi *vsi); void ice_vsi_cfg_netdev_tc(struct ice_vsi *vsi, u8 ena_tc);