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 67AC2A04C2; Thu, 14 Nov 2019 05:29:37 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 74AF92BA8; Thu, 14 Nov 2019 05:29:36 +0100 (CET) Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) by dpdk.org (Postfix) with ESMTP id CE6EB2B87 for ; Thu, 14 Nov 2019 05:29:34 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by orsmga104.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 13 Nov 2019 20:29:33 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.68,302,1569308400"; d="scan'208";a="202948923" Received: from fmsmsx108.amr.corp.intel.com ([10.18.124.206]) by fmsmga008.fm.intel.com with ESMTP; 13 Nov 2019 20:29:33 -0800 Received: from fmsmsx111.amr.corp.intel.com (10.18.116.5) by FMSMSX108.amr.corp.intel.com (10.18.124.206) with Microsoft SMTP Server (TLS) id 14.3.439.0; Wed, 13 Nov 2019 20:29:33 -0800 Received: from shsmsx154.ccr.corp.intel.com (10.239.6.54) by fmsmsx111.amr.corp.intel.com (10.18.116.5) with Microsoft SMTP Server (TLS) id 14.3.439.0; Wed, 13 Nov 2019 20:29:32 -0800 Received: from shsmsx105.ccr.corp.intel.com ([169.254.11.225]) by SHSMSX154.ccr.corp.intel.com ([169.254.7.200]) with mapi id 14.03.0439.000; Thu, 14 Nov 2019 12:29:31 +0800 From: "Zhang, Qi Z" To: "Ye, Xiaolong" CC: "Yang, Qiming" , "Su, Simei" , "dev@dpdk.org" Thread-Topic: [PATCH] net/ice: ignore error when remove RSS rule Thread-Index: AQHVmWUPII16Z8CB0E2X3SRyHioseaeJfwEAgACOzoA= Date: Thu, 14 Nov 2019 04:29:30 +0000 Message-ID: <039ED4275CED7440929022BC67E7061153DC9316@SHSMSX105.ccr.corp.intel.com> References: <20191112142836.10210-1-qi.z.zhang@intel.com> <20191114033108.GD66623@intel.com> In-Reply-To: <20191114033108.GD66623@intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiM2M5OWU5MTEtNzc3Mi00YzkzLThhNDktZWJiMjBjYmEwNjJiIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoib0Q1OWxRUWdhRG9iUXBIamE5T1NiM25Za3lwQ2doTDMrU0VPUzBnUmF0YjJITjlYYUNHVnFRRXhUcnZsSHlFUSJ9 x-ctpclassification: CTP_NT dlp-product: dlpe-windows dlp-version: 11.2.0.6 dlp-reaction: no-action x-originating-ip: [10.239.127.40] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] [PATCH] net/ice: ignore error when remove RSS rule 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: Ye, Xiaolong > Sent: Thursday, November 14, 2019 11:31 AM > To: Zhang, Qi Z > Cc: Yang, Qiming ; Su, Simei ; > dev@dpdk.org > Subject: Re: [PATCH] net/ice: ignore error when remove RSS rule >=20 > On 11/12, Qi Zhang wrote: > >Currently, multiple rte_flow RSS rules may mapping to the same >=20 > s/mapping/map >=20 > >hardware rule if a later rule is just for inputset change or symm turn > >on/off. so after one of the rules be destroyed, we will get error > >ICE_ERR_DOES_NOT_EXIST when destroying any other rules. >=20 > In this case, the hardware rule has been destroyed by the first rte_flow = RSS > rule removal, right? Do we need a counter or similar to record how may > rte_flow RSS rules are linked to the hardware rule? Count does not make it better, since different delete sequence still goes t= o the same result which is not expected. If B overwrite A, when B is deleted, we should rollback to A, but not just = count--.since user expect B should not work at the moment, Yes, current solution still has problem since if A is deleted first, B also= does not work which is not expected. Maybe simply prevent overwrite is a better way, since what we need is a API= like a rte_flow_update, without it user need to destroy first then create. >=20 > >The patch simply fix this by ignore this error. A more sophistic >=20 > s/fix/fixes >=20 > And I think you mean "sophisticated"? >=20 > >fix that remember the sequence and replay properly will be provided in > >future. > > > >Fixes: 5ad3db8d4bdd ("net/ice: enable advanced RSS") > > > >Signed-off-by: Qi Zhang > >--- > > drivers/net/ice/ice_hash.c | 7 ++++++- > > 1 file changed, 6 insertions(+), 1 deletion(-) > > > >diff --git a/drivers/net/ice/ice_hash.c b/drivers/net/ice/ice_hash.c > >index d88434305..2e9c1bc67 100644 > >--- a/drivers/net/ice/ice_hash.c > >+++ b/drivers/net/ice/ice_hash.c > >@@ -536,7 +536,12 @@ ice_hash_destroy(struct ice_adapter *ad, > > ret =3D ice_rem_rss_cfg(hw, vsi->idx, > > filter_ptr->rss_cfg.hashed_flds, > > filter_ptr->rss_cfg.packet_hdr); > >- if (ret) { > >+ /* Fixme: Ignore the error if a rule does not exist. > >+ * Currently a rule for inputset change or symm turn on/off > >+ * will overwrite an exist rule, while application still > >+ * have 2 rte_flow handles. > >+ **/ > >+ if (ret && ret !=3D ICE_ERR_DOES_NOT_EXIST) { >=20 > This patch can't be applied cleanly on top of latest dpdk-next-net-intel,= please > help do a rebase. OK I will rebase and fix those typo. Thanks Qi >=20 > Thanks, > Xiaolong >=20 > > rte_flow_error_set(error, EINVAL, > > RTE_FLOW_ERROR_TYPE_HANDLE, NULL, > > "rss flow destroy fail"); > >-- > >2.13.6 > >