From patchwork Fri Mar 5 06:04:24 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wenjun Wu X-Patchwork-Id: 88503 X-Patchwork-Delegate: qi.z.zhang@intel.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 80C4FA0561; Fri, 5 Mar 2021 07:19:00 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 6BF3122A2F2; Fri, 5 Mar 2021 07:19:00 +0100 (CET) Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) by mails.dpdk.org (Postfix) with ESMTP id E529240147; Fri, 5 Mar 2021 07:18:58 +0100 (CET) IronPort-SDR: daf77C/RjxN6cpAf5YfI6z0yJhkmxPog9LEBw1hcDt3hDycyzUD3BOfpt7yZoqyZa9Hu7wzH+z 9asofmbzZn1A== X-IronPort-AV: E=McAfee;i="6000,8403,9913"; a="248971792" X-IronPort-AV: E=Sophos;i="5.81,224,1610438400"; d="scan'208";a="248971792" Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 04 Mar 2021 22:18:57 -0800 IronPort-SDR: th9Q96UIdChVo+7W7E2auHZWxVfGL+bMuDtGYvp1CQsrk3/vRUiwHdP7xts9wa9a/WpCOIhVY2 +nzkupsHd67A== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.81,224,1610438400"; d="scan'208";a="374820407" Received: from wuwenjun.sh.intel.com ([10.67.110.153]) by fmsmga007.fm.intel.com with ESMTP; 04 Mar 2021 22:18:56 -0800 From: Wenjun Wu To: dev@dpdk.org, jingjing.wu@intel.com, beilei.xing@intel.com Cc: Wenjun Wu , stable@dpdk.org Date: Fri, 5 Mar 2021 14:04:24 +0800 Message-Id: <20210305060424.21917-1-wenjun1.wu@intel.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210303075648.12399-1> References: <20210303075648.12399-1> MIME-Version: 1.0 Subject: [dpdk-dev] [PATCH v3 2/2] net/iavf: fix wrong RSS hash update X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 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 --- v3: fix the same issue for both pf and vf. --- drivers/net/iavf/iavf_ethdev.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/net/iavf/iavf_ethdev.c b/drivers/net/iavf/iavf_ethdev.c index 4d3772202..d2d950aa6 100644 --- a/drivers/net/iavf/iavf_ethdev.c +++ b/drivers/net/iavf/iavf_ethdev.c @@ -1250,8 +1250,10 @@ 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; return 0; + } if (vf->vf_res->vf_cap_flags & VIRTCHNL_VF_OFFLOAD_ADV_RSS_PF) { /* Clear existing RSS. */