Skip to content

Commit

Permalink
net/mlx5e: Always use the match level enum when parsing TC rule match
Browse files Browse the repository at this point in the history
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: d708f90 ('net/mlx5e: Get the required HW match level while parsing TC flow matches')
Signed-off-by: Or Gerlitz <[email protected]>
Reviewed-by: Roi Dayan <[email protected]>
Signed-off-by: Saeed Mahameed <[email protected]>
  • Loading branch information
ogerlitz authored and Saeed Mahameed committed Nov 19, 2018
1 parent 077ecd7 commit 83621b7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/net/ethernet/mellanox/mlx5/core/en_tc.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}

Expand Down

0 comments on commit 83621b7

Please sign in to comment.