From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id D726B43F05 for ; Wed, 1 May 2024 03:32:58 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id B089D402A8; Wed, 1 May 2024 03:32:58 +0200 (CEST) Received: from NAM12-BN8-obe.outbound.protection.outlook.com (mail-bn8nam12on2042.outbound.protection.outlook.com [40.107.237.42]) by mails.dpdk.org (Postfix) with ESMTP id ADC1A402A7 for ; Wed, 1 May 2024 03:32:57 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=CwVGJ3Q/HQCVpUlkIGBFWvp9dhwWbS/guBBAUh04zEdZuE7tjhqMmkcjDtM6J+z38em02tuD7errc8y/6c1dxwOyZUhksiOanuaiGt1exMnuGco0fwShatX5dPOZhAQeaJ8qzmdRn7sOiTkxXUrMcrbKwzurR1E7tcEiHGs16HZLDb8Msc3qbqtZrTYhs7i41AjelxUHVnBW5KkL7iGAgCbt9IcdOIFvr6yegdbaxZvwvx+h4SstBww6DFBZH+QT3NjpH8XrLnDRP7YWmgSTV4FPmomEnUsU9E7P1isCgGEjIfLSRL+rbAXqfWtjJJqFFL0uHGzX13vpFFNOUfsWyw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=WfEFGIx7PN9QA4TX/1Ol+EkFEKNuYdPBZfpOD/OZ1f4=; b=T4+88gx7D8hZn/k2p5dwKyU+7u4kAsmX1DmHtR/n/bL8vnYoTb62/4z8XpV/Y7fMG2INkrUgmQGWl+JrLQ+rGBFF1zqvr2uCQsF5peFJAKYMaPpjrl/EtVOHclRCgnXoA7BjQ1QZGsvLpE0MiEYlHHTGi13QCSRDk3pQ+Ath0r7Qcf5ByDviiUCtItRyGQlU/8Vibg8/jMQLPVPfuqvHsgoCqKYEisOxH3A6ffNEOazTm+DCmOhl20GCr3n6TWtuqkGUJM2DLIueDOskWqCIBj1BMASHcqDB7M/jTlAAOeo4zjzQ1sE3cvAAqaS0kjJ/IS7XoKiq3e3Jqmxn/wPi7g== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nvidia.com; dmarc=pass action=none header.from=nvidia.com; dkim=pass header.d=nvidia.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=WfEFGIx7PN9QA4TX/1Ol+EkFEKNuYdPBZfpOD/OZ1f4=; b=jw2Kt7ej+KmqkOYmdqs29hRHW9HufOuU53QSjGmtWr6O/t3paal+GnxCkUwhJKYidgwdufJ1IAXrhjIXdz0bIOwridTtnVpTHVwFOW+TG5Wf9jrQit/KmEOjNSmffkh9WvTT/ggS4VTIFplDdnvJ8LTJCOTSpKNwRJtbJp56JHxpQvs9YZZ/jyMqvi2vJaMKWPBUYUI9g4DghHxUGm6rHbUP8PsxPC+G16V4Gb8Da6Ahz4C/KSKAiDXoHOqajwaGYIuiSgRdJ2GF4IMHCjW1TfTlT/ndr6kGf1Z1hXLF4SpXDoMT/vO9/OuLdv0lmOicsXNlIVqxZMHsKcJkSmmj8g== Received: from DM4PR12MB5373.namprd12.prod.outlook.com (2603:10b6:5:39d::14) by SA1PR12MB7150.namprd12.prod.outlook.com (2603:10b6:806:2b4::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7519.35; Wed, 1 May 2024 01:32:55 +0000 Received: from DM4PR12MB5373.namprd12.prod.outlook.com ([fe80::630f:22c9:1d04:12d8]) by DM4PR12MB5373.namprd12.prod.outlook.com ([fe80::630f:22c9:1d04:12d8%4]) with mapi id 15.20.7519.031; Wed, 1 May 2024 01:32:54 +0000 From: Xueming Li To: Alex Vesker , "stable@dpdk.org" Subject: Re: [PATCH 23.11] net/mlx5/hws: fix tunnel protocol checks Thread-Topic: [PATCH 23.11] net/mlx5/hws: fix tunnel protocol checks Thread-Index: AQHamsMVirrXKohpR0uqoNtMJRRPn7GBmU6g Date: Wed, 1 May 2024 01:32:54 +0000 Message-ID: References: <20240430055536.1627-1-valex@nvidia.com> In-Reply-To: <20240430055536.1627-1-valex@nvidia.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: msip_labels: authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nvidia.com; x-ms-publictraffictype: Email x-ms-traffictypediagnostic: DM4PR12MB5373:EE_|SA1PR12MB7150:EE_ x-ms-office365-filtering-correlation-id: e949271e-d905-45ae-43f8-08dc697e9feb x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; ARA:13230031|1800799015|376005|366007|38070700009; x-microsoft-antispam-message-info: =?us-ascii?Q?0Nn6lf96pziaXHSxcEn0XaepMk/fFK06N3+NLgU7rJhOfCOQMRsggOJwb4al?= =?us-ascii?Q?gR8+Cq3XHeM3fuwoSxjIKHu+oJuYhTHgZO8xk50emWMDXYOQajF03Wq0Xz+a?= =?us-ascii?Q?le0z8wzZORWRlvce0RffBOs/jnPyAJe6vk+hO3fvDifmgkQZyoJXuxNGZ9n2?= =?us-ascii?Q?L24mCpNtMZZuEhe3BfUqgkUdTFYB4j7AmlnoWV1oZW9hmM2a3xm2JTUD1jmO?= =?us-ascii?Q?ZfqoZRiU1o1d/ufH3ucJvEb5n/KgBnAap2Lsri9IvGEwLec6/3MhZtyOTmdg?= =?us-ascii?Q?qpMdfZ61Bf9bzRTPXzCut8bzBF/Gfrew1wTdcRWxP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OeG8ctHXK7VmNjvg1uu8cfeyZ0sn2KSI7nDgF9RqCBDA+b+?= =?us-ascii?Q?HnZXbWDW71kgtdhrjtyGYOEOiWf8uj3Drmxb+JQ7HUVIqsEVr6TIIsbpKNL+?= =?us-ascii?Q?hIVtM/YNNL27NbQLy9UycNO6hFi7J4m8xQGqo1YyiU4dAA=3D=3D?= x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DM4PR12MB5373.namprd12.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230031)(1800799015)(376005)(366007)(38070700009); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?9zRVmBjobSu8bhnpABMshAergPn4piZeUjEzvP6iPyxvnvw8d3CXauN6IX+0?= =?us-ascii?Q?k3jcT9qEfq1kP5uMDRRR40k2WPUADgv4y2CY9TCxapI78H0KU5/6Abzt34bt?= =?us-ascii?Q?ou98VFD2CiV9fDOGSPJZBJDxJXWQq0eYNXzLLSDyTsV57viWNOJGzs9hBKvL?= =?us-ascii?Q?wn/J3ZHPbJwbIMZwOipG3RbB8QX7V0pbnoPCPIY7+3lwWXvJBiRz2w9EVpRx?= =?us-ascii?Q?r+3KUexPFu5D2bqoPeulSQzJw8J9oSOVR0SRG2qHkHGhNfrRoE41oi/RkXV/?= =?us-ascii?Q?1AsLXCpC6G197wlH6FWJQDP1w/S0vttj2xRNf1CzAe73BkoH29vJvpyKZxgK?= =?us-ascii?Q?AVhMUZ6/HhnWCBa/FLpHidl5hSfDFUMtSALgWZQfz2F1kO7qpF45K6uqVZZQ?= =?us-ascii?Q?a5UFiYhseXlg5d5xmf+K/ptnHPc+oP3y1bBbUvjyMgqzKpo7yUQHuepv2JX4?= =?us-ascii?Q?NXzT+U3pz71c4fT+FBlRK6/8c3SdkLoibk4Zc/fLTtFvT2vFGTiMvHn0NKTu?= =?us-ascii?Q?Xw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Nw8k?= =?us-ascii?Q?t6S7941bcV2jJCwJigBtsXrRVhSjFkG7rAM4/KVOwKPGFbzwFFtiVDNzz6dz?= =?us-ascii?Q?K0HTczKxoxbg4VJqFv5AtdBnhiSNaCKu9u/nrZaltIfvdfSk2w7ZlVRYV6Mr?= =?us-ascii?Q?BkMm9qaMqdxWFrwm2/CzTPAS/H8zYGgavjDis8tz?= Content-Type: multipart/alternative; boundary="_000_DM4PR12MB53739E7C42405086CAD382A2A1192DM4PR12MB5373namp_" MIME-Version: 1.0 X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: DM4PR12MB5373.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: e949271e-d905-45ae-43f8-08dc697e9feb X-MS-Exchange-CrossTenant-originalarrivaltime: 01 May 2024 01:32:54.9395 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: H518G09dk8n2VR6VBSErXNFTdGjDJ/ZBJbdFhBZZNbjTuoAtOSSjrAVmS5yDNaPaV0xb1/SaRTdo3/6Ze6rZWw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SA1PR12MB7150 X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 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 --_000_DM4PR12MB53739E7C42405086CAD382A2A1192DM4PR12MB5373namp_ Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Hi Alex, Thanks for your help to backport, patch applied to 23.11.1 LTS release cand= idate queue. ________________________________ From: Alex Vesker Sent: Tuesday, April 30, 2024 1:55 PM To: Xueming Li ; stable@dpdk.org ; Al= ex Vesker Subject: [PATCH 23.11] net/mlx5/hws: fix tunnel protocol checks [ upstream commit 28e69588f4170f29b73a04fc3bffba2596305782 ] Align GRE, GTPU and VXLAN tunnel protocols to fail in case the packet is already tunneled. Also use local defines for protocol UDP ports for better layering of mlx5dr API. Signed-off-by: Alex Vesker Acked-by: Suanming Mou --- drivers/net/mlx5/hws/mlx5dr_definer.c | 39 +++++++++++++-------------- 1 file changed, 19 insertions(+), 20 deletions(-) diff --git a/drivers/net/mlx5/hws/mlx5dr_definer.c b/drivers/net/mlx5/hws/m= lx5dr_definer.c index c6918ef4f3..3391b3d32a 100644 --- a/drivers/net/mlx5/hws/mlx5dr_definer.c +++ b/drivers/net/mlx5/hws/mlx5dr_definer.c @@ -8,8 +8,9 @@ #define BAD_PORT 0xBAD #define ETH_TYPE_IPV4_VXLAN 0x0800 #define ETH_TYPE_IPV6_VXLAN 0x86DD -#define ETH_VXLAN_DEFAULT_PORT 4789 -#define IP_UDP_PORT_MPLS 6635 +#define UDP_GTPU_PORT 2152 +#define UDP_VXLAN_PORT 4789 +#define UDP_PORT_MPLS 6635 #define UDP_ROCEV2_PORT 4791 #define DR_FLOW_LAYER_TUNNEL_NO_MPLS (MLX5_FLOW_LAYER_TUNNEL & ~MLX5_FLOW_= LAYER_MPLS) @@ -162,7 +163,7 @@ struct mlx5dr_definer_conv_data { X(SET, tcp_protocol, STE_TCP, rt= e_flow_item_tcp) \ X(SET_BE16, tcp_src_port, v->hdr.src_port, rt= e_flow_item_tcp) \ X(SET_BE16, tcp_dst_port, v->hdr.dst_port, rt= e_flow_item_tcp) \ - X(SET, gtp_udp_port, RTE_GTPU_UDP_PORT, rte= _flow_item_gtp) \ + X(SET, gtp_udp_port, UDP_GTPU_PORT, rte= _flow_item_gtp) \ X(SET_BE32, gtp_teid, v->hdr.teid, rt= e_flow_item_gtp) \ X(SET, gtp_msg_type, v->hdr.msg_type, rt= e_flow_item_gtp) \ X(SET, gtp_ext_flag, !!v->hdr.gtp_hdr_info, rt= e_flow_item_gtp) \ @@ -170,8 +171,8 @@ struct mlx5dr_definer_conv_data { X(SET, gtp_ext_hdr_pdu, v->hdr.type, rt= e_flow_item_gtp_psc) \ X(SET, gtp_ext_hdr_qfi, v->hdr.qfi, rt= e_flow_item_gtp_psc) \ X(SET, vxlan_flags, v->flags, rt= e_flow_item_vxlan) \ - X(SET, vxlan_udp_port, ETH_VXLAN_DEFAULT_PORT, rte= _flow_item_vxlan) \ - X(SET, mpls_udp_port, IP_UDP_PORT_MPLS, rte= _flow_item_mpls) \ + X(SET, vxlan_udp_port, UDP_VXLAN_PORT, rte= _flow_item_vxlan) \ + X(SET, mpls_udp_port, UDP_PORT_MPLS, rte= _flow_item_mpls) \ X(SET, source_qp, v->queue, ml= x5_rte_flow_item_sq) \ X(SET, tag, v->data, rt= e_flow_item_tag) \ X(SET, metadata, v->data, rt= e_flow_item_meta) \ @@ -1184,6 +1185,12 @@ mlx5dr_definer_conv_item_gtp(struct mlx5dr_definer_c= onv_data *cd, const struct rte_flow_item_gtp *m =3D item->mask; struct mlx5dr_definer_fc *fc; + if (cd->tunnel) { + DR_LOG(ERR, "Inner GTPU item not supported"); + rte_errno =3D ENOTSUP; + return rte_errno; + } + /* Overwrite GTPU dest port if not present */ fc =3D &cd->fc[DR_CALC_FNAME(L4_DPORT, false)]; if (!fc->tag_set && !cd->relaxed) { @@ -1358,9 +1365,13 @@ mlx5dr_definer_conv_item_vxlan(struct mlx5dr_definer= _conv_data *cd, struct mlx5dr_definer_fc *fc; bool inner =3D cd->tunnel; - /* In order to match on VXLAN we must match on ether_type, ip_proto= col - * and l4_dport. - */ + if (inner) { + DR_LOG(ERR, "Inner VXLAN item not supported"); + rte_errno =3D ENOTSUP; + return rte_errno; + } + + /* In order to match on VXLAN we must match on ip_protocol and l4_d= port */ if (m && (m->rsvd0[0] !=3D 0 || m->rsvd0[1] !=3D 0 || m->rsvd0[2] = !=3D 0 || m->rsvd1 !=3D 0)) { DR_LOG(ERR, "reserved fields are not supported"); @@ -1390,12 +1401,6 @@ mlx5dr_definer_conv_item_vxlan(struct mlx5dr_definer= _conv_data *cd, return 0; if (m->flags) { - if (inner) { - DR_LOG(ERR, "Inner VXLAN flags item not supported")= ; - rte_errno =3D ENOTSUP; - return rte_errno; - } - fc =3D &cd->fc[MLX5DR_DEFINER_FNAME_VXLAN_FLAGS]; fc->item_idx =3D item_idx; fc->tag_set =3D &mlx5dr_definer_vxlan_flags_set; @@ -1405,12 +1410,6 @@ mlx5dr_definer_conv_item_vxlan(struct mlx5dr_definer= _conv_data *cd, } if (!is_mem_zero(m->vni, 3)) { - if (inner) { - DR_LOG(ERR, "Inner VXLAN vni item not supported"); - rte_errno =3D ENOTSUP; - return rte_errno; - } - fc =3D &cd->fc[MLX5DR_DEFINER_FNAME_VXLAN_VNI]; fc->item_idx =3D item_idx; fc->tag_set =3D &mlx5dr_definer_vxlan_vni_set; -- 2.18.1 --_000_DM4PR12MB53739E7C42405086CAD382A2A1192DM4PR12MB5373namp_ Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable
Hi Alex,

