net/mlx5e: Always use the match level enum when parsing TC rule match
authorOr Gerlitz <ogerlitz@mellanox.com>
Sun, 28 Oct 2018 10:27:29 +0000 (12:27 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 23 Nov 2018 07:17:04 +0000 (08:17 +0100)
commit52ae8d6c80e293f03a2f7c55897246657a6b352d
tree194c97d18f012593e67c08b11725bbe3d8cfba0a
parent004973021da1e3fb3bb46a246dbec94a61f23cdf
net/mlx5e: Always use the match level enum when parsing TC rule match

[ Upstream commit 83621b7df6a646e550fd3d36db2e301cf9a5096b ]

We get the match level (none, l2, l3, l4) while going over the match
dissectors of an offloaded tc rule. When doing this, the match level
enum and the not min inline enum values should be used, fix that.

This worked accidentally b/c both enums have the same numerical values.

Fixes: d708f902989b ('net/mlx5e: Get the required HW match level while parsing TC flow matches')
Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com>
Reviewed-by: Roi Dayan <roid@mellanox.com>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/ethernet/mellanox/mlx5/core/en_tc.c