From: Yahui Cao <yahui.cao@intel.com>
To: Qiming Yang <qiming.yang@intel.com>, Wenzhuo Lu <wenzhuo.lu@intel.com>
Cc: dev@dpdk.org, Qi Zhang <qi.z.zhang@intel.com>,
Yahui Cao <yahui.cao@intel.com>,
Xiaolong Ye <xiaolong.ye@intel.com>,
Ying A Wang <ying.a.wang@intel.com>
Subject: [dpdk-dev] [PATCH] net/ice: fix FDIR rule duplication check failure
Date: Wed, 20 Nov 2019 00:01:00 +0800 [thread overview]
Message-ID: <20191119160101.32465-1-yahui.cao@intel.com> (raw)
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 <yahui.cao@intel.com>
---
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
next reply other threads:[~2019-11-19 8:17 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-11-19 16:01 Yahui Cao [this message]
2019-11-19 9:26 ` Zhang, Qi Z
2019-11-20 8:56 ` Ye Xiaolong
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20191119160101.32465-1-yahui.cao@intel.com \
--to=yahui.cao@intel.com \
--cc=dev@dpdk.org \
--cc=qi.z.zhang@intel.com \
--cc=qiming.yang@intel.com \
--cc=wenzhuo.lu@intel.com \
--cc=xiaolong.ye@intel.com \
--cc=ying.a.wang@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).