From: Xiaoyu Min Date: Fri, 2 Jul 2021 08:34:46 +0000 (+0800) Subject: net/mlx5: remove unsupported flow item MPLS over IP X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=14ad99d78a466bd5fb796cb9c147d2a315cbe318;p=dpdk.git net/mlx5: remove unsupported flow item MPLS over IP HW doesn't support match MPLS over IP traffic. Remove related code. Fixes: d1abe664ddde ("net/mlx5: add MPLS to Direct Verbs flow engine") Cc: stable@dpdk.org Signed-off-by: Xiaoyu Min Acked-by: Matan Azrad --- diff --git a/drivers/net/mlx5/mlx5_flow.c b/drivers/net/mlx5/mlx5_flow.c index 667ae3fd97..dc41e8b1b7 100644 --- a/drivers/net/mlx5/mlx5_flow.c +++ b/drivers/net/mlx5/mlx5_flow.c @@ -2923,9 +2923,8 @@ mlx5_flow_validate_item_mpls(struct rte_eth_dev *dev __rte_unused, "MPLS not supported or" " disabled in firmware" " configuration."); - /* MPLS over IP, UDP, GRE is allowed */ - if (!(prev_layer & (MLX5_FLOW_LAYER_OUTER_L3 | - MLX5_FLOW_LAYER_OUTER_L4_UDP | + /* MPLS over UDP, GRE is allowed */ + if (!(prev_layer & (MLX5_FLOW_LAYER_OUTER_L4_UDP | MLX5_FLOW_LAYER_GRE | MLX5_FLOW_LAYER_GRE_KEY))) return rte_flow_error_set(error, EINVAL, diff --git a/drivers/net/mlx5/mlx5_flow_dv.c b/drivers/net/mlx5/mlx5_flow_dv.c index 6ffdaf188c..6c8adb3481 100644 --- a/drivers/net/mlx5/mlx5_flow_dv.c +++ b/drivers/net/mlx5/mlx5_flow_dv.c @@ -9076,9 +9076,6 @@ flow_dv_translate_item_mpls(void *matcher, void *key, RTE_ETHER_TYPE_MPLS); break; default: - MLX5_SET(fte_match_set_lyr_2_4, headers_m, ip_protocol, 0xff); - MLX5_SET(fte_match_set_lyr_2_4, headers_v, ip_protocol, - IPPROTO_MPLS); break; } if (!in_mpls_v)