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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 12 May 2022 10:30:13 +0000 (12:30 +0200)
commit32d9ad28dcda6fc08d3b0a2978fca82718ef8b0f
tree117e72f487162d94c4f90a7dd928d851c864832a
parentec26ba1f202a0fd0e92efa7b4dfe4807ec605b6e
net/mlx5e: Don't match double-vlan packets if cvlan is not set

commit ada09af92e621ab500dd80a16d1d0299a18a1180 upstream.

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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/ethernet/mellanox/mlx5/core/en_tc.c