From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <dev-bounces@dpdk.org>
Received: from dpdk.org (dpdk.org [92.243.14.124])
	by dpdk.space (Postfix) with ESMTP id 799FFA046B
	for <public@inbox.dpdk.org>; Mon, 24 Jun 2019 17:40:35 +0200 (CEST)
Received: from [92.243.14.124] (localhost [127.0.0.1])
	by dpdk.org (Postfix) with ESMTP id 89C5B1BCE3;
	Mon, 24 Jun 2019 17:40:29 +0200 (CEST)
Received: from git-send-mailer.rdmz.labs.mlnx (unknown [37.142.13.130])
 by dpdk.org (Postfix) with ESMTP id 8E9D81BC87
 for <dev@dpdk.org>; Mon, 24 Jun 2019 17:40:24 +0200 (CEST)
From: Xiaoyu Min <jackmin@mellanox.com>
To: Shahaf Shuler <shahafs@mellanox.com>,
	Yongseok Koh <yskoh@mellanox.com>
Cc: dev@dpdk.org
Date: Mon, 24 Jun 2019 23:40:16 +0800
Message-Id: <20190624154018.128379-3-jackmin@mellanox.com>
X-Mailer: git-send-email 2.21.0
In-Reply-To: <20190624154018.128379-1-jackmin@mellanox.com>
References: <20190624154018.128379-1-jackmin@mellanox.com>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
Subject: [dpdk-dev] [PATCH 2/4] net/mlx5: support match GRE protocol on DR
	engine
X-BeenThere: dev@dpdk.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: DPDK patches and discussions <dev.dpdk.org>
List-Unsubscribe: <https://mails.dpdk.org/options/dev>,
 <mailto:dev-request@dpdk.org?subject=unsubscribe>
List-Archive: <http://mails.dpdk.org/archives/dev/>
List-Post: <mailto:dev@dpdk.org>
List-Help: <mailto:dev-request@dpdk.org?subject=help>
List-Subscribe: <https://mails.dpdk.org/listinfo/dev>,
 <mailto:dev-request@dpdk.org?subject=subscribe>
Errors-To: dev-bounces@dpdk.org
Sender: "dev" <dev-bounces@dpdk.org>

DR engine support matching on GRE protocol field without MPLS supports.
So bypassing the MPLS check when DR is enabled.

Signed-off-by: Xiaoyu Min <jackmin@mellanox.com>
---
 drivers/net/mlx5/mlx5_flow.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/net/mlx5/mlx5_flow.c b/drivers/net/mlx5/mlx5_flow.c
index c03eb4c376..4cb04c32ff 100644
--- a/drivers/net/mlx5/mlx5_flow.c
+++ b/drivers/net/mlx5/mlx5_flow.c
@@ -1612,6 +1612,7 @@ mlx5_flow_validate_item_gre(const struct rte_flow_item *item,
 		 sizeof(struct rte_flow_item_gre), error);
 	if (ret < 0)
 		return ret;
+#ifndef HAVE_MLX5DV_DR
 #ifndef HAVE_IBV_DEVICE_MPLS_SUPPORT
 	if (spec && (spec->protocol & mask->protocol))
 		return rte_flow_error_set(error, ENOTSUP,
@@ -1619,6 +1620,7 @@ mlx5_flow_validate_item_gre(const struct rte_flow_item *item,
 					  "without MPLS support the"
 					  " specification cannot be used for"
 					  " filtering");
+#endif
 #endif
 	return 0;
 }
-- 
2.21.0