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 6B384A04C2; Thu, 14 Nov 2019 04:34:32 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 47DA72BA8; Thu, 14 Nov 2019 04:34:31 +0100 (CET) Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by dpdk.org (Postfix) with ESMTP id 28657B62 for ; Thu, 14 Nov 2019 04:34:28 +0100 (CET) X-Amp-Result: UNKNOWN X-Amp-Original-Verdict: FILE UNKNOWN X-Amp-File-Uploaded: False Received: from orsmga008.jf.intel.com ([10.7.209.65]) by fmsmga104.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 13 Nov 2019 19:34:28 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.68,302,1569308400"; d="scan'208";a="198676247" Received: from yexl-server.sh.intel.com (HELO localhost) ([10.67.117.17]) by orsmga008.jf.intel.com with ESMTP; 13 Nov 2019 19:34:26 -0800 Date: Thu, 14 Nov 2019 11:31:08 +0800 From: Ye Xiaolong To: Qi Zhang Cc: qiming.yang@intel.com, simei.su@intel.com, dev@dpdk.org Message-ID: <20191114033108.GD66623@intel.com> References: <20191112142836.10210-1-qi.z.zhang@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20191112142836.10210-1-qi.z.zhang@intel.com> User-Agent: Mutt/1.9.4 (2018-02-28) 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" On 11/12, Qi Zhang wrote: >Currently, multiple rte_flow RSS rules may mapping to the same s/mapping/map >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. 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? >The patch simply fix this by ignore this error. A more sophistic s/fix/fixes And I think you mean "sophisticated"? >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 = 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 != ICE_ERR_DOES_NOT_EXIST) { This patch can't be applied cleanly on top of latest dpdk-next-net-intel, please help do a rebase. Thanks, Xiaolong > rte_flow_error_set(error, EINVAL, > RTE_FLOW_ERROR_TYPE_HANDLE, NULL, > "rss flow destroy fail"); >-- >2.13.6 >