summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDekel Peled <dekelp@mellanox.com>2019-07-29 18:14:45 +0300
committerKevin Traynor <ktraynor@redhat.com>2019-09-13 10:37:20 +0100
commit0f408a9cea146c1ae7d5c598f681ff162a13982f (patch)
treeb1d294f176878b47fedc13fa2585cdea50cf2576
parente67d7795a0d251ac946126959587a67624532979 (diff)
downloaddpdk-stable-0f408a9cea146c1ae7d5c598f681ff162a13982f.zip
dpdk-stable-0f408a9cea146c1ae7d5c598f681ff162a13982f.tar.gz
dpdk-stable-0f408a9cea146c1ae7d5c598f681ff162a13982f.tar.xz
net/mlx5: fix validation of VLAN PCP item
[ upstream commit a3970d31e6fb0673611a4a0a4891b7109ae419cc ] 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") Signed-off-by: Dekel Peled <dekelp@mellanox.com> Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
-rw-r--r--drivers/net/mlx5/mlx5_flow.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/mlx5/mlx5_flow.c b/drivers/net/mlx5/mlx5_flow.c
index 8e6585d..f19b27e 100644
--- a/drivers/net/mlx5/mlx5_flow.c
+++ b/drivers/net/mlx5/mlx5_flow.c
@@ -1098,8 +1098,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);