From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from smtp3.osuosl.org (smtp3.osuosl.org [140.211.166.136]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 7F86FCFD313 for ; Mon, 24 Nov 2025 18:48:33 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp3.osuosl.org (Postfix) with ESMTP id 4E50A60A99; Mon, 24 Nov 2025 18:48:33 +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 ljdMhe52pG4i; Mon, 24 Nov 2025 18:48:31 +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 ACF51608E0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=osuosl.org; s=default; t=1764010111; bh=JaOkMO3NBvF3PVNTR5WV9qoUn6tOY4xnn9TR0RflyUk=; h=From:To:Cc:Date:In-Reply-To:References:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=R4Fc5UUWjCH7nmxo4Zc5HjJeZF0uAj+Poy0xSFd0HJ5oGE81jnLk9j09LcGOreP3h KEiokhjllWXab9zDp4Dr7/MjEz9zDAUXbYIvT27gJX0jI+7UVtZzL5c7CU+JFKm3j6 DFhI0kuSkyT2Dt4ZCz6ENWIMdiJ7RqW9PFlFW2VUKrrwXM2wRR/8dSvxbst4AfgV+d ldYBU4oF8vXPKuCifOv3poLBaPy5JD58pwpMCk2PZAy9ZrxdUP1wZHmXV+QMiQ9PEq DcHQWuhrMMm12gOfzgTzyl0NdHZjWQd8l0G/gL2CpfWfgwv1EoVuYv8r/LD9vBjJLS SMCvCplJ7ZgGg== Received: from lists1.osuosl.org (lists1.osuosl.org [140.211.166.142]) by smtp3.osuosl.org (Postfix) with ESMTP id ACF51608E0; Mon, 24 Nov 2025 18:48:31 +0000 (UTC) Received: from smtp2.osuosl.org (smtp2.osuosl.org [IPv6:2605:bc80:3010::133]) by lists1.osuosl.org (Postfix) with ESMTP id A873934E for ; Mon, 24 Nov 2025 18:48:30 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp2.osuosl.org (Postfix) with ESMTP id A5D8840242 for ; Mon, 24 Nov 2025 18:48:30 +0000 (UTC) X-Virus-Scanned: amavis at osuosl.org Received: from smtp2.osuosl.org ([127.0.0.1]) by localhost (smtp2.osuosl.org [127.0.0.1]) (amavis, port 10024) with ESMTP id GKmkFeDvi-fn for ; Mon, 24 Nov 2025 18:48:29 +0000 (UTC) Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=198.175.65.11; helo=mgamail.intel.com; envelope-from=sreedevi.joshi@intel.com; receiver= DMARC-Filter: OpenDMARC Filter v1.4.2 smtp2.osuosl.org A539640078 DKIM-Filter: OpenDKIM Filter v2.11.0 smtp2.osuosl.org A539640078 Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.11]) by smtp2.osuosl.org (Postfix) with ESMTPS id A539640078 for ; Mon, 24 Nov 2025 18:48:28 +0000 (UTC) X-CSE-ConnectionGUID: IGFZw0BrTSaaXVN7uRuHWA== X-CSE-MsgGUID: bujOfiTURw+sz213NehtVw== X-IronPort-AV: E=McAfee;i="6800,10657,11623"; a="76341838" X-IronPort-AV: E=Sophos;i="6.20,223,1758610800"; d="scan'208";a="76341838" Received: from orviesa003.jf.intel.com ([10.64.159.143]) by orvoesa103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 24 Nov 2025 10:48:29 -0800 X-CSE-ConnectionGUID: BsOPzP+BStyKVzACB2JTmA== X-CSE-MsgGUID: B2cI28YNSXCTBE4hb+wBQA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.20,223,1758610800"; d="scan'208";a="196575008" Received: from aus-labsrv3.an.intel.com ([10.123.116.23]) by orviesa003.jf.intel.com with ESMTP; 24 Nov 2025 10:48:28 -0800 From: Sreedevi Joshi To: intel-wired-lan@lists.osuosl.org Cc: netdev@vger.kernel.org, Sreedevi Joshi , Aleksandr Loktionov , Sridhar Samudrala , Emil Tantilov Date: Mon, 24 Nov 2025 12:47:49 -0600 Message-Id: <20251124184750.3625097-3-sreedevi.joshi@intel.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20251124184750.3625097-1-sreedevi.joshi@intel.com> References: <20251124184750.3625097-1-sreedevi.joshi@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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=1764010110; x=1795546110; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=5FXsQs1lAU6pJyz8/irRopjoaZ3UazGSsZDK/mLRxKI=; b=ZE/RiWMIixJHB+Qh2Gr1LA86nFu35YtP9hxFeDaZa08mD82HY7gDXTQt of41nBQEyYdwBLdJg35Y0hiDcj0LMzeaertcx1o1jSMIyqzdGnZh7HoPq f9ulStk6fT8lsFV77GrNQTOI/K/hYgGqoOnKqq0TfaUu0Z8lZTm+kvqS9 0DDJKOe9avvLz5CXyEOkmcdACy6X/cEdfpK/PGp7o8A3SZbhEQN1RVDGl fbsLswloYimUlY743k/NrgzhWKFWP4mFD9BZDsoRLa+Iovw2hH1fDMcV6 aKcuhS/zfef38zuRkJ8WcIQeIZMbLuSx2k7KSUNkk2kQIbFDkII5yvp0l Q==; X-Mailman-Original-Authentication-Results: smtp2.osuosl.org; dmarc=pass (p=none dis=none) header.from=intel.com X-Mailman-Original-Authentication-Results: smtp2.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=ZE/RiWMI Subject: [Intel-wired-lan] [PATCH iwl-net v2 2/3] idpf: Fix RSS LUT configuration on down interfaces 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" RSS LUT provisioning and queries on a down interface currently return silently without effect. Users should be able to configure RSS settings even when the interface is down. Fix by maintaining RSS configuration changes in the driver's soft copy and deferring HW programming until the interface comes up. Fixes: 02cbfba1add5 ("idpf: add ethtool callbacks") Signed-off-by: Sreedevi Joshi Reviewed-by: Aleksandr Loktionov Reviewed-by: Sridhar Samudrala Reviewed-by: Emil Tantilov --- drivers/net/ethernet/intel/idpf/idpf_ethtool.c | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/drivers/net/ethernet/intel/idpf/idpf_ethtool.c b/drivers/net/ethernet/intel/idpf/idpf_ethtool.c index 4c6e52253ae4..eb807e89d91a 100644 --- a/drivers/net/ethernet/intel/idpf/idpf_ethtool.c +++ b/drivers/net/ethernet/intel/idpf/idpf_ethtool.c @@ -393,7 +393,10 @@ static u32 idpf_get_rxfh_indir_size(struct net_device *netdev) * @netdev: network interface device structure * @rxfh: pointer to param struct (indir, key, hfunc) * - * Reads the indirection table directly from the hardware. Always returns 0. + * RSS LUT and Key information are read from driver's cached + * copy. When rxhash is off, rss lut will be displayed as zeros. + * + * Return: 0 on success, -errno otherwise. */ static int idpf_get_rxfh(struct net_device *netdev, struct ethtool_rxfh_param *rxfh) @@ -401,10 +404,13 @@ static int idpf_get_rxfh(struct net_device *netdev, struct idpf_netdev_priv *np = netdev_priv(netdev); struct idpf_rss_data *rss_data; struct idpf_adapter *adapter; + struct idpf_vport *vport; + bool rxhash_ena; int err = 0; u16 i; idpf_vport_ctrl_lock(netdev); + vport = idpf_netdev_to_vport(netdev); adapter = np->adapter; @@ -414,9 +420,8 @@ static int idpf_get_rxfh(struct net_device *netdev, } rss_data = &adapter->vport_config[np->vport_idx]->user_config.rss_data; - if (np->state != __IDPF_VPORT_UP) - goto unlock_mutex; + rxhash_ena = idpf_is_feature_ena(vport, NETIF_F_RXHASH); rxfh->hfunc = ETH_RSS_HASH_TOP; if (rxfh->key) @@ -424,7 +429,7 @@ static int idpf_get_rxfh(struct net_device *netdev, if (rxfh->indir) { for (i = 0; i < rss_data->rss_lut_size; i++) - rxfh->indir[i] = rss_data->rss_lut[i]; + rxfh->indir[i] = rxhash_ena ? rss_data->rss_lut[i] : 0; } unlock_mutex: @@ -464,8 +469,6 @@ static int idpf_set_rxfh(struct net_device *netdev, } rss_data = &adapter->vport_config[vport->idx]->user_config.rss_data; - if (np->state != __IDPF_VPORT_UP) - goto unlock_mutex; if (rxfh->hfunc != ETH_RSS_HASH_NO_CHANGE && rxfh->hfunc != ETH_RSS_HASH_TOP) { @@ -481,6 +484,8 @@ static int idpf_set_rxfh(struct net_device *netdev, rss_data->rss_lut[lut] = rxfh->indir[lut]; } + if (np->state != __IDPF_VPORT_UP) + goto unlock_mutex; err = idpf_config_rss(vport); unlock_mutex: -- 2.43.0