From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id D95D3A052A for ; Tue, 10 Nov 2020 13:00:05 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id A37632E8D; Tue, 10 Nov 2020 13:00:04 +0100 (CET) Received: from git-send-mailer.rdmz.labs.mlnx (unknown [37.142.13.130]) by dpdk.org (Postfix) with ESMTP id D79BBDED; Tue, 10 Nov 2020 12:59:59 +0100 (CET) From: Xiaoyu Min To: Matan Azrad , Shahaf Shuler , Viacheslav Ovsiienko Cc: dev@dpdk.org, Xiaoyu Min , stable@dpdk.org Date: Tue, 10 Nov 2020 19:59:53 +0800 Message-Id: <767ac1c511fcb95715b1498e187789a7ffe7871d.1605009114.git.jackmin@nvidia.com> X-Mailer: git-send-email 2.24.0.rc0.3.g12a4aeaad8 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-stable] [PATCH] net/mlx5: fix validate MPLSoGRE with GRE key X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Sender: "stable" From: Xiaoyu Min Currently PMD only accept flow which item_mpls directly follow item_gre, means to match the GRE header without GRE optional field key in MPLSoGRE encapsulation. However, for the MPLSoGRE, the GRE header could have the optional field (i.e, key) according to the RFC. So PMD need to accept this. Add MLX5_FLOW_LAYER_GRE_KEY into allowed prev_layer to fix Fixes: a7a0365565a4 ("net/mlx5: match GRE key and present bits") Cc: stable@dpdk.org Signed-off-by: Xiaoyu Min Acked-by: Matan Azrad --- drivers/net/mlx5/mlx5_flow.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/net/mlx5/mlx5_flow.c b/drivers/net/mlx5/mlx5_flow.c index 92adfcacca..50d2bbb617 100644 --- a/drivers/net/mlx5/mlx5_flow.c +++ b/drivers/net/mlx5/mlx5_flow.c @@ -2746,7 +2746,8 @@ mlx5_flow_validate_item_mpls(struct rte_eth_dev *dev __rte_unused, /* MPLS over IP, UDP, GRE is allowed */ if (!(prev_layer & (MLX5_FLOW_LAYER_OUTER_L3 | MLX5_FLOW_LAYER_OUTER_L4_UDP | - MLX5_FLOW_LAYER_GRE))) + MLX5_FLOW_LAYER_GRE | + MLX5_FLOW_LAYER_GRE_KEY))) return rte_flow_error_set(error, EINVAL, RTE_FLOW_ERROR_TYPE_ITEM, item, "protocol filtering not compatible" -- 2.25.1