From: Dekel Peled Date: Wed, 22 Jan 2020 14:27:18 +0000 (+0200) Subject: net/mlx5: block push VLAN action on Rx X-Git-Url: http://git.droids-corp.org/?p=dpdk.git;a=commitdiff_plain;h=55060e62e4d2802b963fb00a45efc31ae1f8aca0 net/mlx5: block push VLAN action on Rx Add missing check in validation function of 'push VLAN' action. Action is not allowed for ingress flow rules. Fixes: 9aee7a8418d4 ("net/mlx5: support push flow action on VLAN header") Cc: stable@dpdk.org Signed-off-by: Dekel Peled Acked-by: Ori Kam Acked-by: Viacheslav Ovsiienko --- diff --git a/drivers/net/mlx5/mlx5_flow_dv.c b/drivers/net/mlx5/mlx5_flow_dv.c index b0d5688b29..1ed677ff21 100644 --- a/drivers/net/mlx5/mlx5_flow_dv.c +++ b/drivers/net/mlx5/mlx5_flow_dv.c @@ -1741,6 +1741,12 @@ flow_dv_validate_action_push_vlan(uint64_t action_flags, { const struct rte_flow_action_of_push_vlan *push_vlan = action->conf; + if (attr->ingress) + return rte_flow_error_set(error, ENOTSUP, + RTE_FLOW_ERROR_TYPE_ATTR_INGRESS, + NULL, + "push VLAN action not supported for " + "ingress"); if (push_vlan->ethertype != RTE_BE16(RTE_ETHER_TYPE_VLAN) && push_vlan->ethertype != RTE_BE16(RTE_ETHER_TYPE_QINQ)) return rte_flow_error_set(error, EINVAL,