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 082DFA0353; Tue, 19 Nov 2019 09:17:20 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id EDB5F2AB; Tue, 19 Nov 2019 09:17:19 +0100 (CET) Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by dpdk.org (Postfix) with ESMTP id BE6CA237 for ; Tue, 19 Nov 2019 09:17:17 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga003.jf.intel.com ([10.7.209.27]) by fmsmga105.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 19 Nov 2019 00:17:16 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.68,322,1569308400"; d="scan'208";a="209122666" Received: from dpdk-yahui-skylake.sh.intel.com ([10.67.119.16]) by orsmga003.jf.intel.com with ESMTP; 19 Nov 2019 00:17:13 -0800 From: Yahui Cao To: Qiming Yang , Wenzhuo Lu Cc: dev@dpdk.org, Qi Zhang , Yahui Cao , Xiaolong Ye , Ying A Wang Date: Wed, 20 Nov 2019 00:01:00 +0800 Message-Id: <20191119160101.32465-1-yahui.cao@intel.com> X-Mailer: git-send-email 2.17.1 Subject: [dpdk-dev] [PATCH] net/ice: fix FDIR rule duplication check failure 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" When FDIR filter detects duplicated rule and then returns EEXIST, ice flow will capture this error and return immediately. Fixes: 4e27d3ed02bd ("net/ice: fix flow API framework") Cc: ying.a.wang@intel.com Signed-off-by: Yahui Cao --- drivers/net/ice/ice_generic_flow.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/drivers/net/ice/ice_generic_flow.c b/drivers/net/ice/ice_generic_flow.c index 5594f8555..1d8c83418 100644 --- a/drivers/net/ice/ice_generic_flow.c +++ b/drivers/net/ice/ice_generic_flow.c @@ -1698,6 +1698,8 @@ ice_parse_engine_create(struct ice_adapter *ad, void *temp; TAILQ_FOREACH_SAFE(parser_node, parser_list, node, temp) { + int ret; + if (parser_node->parser->parse_pattern_action(ad, parser_node->parser->array, parser_node->parser->array_len, @@ -1712,8 +1714,11 @@ ice_parse_engine_create(struct ice_adapter *ad, continue; } - if (!(engine->create(ad, flow, *meta, error))) + ret = engine->create(ad, flow, *meta, error); + if (ret == 0) return engine; + else if (ret == -EEXIST) + return NULL; } return NULL; } -- 2.17.1