net/mlx5: block pop VLAN action on Tx

Add missing check in validation function of 'pop VLAN' action.
Action is not allowed for egress flow rules.

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:19 +02:00 committed by Ferruh Yigit
parent 55060e62e4
commit 159e9217a5

View File

@ -1634,6 +1634,12 @@ flow_dv_validate_action_pop_vlan(struct rte_eth_dev *dev,
RTE_FLOW_ERROR_TYPE_UNSPECIFIED,
NULL,
"pop vlan action is not supported");
if (attr->egress)
return rte_flow_error_set(error, ENOTSUP,
RTE_FLOW_ERROR_TYPE_ATTR_EGRESS,
NULL,
"pop vlan action not supported for "
"egress");
/*
* Check for inconsistencies:
* fail strip_vlan in a flow that matches packets without VLAN tags.