From: Yongseok Koh Date: Tue, 30 Oct 2018 07:53:07 +0000 (+0000) Subject: net/mlx5: fix validation of MLPS-in-GRE X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=3bcc6d6a832b67fd02776d95fe991640256a786f;p=dpdk.git net/mlx5: fix validation of MLPS-in-GRE Multiple tunnel isn't allowed but MPLS over GRE should be accepted. Fixes: 23c1d42c7138 ("net/mlx5: split flow validation to dedicated function") Signed-off-by: Yongseok Koh Acked-by: Shahaf Shuler --- diff --git a/drivers/net/mlx5/mlx5_flow.c b/drivers/net/mlx5/mlx5_flow.c index 370cf7792b..107a4f02f8 100644 --- a/drivers/net/mlx5/mlx5_flow.c +++ b/drivers/net/mlx5/mlx5_flow.c @@ -1619,7 +1619,9 @@ mlx5_flow_validate_item_mpls(const struct rte_flow_item *item __rte_unused, RTE_FLOW_ERROR_TYPE_ITEM, item, "protocol filtering not compatible" " with MPLS layer"); - if (item_flags & MLX5_FLOW_LAYER_TUNNEL) + /* Multi-tunnel isn't allowed but MPLS over GRE is an exception. */ + if ((item_flags & MLX5_FLOW_LAYER_TUNNEL) && + !(item_flags & MLX5_FLOW_LAYER_GRE)) return rte_flow_error_set(error, ENOTSUP, RTE_FLOW_ERROR_TYPE_ITEM, item, "multiple tunnel layers not"