summaryrefslogtreecommitdiff
path: root/drivers/net/mlx5/mlx5_trigger.c
diff options
context:
space:
mode:
authorNelio Laranjeiro <nelio.laranjeiro@6wind.com>2018-07-23 09:18:40 +0200
committerThomas Monjalon <thomas@monjalon.net>2018-07-26 14:05:52 +0200
commit2bc98393ac3ab980557187257369ec436a8f9eeb (patch)
tree78ac5f32a68a2da0bb096f07104a3e99423c08a3 /drivers/net/mlx5/mlx5_trigger.c
parent79d0989213cd39decfe802cc42e334db4f0978f0 (diff)
downloaddpdk-2bc98393ac3ab980557187257369ec436a8f9eeb.zip
dpdk-2bc98393ac3ab980557187257369ec436a8f9eeb.tar.gz
dpdk-2bc98393ac3ab980557187257369ec436a8f9eeb.tar.xz
net/mlx5: fix TCI mask filter
In mlx5_traffic_enable() the TCI mask for the VLAN is wrong causing the sub flow engine to reject the rule. Fixes: 272733b5ebfd ("net/mlx5: use flow to enable unicast traffic") Cc: stable@dpdk.org Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com> Acked-by: Yongseok Koh <yskoh@mellanox.com> Acked-by: Ori Kam <orika@mellanox.com>
Diffstat (limited to 'drivers/net/mlx5/mlx5_trigger.c')
-rw-r--r--drivers/net/mlx5/mlx5_trigger.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/drivers/net/mlx5/mlx5_trigger.c b/drivers/net/mlx5/mlx5_trigger.c
index 4d2078b..d02a626 100644
--- a/drivers/net/mlx5/mlx5_trigger.c
+++ b/drivers/net/mlx5/mlx5_trigger.c
@@ -300,9 +300,8 @@ mlx5_traffic_enable(struct rte_eth_dev *dev)
struct rte_flow_item_vlan vlan_spec = {
.tci = rte_cpu_to_be_16(vlan),
};
- struct rte_flow_item_vlan vlan_mask = {
- .tci = 0xffff,
- };
+ struct rte_flow_item_vlan vlan_mask =
+ rte_flow_item_vlan_mask;
ret = mlx5_ctrl_flow_vlan(dev, &bcast, &bcast,
&vlan_spec, &vlan_mask);
@@ -339,9 +338,8 @@ mlx5_traffic_enable(struct rte_eth_dev *dev)
struct rte_flow_item_vlan vlan_spec = {
.tci = rte_cpu_to_be_16(vlan),
};
- struct rte_flow_item_vlan vlan_mask = {
- .tci = 0xffff,
- };
+ struct rte_flow_item_vlan vlan_mask =
+ rte_flow_item_vlan_mask;
ret = mlx5_ctrl_flow_vlan(dev, &unicast,
&unicast_mask,