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 58F8BA0A04 for ; Mon, 18 Jan 2021 09:28:14 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 4E7C9140D59; Mon, 18 Jan 2021 09:28:14 +0100 (CET) Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by mails.dpdk.org (Postfix) with ESMTP id 93055140D22; Mon, 18 Jan 2021 09:28:11 +0100 (CET) IronPort-SDR: RV9C6yBdbCb7F5msVhfgjq4flUIzVPZelzeWrew81aqsPCzqQJ1AO+YeiVtKppbqAi3vbRFdgb 8v668s12MZcA== X-IronPort-AV: E=McAfee;i="6000,8403,9867"; a="197467570" X-IronPort-AV: E=Sophos;i="5.79,355,1602572400"; d="scan'208";a="197467570" Received: from orsmga001.jf.intel.com ([10.7.209.18]) by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 Jan 2021 00:28:08 -0800 IronPort-SDR: LZPVwcDbuyA1QXI1fl4G47vWveSIKIlYR7P4L/dLMcNlYS95OA6cbKFepKK0QEJB1hi+JcsbDt Em8pUnsZ4dPw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.79,355,1602572400"; d="scan'208";a="426063727" Received: from dpdk-xuanding-dev2.sh.intel.com ([10.67.119.124]) by orsmga001.jf.intel.com with ESMTP; 18 Jan 2021 00:28:05 -0800 From: Xuan Ding To: qi.z.zhang@intel.com, jingjing.wu@intel.com, beilei.xing@intel.com Cc: dev@dpdk.org, Xuan Ding , stable@dpdk.org Date: Mon, 18 Jan 2021 08:15:06 +0000 Message-Id: <20210118081506.107794-1-xuan.ding@intel.com> X-Mailer: git-send-email 2.17.1 Subject: [dpdk-stable] [PATCH] net/iavf: fix VIRTHCNL_OP_SET_RSS_HENA handling 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" Allow error to be returned for VIRTCHNL_OP_SET_RSS_HENA when set hena = 0. Add warning that PF doesnot support hena = 0 now. Fixes: 95f2f0e9fc2a6("net/iavf: improve default RSS") Cc: stable@dpdk.org Signed-off-by: Xuan Ding --- drivers/net/iavf/iavf_ethdev.c | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/drivers/net/iavf/iavf_ethdev.c b/drivers/net/iavf/iavf_ethdev.c index e22c62ed00..46857875ea 100644 --- a/drivers/net/iavf/iavf_ethdev.c +++ b/drivers/net/iavf/iavf_ethdev.c @@ -1250,11 +1250,15 @@ iavf_dev_rss_hash_update(struct rte_eth_dev *dev, if (rss_conf->rss_hf == 0) return 0; - /* Overwritten default RSS. */ + /* Clear existing RSS. */ 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(ERR, "%s Remove rss vsi fail %d", - __func__, ret); + PMD_DRV_LOG(WARNING, "fail to clean existing RSS," + "lack PF support"); /* Set new RSS configuration. */ ret = iavf_rss_hash_set(adapter, rss_conf->rss_hf, true); @@ -2174,10 +2178,12 @@ iavf_dev_init(struct rte_eth_dev *eth_dev) /* Set hena = 0 to ask PF to cleanup all existing RSS. */ ret = iavf_set_hena(adapter, 0); - if (ret) { - PMD_DRV_LOG(ERR, "fail to disable default PF RSS"); - return ret; - } + if (ret) + /* It is a workaround, temporarily allow error to be returned + * due to possible lack of PF handling for hena = 0. + */ + PMD_DRV_LOG(WARNING, "fail to disable default RSS," + "lack PF support"); return 0; } -- 2.17.1