Skip to content

Commit

Permalink
net/mlx5e: Err if asked to offload TC match on frag being first
Browse files Browse the repository at this point in the history
The HW doesn't support matching on frag first/later, return error if we are
asked to offload that.

Fixes: 3f7d0eb ("net/mlx5e: Offload TC matching on packets being IP fragments")
Signed-off-by: Roi Dayan <roid@mellanox.com>
Reviewed-by: Or Gerlitz <ogerlitz@mellanox.com>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
  • Loading branch information
Roi Dayan authored and Saeed Mahameed committed May 10, 2018
1 parent 88d725b commit f85900c
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions drivers/net/ethernet/mellanox/mlx5/core/en_tc.c
Original file line number Diff line number Diff line change
Expand Up @@ -1261,6 +1261,10 @@ static int __parse_cls_flower(struct mlx5e_priv *priv,
f->mask);
addr_type = key->addr_type;

/* the HW doesn't support frag first/later */
if (mask->flags & FLOW_DIS_FIRST_FRAG)
return -EOPNOTSUPP;

if (mask->flags & FLOW_DIS_IS_FRAGMENT) {
MLX5_SET(fte_match_set_lyr_2_4, headers_c, frag, 1);
MLX5_SET(fte_match_set_lyr_2_4, headers_v, frag,
Expand Down

0 comments on commit f85900c

Please sign in to comment.