From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 82227A054F for ; Mon, 15 Mar 2021 02:14:49 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 56B7F4003C; Mon, 15 Mar 2021 02:14:49 +0100 (CET) Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by mails.dpdk.org (Postfix) with ESMTP id BA5A24003C; Mon, 15 Mar 2021 02:14:47 +0100 (CET) IronPort-SDR: PXx5prZ7VHmJ5wT60XyXU72FFEz1IaXC25sGTZ2QzIsM2h7kIqcsD3Y/PUtTrX3xhrIsh1huK7 EKBoCUkRSdpg== X-IronPort-AV: E=McAfee;i="6000,8403,9923"; a="208913049" X-IronPort-AV: E=Sophos;i="5.81,249,1610438400"; d="scan'208";a="208913049" Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 14 Mar 2021 18:14:46 -0700 IronPort-SDR: xil583W44lXPcC/7+l5ck/8V3KoYNeIUlB3OR7bIkq+yRq0rrvmSkjN87pCmDN3Hfw52oTr9zu JNiqZppZjtqQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.81,249,1610438400"; d="scan'208";a="601256893" Received: from wuwenjun.sh.intel.com ([10.67.110.153]) by fmsmga006.fm.intel.com with ESMTP; 14 Mar 2021 18:14:45 -0700 From: Wenjun Wu To: dev@dpdk.org, jingjing.wu@intel.com, beilei.xing@intel.com Cc: Wenjun Wu , stable@dpdk.org Date: Mon, 15 Mar 2021 08:59:53 +0800 Message-Id: <20210315005953.32112-1-wenjun1.wu@intel.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210305060424.21917-1> References: <20210305060424.21917-1> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-stable] [PATCH v4] net/iavf: fix wrong RSS hash update X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Sender: "stable" This patch change judgment statements to disable RSS for vf when users need to disable RSS or RSS hash function configured is not supported. Fixes: 95f2f0e9fc2a ("net/iavf: improve default RSS") Cc: stable@dpdk.org Signed-off-by: Wenjun Wu --- v4: clear existing RSS when rss_hf = 0. v3: fix the same issue for both pf and vf. --- drivers/net/iavf/iavf_ethdev.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/drivers/net/iavf/iavf_ethdev.c b/drivers/net/iavf/iavf_ethdev.c index 4d3772202..8610efba6 100644 --- a/drivers/net/iavf/iavf_ethdev.c +++ b/drivers/net/iavf/iavf_ethdev.c @@ -1250,8 +1250,17 @@ iavf_dev_rss_hash_update(struct rte_eth_dev *dev, if (ret) return ret; - if (rss_conf->rss_hf == 0) + if (rss_conf->rss_hf == 0) { + vf->rss_hf = 0; + ret = iavf_set_hena(adapter, 0); + + /* It is a workaround, temporarily allow error to be returned + * due to possible lack of PF handling for hena = 0. + */ + if (ret) + PMD_DRV_LOG(WARNING, "fail to clean existing RSS, lack PF support"); return 0; + } if (vf->vf_res->vf_cap_flags & VIRTCHNL_VF_OFFLOAD_ADV_RSS_PF) { /* Clear existing RSS. */ -- 2.25.1