Validate the match specification resulting from pattern
parsing within MAE backend in RTE flow implementation.
Signed-off-by: Ivan Malov <ivan.malov@oktetlabs.ru>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Reviewed-by: Andy Moreton <amoreton@xilinx.com>
if (rc != 0)
goto fail_parse_pattern;
+ if (!efx_mae_match_spec_is_valid(sa->nic, ctx_mae.match_spec_action)) {
+ rc = rte_flow_error_set(error, ENOTSUP,
+ RTE_FLOW_ERROR_TYPE_ITEM, NULL,
+ "Inconsistent pattern");
+ goto fail_validate_match_spec_action;
+ }
+
spec->match_spec = ctx_mae.match_spec_action;
return 0;
+fail_validate_match_spec_action:
fail_parse_pattern:
efx_mae_match_spec_fini(sa->nic, ctx_mae.match_spec_action);