Thanks for your help to backport, patch applied to 23.11.1 LTS release cand= idate queue.

From: Alex Vesker <valex= @nvidia.com>
Sent: Tuesday, April 30, 2024 1:55 PM
To: Xueming Li <xuemingl@nvidia.com>; stable@dpdk.org <stab= le@dpdk.org>; Alex Vesker <valex@nvidia.com>
Subject: [PATCH 23.11] net/mlx5/hws: fix tunnel protocol checks
 
[ upstream commit 28e69588f4170f29b73a04fc3bffba25= 96305782 ]

Align GRE, GTPU and VXLAN tunnel protocols to fail
in case the packet is already tunneled. Also use local
defines for protocol UDP ports for better layering of
mlx5dr API.

Signed-off-by: Alex Vesker <valex@nvidia.com>
Acked-by: Suanming Mou <suanmingm@nvidia.com>
---
 drivers/net/mlx5/hws/mlx5dr_definer.c | 39 +++++++++++++-------------= -
 1 file changed, 19 insertions(+), 20 deletions(-)

diff --git a/drivers/net/mlx5/hws/mlx5dr_definer.c b/drivers/net/mlx5/hws/m= lx5dr_definer.c
index c6918ef4f3..3391b3d32a 100644
--- a/drivers/net/mlx5/hws/mlx5dr_definer.c
+++ b/drivers/net/mlx5/hws/mlx5dr_definer.c
@@ -8,8 +8,9 @@
 #define BAD_PORT        0xBAD
 #define ETH_TYPE_IPV4_VXLAN     0x0800
 #define ETH_TYPE_IPV6_VXLAN     0x86DD
