From: Dekel Peled Date: Mon, 29 Jul 2019 15:14:45 +0000 (+0300) Subject: net/mlx5: fix validation of VLAN PCP item X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=a3970d31e6fb0673611a4a0a4891b7109ae419cc;p=dpdk.git net/mlx5: fix validation of VLAN PCP item Function mlx5_flow_validate_item_vlan() validates the user setting is supported by NIC, using a mask with TCI mask 0x0fff. This check will reject a flow rule specifying a vlan pcp item. This patch updates mlx5_flow_validate_item_vlan() to use mask 0xffff, so flow rules with vlan pcp item are accepted. Fixes: 23c1d42c7138 ("net/mlx5: split flow validation to dedicated function") Cc: stable@dpdk.org Signed-off-by: Dekel Peled Acked-by: Viacheslav Ovsiienko --- diff --git a/drivers/net/mlx5/mlx5_flow.c b/drivers/net/mlx5/mlx5_flow.c index f40fee5289..6ae98e197d 100644 --- a/drivers/net/mlx5/mlx5_flow.c +++ b/drivers/net/mlx5/mlx5_flow.c @@ -1221,8 +1221,8 @@ mlx5_flow_validate_item_vlan(const struct rte_flow_item *item, const struct rte_flow_item_vlan *spec = item->spec; const struct rte_flow_item_vlan *mask = item->mask; const struct rte_flow_item_vlan nic_mask = { - .tci = RTE_BE16(0x0fff), - .inner_type = RTE_BE16(0xffff), + .tci = RTE_BE16(UINT16_MAX), + .inner_type = RTE_BE16(UINT16_MAX), }; uint16_t vlan_tag = 0; const int tunnel = !!(item_flags & MLX5_FLOW_LAYER_TUNNEL);