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 69624A0561; Fri, 5 Mar 2021 07:18:02 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id E69E522A2F0; Fri, 5 Mar 2021 07:18:01 +0100 (CET) Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by mails.dpdk.org (Postfix) with ESMTP id 2558840147; Fri, 5 Mar 2021 07:17:59 +0100 (CET) IronPort-SDR: Xd4gb/csrji2xhfd5z/rHdnl7PwTcCTI0sLrifThiaZbAtBIrNF2/k7zxLRwcrS5uIrvHhxeBE yAUvCDhy5v1w== X-IronPort-AV: E=McAfee;i="6000,8403,9913"; a="186933976" X-IronPort-AV: E=Sophos;i="5.81,224,1610438400"; d="scan'208";a="186933976" Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 04 Mar 2021 22:17:58 -0800 IronPort-SDR: x2IcxCsNYv5Ylr0HmrHg9XS/cvVk3lA3al6Xe6L1gTCA+tk6CFG7dzCfzLSUxKFw8bUaQ9oliX ooyzDyzypxeg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.81,224,1610438400"; d="scan'208";a="374820090" Received: from wuwenjun.sh.intel.com ([10.67.110.153]) by fmsmga007.fm.intel.com with ESMTP; 04 Mar 2021 22:17:57 -0800 From: Wenjun Wu To: dev@dpdk.org, qiming.yang@intel.com, qi.z.zhang@intel.com Cc: Wenjun Wu , stable@dpdk.org Date: Fri, 5 Mar 2021 14:03:24 +0800 Message-Id: <20210305060324.21835-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 Content-Transfer-Encoding: 8bit Subject: [dpdk-dev] [PATCH v3 1/2] net/ice: 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 pf when users need to disable RSS or RSS hash function configured is not supported. Fixes: 4717a12cfaf1 ("net/ice: initialize and update RSS based on user config") Cc: stable@dpdk.org Signed-off-by: Wenjun Wu --- v2: do pf->rss_hf = 0 when rss_conf->rss_hf == 0 instead of direct removal to avoid unnecessary judgment. v3: fix the same issue for both pf and vf. --- drivers/net/ice/ice_ethdev.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/net/ice/ice_ethdev.c b/drivers/net/ice/ice_ethdev.c index f43b2e0b2..299162286 100644 --- a/drivers/net/ice/ice_ethdev.c +++ b/drivers/net/ice/ice_ethdev.c @@ -4461,8 +4461,10 @@ ice_rss_hash_update(struct rte_eth_dev *dev, if (status) return status; - if (rss_conf->rss_hf == 0) + if (rss_conf->rss_hf == 0) { + pf->rss_hf = 0; return 0; + } /* RSS hash configuration */ ice_rss_hash_set(pf, rss_conf->rss_hf); -- 2.25.1