From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 2C29DA04B1; Thu, 12 Nov 2020 12:48:24 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 8AAF95B3A; Thu, 12 Nov 2020 12:47:52 +0100 (CET) Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by dpdk.org (Postfix) with ESMTP id 0272B5953 for ; Thu, 12 Nov 2020 12:47:49 +0100 (CET) IronPort-SDR: 27R16sb7u1Y8o9zk9aZa0ZyKdyz4QXd/arUGMbdGf3diWLEmVo5dohlxjVekDtMRS1Q4N30yS8 9H2v4SNvJt7g== X-IronPort-AV: E=McAfee;i="6000,8403,9802"; a="167711981" X-IronPort-AV: E=Sophos;i="5.77,471,1596524400"; d="scan'208";a="167711981" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga001.jf.intel.com ([10.7.209.18]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 12 Nov 2020 03:47:49 -0800 IronPort-SDR: qI5YaiQSE3cCarYDdDVi3Idrmu9U5zAogHda0IJ8ycZNtV//y4PcmfguoHFrG8lC1ga7y3lXIy oM5wQZyZG+Uw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.77,471,1596524400"; d="scan'208";a="399374672" Received: from fmsmsx602.amr.corp.intel.com ([10.18.126.82]) by orsmga001.jf.intel.com with ESMTP; 12 Nov 2020 03:47:49 -0800 Received: from shsmsx604.ccr.corp.intel.com (10.109.6.214) by fmsmsx602.amr.corp.intel.com (10.18.126.82) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5; Thu, 12 Nov 2020 03:47:48 -0800 Received: from shsmsx601.ccr.corp.intel.com (10.109.6.141) by SHSMSX604.ccr.corp.intel.com (10.109.6.214) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5; Thu, 12 Nov 2020 19:47:46 +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.1713.004; Thu, 12 Nov 2020 19:47:46 +0800 From: "Zhang, Qi Z" To: "Yang, SteveX" , "dev@dpdk.org" CC: "Yang, Qiming" , "Xing, Beilei" , "Wu, Jingjing" , "Yang, SteveX" Thread-Topic: [dpdk-dev] [PATCH v2 2/2] net/iavf: fix the RSS error when VF port closed Thread-Index: AQHWtmUf826a/b6vCUa6h+w7IP18NanEP0ug Date: Thu, 12 Nov 2020 11:47:44 +0000 Message-ID: References: <20201105083216.38300-1-stevex.yang@intel.com> <20201109065136.26807-1-stevex.yang@intel.com> <20201109065136.26807-3-stevex.yang@intel.com> In-Reply-To: <20201109065136.26807-3-stevex.yang@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 v2 2/2] net/iavf: fix the RSS error when VF port closed X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 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 Steve Yang > Sent: Monday, November 9, 2020 2:52 PM > To: dev@dpdk.org > Cc: Yang, Qiming ; Xing, Beilei > ; Wu, Jingjing ; Yang, Stev= eX > > Subject: [dpdk-dev] [PATCH v2 2/2] net/iavf: fix the RSS error when VF po= rt > closed >=20 > Check the VF RSS offload flag and ignore relative operation when iavf has= h > uninit to avoid reset/close error. >=20 > Fixes: 7be10c3004be ("net/iavf: add RSS configuration for VF") >=20 > Signed-off-by: Steve Yang > --- > drivers/net/iavf/iavf_hash.c | 9 ++++++--- > 1 file changed, 6 insertions(+), 3 deletions(-) >=20 > diff --git a/drivers/net/iavf/iavf_hash.c b/drivers/net/iavf/iavf_hash.c = index > 8a5a6bb5a4..d3e9218f75 100644 > --- a/drivers/net/iavf/iavf_hash.c > +++ b/drivers/net/iavf/iavf_hash.c > @@ -1093,10 +1093,13 @@ iavf_hash_uninit(struct iavf_adapter *ad) > if (vf->vf_reset) > return; >=20 > - if (iavf_hash_default_set(ad, false)) > - PMD_DRV_LOG(ERR, "fail to delete default RSS"); > + if (vf->vf_res && > + vf->vf_res->vf_cap_flags & VIRTCHNL_VF_OFFLOAD_ADV_RSS_PF) { > + if (iavf_hash_default_set(ad, false)) > + PMD_DRV_LOG(ERR, "fail to delete default RSS"); Better to follow the same pattern in ice_hash_init, return immediate when c= heck something wrong. >=20 > - iavf_unregister_parser(&iavf_hash_parser, ad); > + iavf_unregister_parser(&iavf_hash_parser, ad); > + } > } >=20 > static void > -- > 2.17.1