-#define ETH_VXLAN_DEFAULT_PORT 4789
-#define IP_UDP_PORT_MPLS       6635
+#define UDP_GTPU_PORT   2152
+#define UDP_VXLAN_PORT  4789
+#define UDP_PORT_MPLS   6635
 #define UDP_ROCEV2_PORT 4791
 #define DR_FLOW_LAYER_TUNNEL_NO_MPLS (MLX5_FLOW_LAYER_TUNNEL & ~M= LX5_FLOW_LAYER_MPLS)
 
@@ -162,7 +163,7 @@ struct mlx5dr_definer_conv_data {
         X(SET,   &n= bsp;      tcp_protocol,    &nb= sp;      STE_TCP,     &nb= sp;          rte_flow_item_tcp= ) \
         X(SET_BE16,  &nb= sp;  tcp_src_port,        &nbs= p;  v->hdr.src_port,        rte_= flow_item_tcp) \
         X(SET_BE16,  &nb= sp;  tcp_dst_port,        &nbs= p;  v->hdr.dst_port,        rte_= flow_item_tcp) \
-       X(SET,     &= nbsp;    gtp_udp_port,      &n= bsp;    RTE_GTPU_UDP_PORT,      rte= _flow_item_gtp) \
+       X(SET,     &= nbsp;    gtp_udp_port,      &n= bsp;    UDP_GTPU_PORT,      &n= bsp;   rte_flow_item_gtp) \
         X(SET_BE32,  &nb= sp;  gtp_teid,         &n= bsp;     v->hdr.teid,     &= nbsp;      rte_flow_item_gtp) \
         X(SET,   &n= bsp;      gtp_msg_type,    &nb= sp;      v->hdr.msg_type,   &nbs= p;    rte_flow_item_gtp) \
         X(SET,   &n= bsp;      gtp_ext_flag,    &nb= sp;      !!v->hdr.gtp_hdr_info,  rte_flow_= item_gtp) \
@@ -170,8 +171,8 @@ struct mlx5dr_definer_conv_data {
         X(SET,   &n= bsp;      gtp_ext_hdr_pdu,    =     v->hdr.type,       = ;     rte_flow_item_gtp_psc) \
         X(SET,   &n= bsp;      gtp_ext_hdr_qfi,    =     v->hdr.qfi,       =       rte_flow_item_gtp_psc) \
         X(SET,   &n= bsp;      vxlan_flags,    &nbs= p;       v->flags,    =            rte_flow_item_= vxlan) \
-       X(SET,     &= nbsp;    vxlan_udp_port,      =    ETH_VXLAN_DEFAULT_PORT, rte_flow_item_vxlan) \
-       X(SET,     &= nbsp;    mpls_udp_port,      &= nbsp;   IP_UDP_PORT_MPLS,       rte= _flow_item_mpls) \
+       X(SET,     &= nbsp;    vxlan_udp_port,      =    UDP_VXLAN_PORT,        = ; rte_flow_item_vxlan) \
+       X(SET,     &= nbsp;    mpls_udp_port,      &= nbsp;   UDP_PORT_MPLS,       &= nbsp;  rte_flow_item_mpls) \
         X(SET,   &n= bsp;      source_qp,     =          v->queue,  &n= bsp;            mlx5= _rte_flow_item_sq) \
         X(SET,   &n= bsp;      tag,      =             &nb= sp; v->data,          =       rte_flow_item_tag) \
         X(SET,   &n= bsp;      metadata,     &= nbsp;         v->data, &nbs= p;            &= nbsp; rte_flow_item_meta) \
@@ -1184,6 +1185,12 @@ mlx5dr_definer_conv_item_gtp(struct mlx5dr_definer_c= onv_data *cd,
         const struct rte_flow_item= _gtp *m =3D item->mask;
         struct mlx5dr_definer_fc *= fc;
 
+       if (cd->tunnel) {
+            &n= bsp;  DR_LOG(ERR, "Inner GTPU item not supported");
+            &n= bsp;  rte_errno =3D ENOTSUP;
+            &n= bsp;  return rte_errno;
+       }
+
         /* Overwrite GTPU dest por= t if not present */
         fc =3D &cd->fc[DR_C= ALC_FNAME(L4_DPORT, false)];
         if (!fc->tag_set &&= amp; !cd->relaxed) {
@@ -1358,9 +1365,13 @@ mlx5dr_definer_conv_item_vxlan(struct mlx5dr_definer= _conv_data *cd,
         struct mlx5dr_definer_fc *= fc;
         bool inner =3D cd->tunn= el;
 
-       /* In order to match on VXLAN we must= match on ether_type, ip_protocol
-        * and l4_dport.
-        */
+       if (inner) {
+            &n= bsp;  DR_LOG(ERR, "Inner VXLAN item not supported");
+            &n= bsp;  rte_errno =3D ENOTSUP;
+            &n= bsp;  return rte_errno;
+       }
+
+       /* In order to match on VXLAN we must= match on ip_protocol and l4_dport */
         if (m && (m->rs= vd0[0] !=3D 0 || m->rsvd0[1] !=3D 0 || m->rsvd0[2] !=3D 0 ||
             m-= >rsvd1 !=3D 0)) {
            &nb= sp;    DR_LOG(ERR, "reserved fields are not supported&q= uot;);
@@ -1390,12 +1401,6 @@ mlx5dr_definer_conv_item_vxlan(struct mlx5dr_definer= _conv_data *cd,
            &nb= sp;    return 0;
 
         if (m->flags) {
-            &n= bsp;  if (inner) {
-            &n= bsp;          DR_LOG(ERR, &quo= t;Inner VXLAN flags item not supported");
-            &n= bsp;          rte_errno =3D EN= OTSUP;
-            &n= bsp;          return rte_errno= ;
-            &n= bsp;  }
-
            &nb= sp;    fc =3D &cd->fc[MLX5DR_DEFINER_FNAME_VXLAN_FLAG= S];
            &nb= sp;    fc->item_idx =3D item_idx;
            &nb= sp;    fc->tag_set =3D &mlx5dr_definer_vxlan_flags_se= t;
@@ -1405,12 +1410,6 @@ mlx5dr_definer_conv_item_vxlan(struct mlx5dr_definer= _conv_data *cd,
         }
 
         if (!is_mem_zero(m->vni= , 3)) {
-            &n= bsp;  if (inner) {
-            &n= bsp;          DR_LOG(ERR, &quo= t;Inner VXLAN vni item not supported");
-            &n= bsp;          rte_errno =3D EN= OTSUP;
-            &n= bsp;          return rte_errno= ;
-            &n= bsp;  }
-
            &nb= sp;    fc =3D &cd->fc[MLX5DR_DEFINER_FNAME_VXLAN_VNI]= ;
            &nb= sp;    fc->item_idx =3D item_idx;
            &nb= sp;    fc->tag_set =3D &mlx5dr_definer_vxlan_vni_set;=
--
2.18.1

--_000_DM4PR12MB53739E7C42405086CAD382A2A1192DM4PR12MB5373namp_--