aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRoi Dayan <roid@mellanox.com>2018-03-22 12:51:37 -0400
committerSaeed Mahameed <saeedm@mellanox.com>2018-05-10 19:10:13 -0400
commitf85900c3e13fdb61f040c9feecbcda601e0cdcfb (patch)
tree1dc2d66337a3e826ae94baa552573eb39612af5d
parent88d725bbb43cd63a40c8ef70dd373f1d38ead2e3 (diff)
net/mlx5e: Err if asked to offload TC match on frag being first
The HW doesn't support matching on frag first/later, return error if we are asked to offload that. Fixes: 3f7d0eb42d59 ("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>
-rw-r--r--drivers/net/ethernet/mellanox/mlx5/core/en_tc.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_tc.c b/drivers/net/ethernet/mellanox/mlx5/core/en_tc.c
index 3c534fc43400..b94276db3ce9 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/en_tc.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/en_tc.c
@@ -1261,6 +1261,10 @@ static int __parse_cls_flower(struct mlx5e_priv *priv,
1261 f->mask); 1261 f->mask);
1262 addr_type = key->addr_type; 1262 addr_type = key->addr_type;
1263 1263
1264 /* the HW doesn't support frag first/later */
1265 if (mask->flags & FLOW_DIS_FIRST_FRAG)
1266 return -EOPNOTSUPP;
1267
1264 if (mask->flags & FLOW_DIS_IS_FRAGMENT) { 1268 if (mask->flags & FLOW_DIS_IS_FRAGMENT) {
1265 MLX5_SET(fte_match_set_lyr_2_4, headers_c, frag, 1); 1269 MLX5_SET(fte_match_set_lyr_2_4, headers_c, frag, 1);
1266 MLX5_SET(fte_match_set_lyr_2_4, headers_v, frag, 1270 MLX5_SET(fte_match_set_lyr_2_4, headers_v, frag,