net/mlx5: remove unsupported flow item MPLS over IP
authorXiaoyu Min <jackmin@nvidia.com>
Fri, 2 Jul 2021 08:34:46 +0000 (16:34 +0800)
committerRaslan Darawsheh <rasland@nvidia.com>
Thu, 8 Jul 2021 20:09:31 +0000 (22:09 +0200)
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 <jackmin@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
drivers/net/mlx5/mlx5_flow.c
drivers/net/mlx5/mlx5_flow_dv.c

index 667ae3f..dc41e8b 100644 (file)
@@ -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,
index 6ffdaf1..6c8adb3 100644 (file)
@@ -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)