net/mlx5: Set only stag for match untagged packets
authorMark Bloch <markb@mellanox.com>
Thu, 29 Aug 2019 23:42:38 +0000 (23:42 +0000)
committerSaeed Mahameed <saeedm@mellanox.com>
Mon, 2 Sep 2019 06:44:42 +0000 (23:44 -0700)
cvlan_tag enabled in match criteria and disabled in
match value means both S & C tags don't exist (untagged of both).

Signed-off-by: Mark Bloch <markb@mellanox.com>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
drivers/net/ethernet/mellanox/mlx5/core/en_tc.c

index cc096f6011d964051405dd5fa3514b428086cc5a..9e9b41ab392b883132736047e44fd826d0de34c0 100644 (file)
@@ -1593,7 +1593,10 @@ static int __parse_cls_flower(struct mlx5e_priv *priv,
                        *match_level = MLX5_MATCH_L2;
                }
        } else if (*match_level != MLX5_MATCH_NONE) {
-               MLX5_SET(fte_match_set_lyr_2_4, headers_c, svlan_tag, 1);
+               /* cvlan_tag enabled in match criteria and
+                * disabled in match value means both S & C tags
+                * don't exist (untagged of both)
+                */
                MLX5_SET(fte_match_set_lyr_2_4, headers_c, cvlan_tag, 1);
                *match_level = MLX5_MATCH_L2;
        }