net/mlx5: fix VLAN match for DV mode
authorDekel Peled <dekelp@mellanox.com>
Tue, 11 Feb 2020 11:05:11 +0000 (13:05 +0200)
committerFerruh Yigit <ferruh.yigit@intel.com>
Fri, 14 Feb 2020 11:42:12 +0000 (12:42 +0100)
commit00f75a40576b28aa5633d2cadd86f23c30c7d220
tree33a774e8837d6a016473e2a692c66b3b146e11b7
parenta262726ed482f3c9fba493d0bfc3b4bd53d4c432
net/mlx5: fix VLAN match for DV mode

Currently MLX5 PMD can't match on untagged packets specifically.
Tagged traffic still hits the flows intended for untagged packets.
If the flow has ETH, it will catch all matching packets, tagged
and untagged.
The solution is to use cvlan_tag bit.
If mask=1 and value=0 it matches on untagged traffic.
If mask=1 and value=1 it matches on tagged traffic.
This is the kernel implementation.

This patch updated MLX5 PMD to set cvlan_tag mask and value according
to flow rule contents.
This update is relevant when using DV flow engine (dv_flow_en=1).

See example at https://doc.dpdk.org/guides/nics/mlx5.html#limitations.

Fixes: fc2c498ccb94 ("net/mlx5: add Direct Verbs translate items")
Cc: stable@dpdk.org
Signed-off-by: Dekel Peled <dekelp@mellanox.com>
Acked-by: Matan Azrad <matan@mellanox.com>
doc/guides/nics/mlx5.rst
doc/guides/rel_notes/release_20_02.rst
drivers/net/mlx5/mlx5_flow_dv.c