From mboxrd@z Thu Jan 1 00:00:00 1970 From: Saeed Mahameed Subject: [net 05/13] net/mlx5e: Always use the match level enum when parsing TC rule match Date: Mon, 19 Nov 2018 15:41:20 -0800 Message-ID: <20181119234128.6948-6-saeedm@mellanox.com> References: <20181119234128.6948-1-saeedm@mellanox.com> Mime-Version: 1.0 Content-Transfer-Encoding: 8bit Cc: netdev@vger.kernel.org, Or Gerlitz , Saeed Mahameed To: "David S. Miller" Return-path: Received: from mail-il-dmz.mellanox.com ([193.47.165.129]:46991 "EHLO mellanox.co.il" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1731904AbeKTKIL (ORCPT ); Tue, 20 Nov 2018 05:08:11 -0500 In-Reply-To: <20181119234128.6948-1-saeedm@mellanox.com> Sender: netdev-owner@vger.kernel.org List-ID: From: Or Gerlitz 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 Reviewed-by: Roi Dayan Signed-off-by: Saeed Mahameed --- drivers/net/ethernet/mellanox/mlx5/core/en_tc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_tc.c b/drivers/net/ethernet/mellanox/mlx5/core/en_tc.c index 84eb6939e69a..0409767237a7 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/en_tc.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/en_tc.c @@ -1587,10 +1587,10 @@ static int __parse_cls_flower(struct mlx5e_priv *priv, /* the HW doesn't need L3 inline to match on frag=no */ if (!(key->flags & FLOW_DIS_IS_FRAGMENT)) - *match_level = MLX5_INLINE_MODE_L2; + *match_level = MLX5_MATCH_L2; /* *** L2 attributes parsing up to here *** */ else - *match_level = MLX5_INLINE_MODE_IP; + *match_level = MLX5_MATCH_L3; } } -- 2.19.1