net/mlx5: fix pop VLAN action validation

Validation function of 'POP VLAN' action includes check for other
'POP VLAN' actions present in flow.
It doesn't check for 'PUSH VLAN' actions present in flow.

This patch adds check for 'PUSH VLAN' actions present in flow.

Fixes: b41e47da25 ("net/mlx5: support pop flow action on VLAN header")
Cc: stable@dpdk.org

Signed-off-by: Dekel Peled <dekelp@mellanox.com>
Acked-by: Ori Kam <orika@mellanox.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
This commit is contained in:
Dekel Peled 2020-01-22 16:27:20 +02:00 committed by Ferruh Yigit
parent 159e9217a5
commit 581476d641

View File

@ -1640,17 +1640,10 @@ flow_dv_validate_action_pop_vlan(struct rte_eth_dev *dev,
NULL,
"pop vlan action not supported for "
"egress");
/*
* Check for inconsistencies:
* fail strip_vlan in a flow that matches packets without VLAN tags.
* fail strip_vlan in a flow that matches packets without explicitly a
* matching on VLAN tag ?
*/
if (action_flags & MLX5_FLOW_ACTION_OF_POP_VLAN)
if (action_flags & MLX5_FLOW_VLAN_ACTIONS)
return rte_flow_error_set(error, ENOTSUP,
RTE_FLOW_ERROR_TYPE_UNSPECIFIED,
NULL,
"no support for multiple vlan pop "
RTE_FLOW_ERROR_TYPE_ACTION, action,
"no support for multiple VLAN "
"actions");
if (!(item_flags & MLX5_FLOW_LAYER_OUTER_VLAN))
return rte_flow_error_set(error, ENOTSUP,