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 45B3AA0C47; Sun, 25 Jul 2021 12:09:58 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id C03CD40DDE; Sun, 25 Jul 2021 12:09:57 +0200 (CEST) Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by mails.dpdk.org (Postfix) with ESMTP id 4ED6040DDA; Sun, 25 Jul 2021 12:09:55 +0200 (CEST) X-IronPort-AV: E=McAfee;i="6200,9189,10055"; a="199284491" X-IronPort-AV: E=Sophos;i="5.84,266,1620716400"; d="scan'208";a="199284491" Received: from orsmga006.jf.intel.com ([10.7.209.51]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 25 Jul 2021 03:09:54 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.84,266,1620716400"; d="scan'208";a="416266994" Received: from fmsmsx605.amr.corp.intel.com ([10.18.126.85]) by orsmga006.jf.intel.com with ESMTP; 25 Jul 2021 03:09:54 -0700 Received: from shsmsx601.ccr.corp.intel.com (10.109.6.141) by fmsmsx605.amr.corp.intel.com (10.18.126.85) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2242.4; Sun, 25 Jul 2021 03:09:53 -0700 Received: from shsmsx601.ccr.corp.intel.com (10.109.6.141) by SHSMSX601.ccr.corp.intel.com (10.109.6.141) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2242.10; Sun, 25 Jul 2021 18:09:51 +0800 Received: from shsmsx601.ccr.corp.intel.com ([10.109.6.141]) by SHSMSX601.ccr.corp.intel.com ([10.109.6.141]) with mapi id 15.01.2242.010; Sun, 25 Jul 2021 18:09:51 +0800 From: "Zhang, Qi Z" To: "Zhang, AlvinX" , "Xing, Beilei" CC: "dev@dpdk.org" , "Zhang, AlvinX" , "stable@dpdk.org" Thread-Topic: [dpdk-dev] [PATCH] net/iavf: fix virtual channel RSS command error handling Thread-Index: AQHXffo0rIIzcm9+1EKu3vgSPF6AxqtTfGKg Date: Sun, 25 Jul 2021 10:09:51 +0000 Message-ID: <39d4dda4c17f4de3b64d022a74b45ba2@intel.com> References: <20210721063209.9724-1-alvinx.zhang@intel.com> In-Reply-To: <20210721063209.9724-1-alvinx.zhang@intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-reaction: no-action dlp-version: 11.5.1.3 dlp-product: dlpe-windows x-originating-ip: [10.239.127.36] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] [PATCH] net/iavf: fix virtual channel RSS command error 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" > -----Original Message----- > From: dev On Behalf Of Alvin Zhang > Sent: Wednesday, July 21, 2021 2:32 PM > To: Xing, Beilei > Cc: dev@dpdk.org; Zhang, AlvinX ; stable@dpdk.org > Subject: [dpdk-dev] [PATCH] net/iavf: fix virtual channel RSS command err= or > handling >=20 > Kernel PF may not respond to virtual channel commands > VIRTCHNL_OP_GET_RSS_HENA_CAPS and VIRTCHNL_OP_SET_RSS_HENA, > which will cause VF to fail to start. >=20 > RSS offload type configuration is not a necessary feature for VF, so in o= rder to > improve VF compatibility, in this patch the PMD will ignore the error res= ult of > above two commands and will print warnings instead. >=20 > Fixes: 5a038d19962d ("net/iavf: fix RSS configuration on i40e VF") > Cc: stable@dpdk.org >=20 > Signed-off-by: Alvin Zhang > --- > drivers/net/iavf/iavf_ethdev.c | 26 ++++++++++++++------------ > 1 file changed, 14 insertions(+), 12 deletions(-) >=20 > diff --git a/drivers/net/iavf/iavf_ethdev.c b/drivers/net/iavf/iavf_ethde= v.c index > 41382c6..162f55d 100644 > --- a/drivers/net/iavf/iavf_ethdev.c > +++ b/drivers/net/iavf/iavf_ethdev.c > @@ -259,7 +259,7 @@ struct rte_iavf_xstats_name_off { > return err; > } >=20 > -static int > +static void > iavf_config_rss_hf(struct iavf_adapter *adapter, uint64_t rss_hf) { > static const uint64_t map_hena_rss[] =3D { @@ -319,8 +319,12 @@ struct > rte_iavf_xstats_name_off { > int ret; >=20 > ret =3D iavf_get_hena_caps(adapter, &caps); > - if (ret) > - return ret; > + if (ret) { > + PMD_DRV_LOG(WARNING, > + "fail to get supported RSS caps, lack PF support"); This is misleading, the failure reason is not necessary be "lack PF support= ', it could be any other reason So better just print the error code here, or simply ignore if a meaningful = failure message will already be printed inside iavf_get_hena_caps. > + return; > + } > + > /** > * ETH_RSS_IPV4 and ETH_RSS_IPV6 can be considered as 2 > * generalizations of all other IPv4 and IPv6 RSS types. > @@ -343,8 +347,11 @@ struct rte_iavf_xstats_name_off { > } >=20 > ret =3D iavf_set_hena(adapter, hena); > - if (ret) > - return ret; > + if (ret) { > + PMD_DRV_LOG(WARNING, > + "fail to clean existing RSS, lack PF support"); Actually this is not the case to "clean" but "overwrite", also the "lack PF= support" should be refined base on previous comments. > + return; > + } >=20 > if (valid_rss_hf & ipv4_rss) > valid_rss_hf |=3D rss_hf & ETH_RSS_IPV4; @@ -357,7 +364,6 @@ > struct rte_iavf_xstats_name_off { > rss_hf & ~valid_rss_hf); >=20 > vf->rss_hf =3D valid_rss_hf; > - return 0; > } >=20 > static int > @@ -409,9 +415,7 @@ struct rte_iavf_xstats_name_off { > return ret; > } > } else { > - ret =3D iavf_config_rss_hf(adapter, rss_conf->rss_hf); > - if (ret !=3D -ENOTSUP) > - return ret; > + iavf_config_rss_hf(adapter, rss_conf->rss_hf); > } >=20 > return 0; > @@ -1400,9 +1404,7 @@ static int iavf_config_rx_queues_irqs(struct > rte_eth_dev *dev, > return ret; > } > } else { > - ret =3D iavf_config_rss_hf(adapter, rss_conf->rss_hf); > - if (ret !=3D -ENOTSUP) > - return ret; > + iavf_config_rss_hf(adapter, rss_conf->rss_hf); > } >=20 > return 0; > -- > 1.8.3.1