From patchwork Mon Jan 18 08:28:26 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Ding, Xuan" X-Patchwork-Id: 86768 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 8C0D0A0A03; Mon, 18 Jan 2021 09:41:34 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 72B22140D9A; Mon, 18 Jan 2021 09:41:34 +0100 (CET) Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by mails.dpdk.org (Postfix) with ESMTP id 105FF140D97; Mon, 18 Jan 2021 09:41:31 +0100 (CET) IronPort-SDR: PiTgPKTN7awSaibAQip6kx7lAZKJ1O9l7cexCXHgtLMi0bhWXhoORGkpdktFhkmuVZ33cf4pQG ArGKMf61NM9w== X-IronPort-AV: E=McAfee;i="6000,8403,9867"; a="177997709" X-IronPort-AV: E=Sophos;i="5.79,355,1602572400"; d="scan'208";a="177997709" Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 Jan 2021 00:41:22 -0800 IronPort-SDR: kUeeMJCthZCpXOAKC1GcmSxUBrpVAUsjJGrnFHyfb5FhS5sm9pVl5Nfk7Rp64uau9NnqAkG7pq aABjK9WP91mg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.79,355,1602572400"; d="scan'208";a="355113244" Received: from dpdk-xuanding-dev2.sh.intel.com ([10.67.119.124]) by fmsmga008.fm.intel.com with ESMTP; 18 Jan 2021 00:41:20 -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:28:26 +0000 Message-Id: <20210118082826.1261-1-xuan.ding@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20210118081506.107794-1-xuan.ding@intel.com> References: <20210118081506.107794-1-xuan.ding@intel.com> Subject: [dpdk-dev] [PATCH v2] net/iavf: fix VIRTHCNL_OP_SET_RSS_HENA handling 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" Allow error to be returned for VIRTCHNL_OP_SET_RSS_HENA when set hena = 0. Add warning that PF does not support hena = 0 now. Fixes: 95f2f0e9fc2a6("net/iavf: improve default RSS") Cc: stable@dpdk.org Signed-off-by: Xuan Ding --- v2: * Modify the commit log to avoid a spelling error. --- 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; }