summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorYahui Cao <yahui.cao@intel.com>2019-11-20 00:01:00 +0800
committerFerruh Yigit <ferruh.yigit@intel.com>2019-11-20 17:36:06 +0100
commitc1b22c18decc0f90d80d8d6736cd48468c99fe46 (patch)
tree3bb1ec7184e0bb350d4c65634c31515a761ddb2a /drivers
parent2e715e53deb52cf2c0fee5744702a0340fc8625e (diff)
downloaddpdk-c1b22c18decc0f90d80d8d6736cd48468c99fe46.zip
dpdk-c1b22c18decc0f90d80d8d6736cd48468c99fe46.tar.gz
dpdk-c1b22c18decc0f90d80d8d6736cd48468c99fe46.tar.xz
net/ice: fix flow director rule duplication check
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") Signed-off-by: Yahui Cao <yahui.cao@intel.com> Acked-by: Qi Zhang <qi.z.zhang@intel.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/ice/ice_generic_flow.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/net/ice/ice_generic_flow.c b/drivers/net/ice/ice_generic_flow.c
index 5594f85..1d8c834 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;
}