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>
This commit is contained in:
parent
2e715e53de
commit
c1b22c18de
@ -1698,6 +1698,8 @@ ice_parse_engine_create(struct ice_adapter *ad,
|
|||||||
void *temp;
|
void *temp;
|
||||||
|
|
||||||
TAILQ_FOREACH_SAFE(parser_node, parser_list, node, temp) {
|
TAILQ_FOREACH_SAFE(parser_node, parser_list, node, temp) {
|
||||||
|
int ret;
|
||||||
|
|
||||||
if (parser_node->parser->parse_pattern_action(ad,
|
if (parser_node->parser->parse_pattern_action(ad,
|
||||||
parser_node->parser->array,
|
parser_node->parser->array,
|
||||||
parser_node->parser->array_len,
|
parser_node->parser->array_len,
|
||||||
@ -1712,8 +1714,11 @@ ice_parse_engine_create(struct ice_adapter *ad,
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!(engine->create(ad, flow, *meta, error)))
|
ret = engine->create(ad, flow, *meta, error);
|
||||||
|
if (ret == 0)
|
||||||
return engine;
|
return engine;
|
||||||
|
else if (ret == -EEXIST)
|
||||||
|
return NULL;
|
||||||
}
|
}
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user