net/mlx5e: Don't match double-vlan packets if cvlan is not set
authorVlad Buslov <vladbu@nvidia.com>
Mon, 28 Mar 2022 12:54:52 +0000 (15:54 +0300)
committerSaeed Mahameed <saeedm@nvidia.com>
Wed, 4 May 2022 07:00:02 +0000 (00:00 -0700)
commitada09af92e621ab500dd80a16d1d0299a18a1180
tree967b8d6380d12ce6a7cca04a3012a8dcab020988
parent7ba2d9d8de96696c1451fee1b01da11f45bdc2b9
net/mlx5e: Don't match double-vlan packets if cvlan is not set

Currently, match VLAN rule also matches packets that have multiple VLAN
headers. This behavior is similar to buggy flower classifier behavior that
has recently been fixed. Fix the issue by matching on
outer_second_cvlan_tag with value 0 which will cause the HW to verify the
packet doesn't contain second vlan header.

Fixes: 699e96ddf47f ("net/mlx5e: Support offloading tc double vlan headers match")
Signed-off-by: Vlad Buslov <vladbu@nvidia.com>
Reviewed-by: Maor Dickman <maord@nvidia.com>
Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
drivers/net/ethernet/mellanox/mlx5/core/en_tc.c