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 6ACB645BC3; Thu, 24 Oct 2024 21:30:43 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 4220B434E6; Thu, 24 Oct 2024 21:30:43 +0200 (CEST) Received: from NAM12-DM6-obe.outbound.protection.outlook.com (mail-dm6nam12on2070.outbound.protection.outlook.com [40.107.243.70]) by mails.dpdk.org (Postfix) with ESMTP id D2B89400EF for ; Thu, 24 Oct 2024 21:30:41 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=H4TY1aLf8X3VNHD/Sdtl2HQYd/83xPFVr0+iIfzD3Z2lQGbDV1km2Je5etrH/LZ8MYy2yLBttQeKYMeLFKeSYxXatIt0tCHL/zugJE70dkGMJZoLGce0lIzk1EI8+0gEffJFpEhcOszn1Zr1JFo1J+oVWb3isN0Jz3XXUKmBGo9peTgIqIqFLgTgq7+YACS37+CZonHuv2B1a0rOwkeja2BesTcgkv6PU9AVIF8TvksIDYED9rCkTKl/1eTmWhwYww2AI55cnB/HSyQeX7IwzZUmcdtj+MOFUAMruUOhYS4mtvbhO8i9jPK8M5pqX2ra+vRH8fKgRqBWXvIrw6somw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; 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=9k1BOxS97ISKm4ZR/A9LpYe56+vvH7S9ImfuNLRJC34=; b=NCEH18KC2CPXN/4kgkn0hn1Rc0WE9/37nvjhuoBxrLxRBu39mNGZ7PJlbvLakGEB43WQmWYtALQgCOsf6c8oiXPItpuShga34nxPFaZxf5gLSg0ZkLCoLFWughA24mhoLfCkWGv09SmR+sqSzdcqLrDtrT0oGYOpXg02IYT1TuCJ3uKL19XQsHJdkISoyEyni4FBwhlivcFFBC/N9vDe3ywBX2T7qLmWGBevbZAz3KwsbK7JNr8QZIsYRCb4VaN9HN3YI3HrmPSHVUtjeBsXbh/R1NcEpVvSNrVEzRfvn07Ks75x+xsPu2jQp8qUBmhgQ8Ik4DTDJjPC6huipiHpqw== 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=9k1BOxS97ISKm4ZR/A9LpYe56+vvH7S9ImfuNLRJC34=; b=a5KmEClct6n7d1x/8fn6Zb4LwS5kgGwauPUuT/YAYlcsqOno9J5D150BCqSgmNlYiAU00UVJl1x1FCPJvA88Iqrs/psJ5otDsLrZyYhCZruw72eDKNwAO71r8t2Oo23foNfYvW6xijOHIEI5duPAkVdTy/pTqKXJcSHIB3MP4T/SEjc0DzSnYYlG9sZroVgM0+wWBeQhhU6kBw7uOJeEJXgq5Pvu3wEZoV5dyLrweeDd+Us3FjdPyis6N1idKU8fVMqfjZHDQGeDqMpqQAY11JaC2yYtejapf2SnXi86PumFD/gTWM7oZXFbk7jx1sa9XJxuNFhFbPMgErPoj/NpfQ== Received: from DM4PR12MB7501.namprd12.prod.outlook.com (2603:10b6:8:113::14) by PH0PR12MB8100.namprd12.prod.outlook.com (2603:10b6:510:29b::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8093.20; Thu, 24 Oct 2024 19:30:37 +0000 Received: from DM4PR12MB7501.namprd12.prod.outlook.com ([fe80::70dc:609d:fad1:379c]) by DM4PR12MB7501.namprd12.prod.outlook.com ([fe80::70dc:609d:fad1:379c%5]) with mapi id 15.20.8093.014; Thu, 24 Oct 2024 19:30:37 +0000 From: Alexander Kozyrev To: Nithin Dabilpuram CC: David Marchand , "dev@dpdk.org" , Dariusz Sosnowski , Ori Kam , "olivier.matz@6wind.com" , "NBU-Contact-Thomas Monjalon (EXTERNAL)" , Matan Azrad , "jerinj@marvell.com" , "rbhansali@marvell.com" , "ferruh.yigit@amd.com" Subject: Re: [PATCH] mbuf: add transport mode ESP packet type Thread-Topic: [PATCH] mbuf: add transport mode ESP packet type Thread-Index: AQHa9Kieij4aUQ4NL0mkp3ToPBTvS7KM3lCAgAZCWOaAAQVPgIAChN8w Date: Thu, 24 Oct 2024 19:30:37 +0000 Message-ID: References: <20240822153218.3782170-1-akozyrev@nvidia.com> In-Reply-To: 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: DM4PR12MB7501:EE_|PH0PR12MB8100:EE_ x-ms-office365-filtering-correlation-id: 5d32bbb4-6494-4f60-aeea-08dcf46256b4 x-ld-processed: 43083d15-7273-40c1-b7db-39efd9ccc17a,ExtAddr x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; ARA:13230040|366016|376014|1800799024|38070700018|8096899003; x-microsoft-antispam-message-info: =?iso-8859-1?Q?T0ItxVORyLPV/FUyK9HwzP2zkl23VcwC99uNvNFhPGs+RYBYT9pmnilJw4?= =?iso-8859-1?Q?2aLIJcQqf/PMtDRPgKiaqLH2rT3Q/fvJ/acG6SKCOsEhswcPAsqJ1F0Ez0?= =?iso-8859-1?Q?s8BFlEoodQFJJMqZcRiqulR+fF/8hhD85yr1PNko/avhHlIFtWYXcQMbCL?= =?iso-8859-1?Q?qLkayvSJkBcxJKI1Oq7y5GZFBQ8m8eOSuX/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DYJ4XTf9hh/eIVgp/yMMz3LmbiL/xxmWKB/ZcmjQy95d0eE?= =?iso-8859-1?Q?tHa5zvZQ+bWJmSprRy57uBie5oExHDeus9czKwAG/+SMJjks/YD4Sub5dz?= =?iso-8859-1?Q?NmWqm23hjQ8vHId5JxuEruZp+TP81z9OsbTZva0+4dABBw8umiemep5Cjv?= =?iso-8859-1?Q?lK5yHC12SUq+MkiaW2P6hSMZ/T792Scqr1YLYRp6L/mgJamKhi2ywDFsZq?= =?iso-8859-1?Q?/0oKMbkdATRYQ2qcSuJFD4NjNI6cowMuUhFMon1PR539x+goyL7gU5O53R?= =?iso-8859-1?Q?D/fXYfozLUrzcYZEIpNzEf7gUdnMDyqwBJj+ldITIJl5V22jyrnk8=3D?= x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DM4PR12MB7501.namprd12.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230040)(366016)(376014)(1800799024)(38070700018)(8096899003); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?iso-8859-1?Q?RF3nWOkUzz+j2ntor7jnQOoU1bXUc0fRjRfGT895dAiSPURrxsnNiRQyzz?= =?iso-8859-1?Q?cBq+BxJBG9i2HsXtT49sFgPHthE0g0wIrm+gLShyFk8Bs3QDaBAIp5VW8G?= =?iso-8859-1?Q?59Y9JAhG5XSJf2x5EXsTbJZFkMYKbx+ts0GVz//HY+7yphecjXnZ0W+WIM?= =?iso-8859-1?Q?IOe9P6eYxDTC0iap3AREog6GO+6XewEnrOAib+j43Fnw127/euxnNC2Eom?= =?iso-8859-1?Q?V5UvKymoYxV6GfCQSZxj3e1AIyXPfG0ObaxRkWPpqNZVrBCDemhtBgXZbk?= =?iso-8859-1?Q?jK816LH9HNnyEQ8rBGozmUVckRt4gef4jvZHalP0XbTqugPluhsc1yhD5r?= =?iso-8859-1?Q?fIlKx4BZb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lk7fAdlcLei?= =?iso-8859-1?Q?nPycUXXabGDioVhMYTAkNN0YL6+YtRgcFzm8CH9vFkcL2+0OUaCf0irsrv?= =?iso-8859-1?Q?QdnWIEANpmOr9qUCA/dBGcaRwGojgGArtrvZ/F34XltIE46bJulCa6KZn8?= =?iso-8859-1?Q?NaaPZ5wjWOXBP9kAij/v7FkEF+xGeCvJDlt+/89UGH3BrIDIJDyDQyO1jM?= =?iso-8859-1?Q?8LEuuTieqO/5t5KcJ7PMrZaiRyRbQFFRwNNfc9iXBZ2LhI3TmvNZaIdiG/?= =?iso-8859-1?Q?2gTGG+GHXGjjRUXCx5pdoOTkt2SoQsz+0dA+XnpHArgqCCbO6JxCO9jTK1?= =?iso-8859-1?Q?/ZukLIQaMytX/il2k+OGM83hMOWQIdmN2rU0JOiwfZ3gFlL6u1LaMeZ331?= =?iso-8859-1?Q?ExfWIapNc3Ha0fb4qIfnhLRWPfey2PjNgc?= Content-Type: multipart/alternative; boundary="_000_DM4PR12MB75013750F24574ABE3638EC3AF4E2DM4PR12MB7501namp_" MIME-Version: 1.0 X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: DM4PR12MB7501.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 5d32bbb4-6494-4f60-aeea-08dcf46256b4 X-MS-Exchange-CrossTenant-originalarrivaltime: 24 Oct 2024 19:30:37.7931 (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: 8voTbf36TFXP8dcPU/btm+Cs8QG17mQ/lihpEBGXYhyb3jtlhNBo++MZTTow+OOqhMFc4sYRoaIGMrR4QP7nYg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH0PR12MB8100 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org --_000_DM4PR12MB75013750F24574ABE3638EC3AF4E2DM4PR12MB7501namp_ Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable >>And we definitely need RTE_PTYPE_INNER_L4_ESP for ESP over UDP support. >Isn't this already taken care when mbuf->packet_type =3D >(RTE_PTYPE_L4_UDP | RTE_PTYPE_TUNNEL_ESP) ? This is ambigous. And both UDP and ESP are L4 headers, which can lead to the undefined behavior when we specify both of them. They are mutually exclusive in our hardware, for example. That is why we have RTE_PTYPE_TUNNEL_MPLS_IN_GRE and RTE_PTYPE_TUNNEL_MPLS_IN_UDP for MPLS. We could go and indroduce RTE_PTYPE_TUNNEL_ESP_IN_UDP to resolve the ambiguity, or have RTE_PTYPE_INNER_L4_ESP. I choose the second variant to have a generic way for ESP packets over any type of encapsulation. --_000_DM4PR12MB75013750F24574ABE3638EC3AF4E2DM4PR12MB7501namp_ Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable
>>And we definitely need RTE_PTYPE_INNER_L4_ESP for ESP over UDP supp= ort.
>Isn't this already taken care when mbuf->packet_type =3D
>(RTE_PTYPE_L4_UDP | RTE_PTYPE_TUNNEL_ESP) ?

This is ambigous. And both UDP and ESP are L4 headers,
which can lead to the undefined behavior when we specify both of them.
They are mutually exclusive in our hardware, for example.
That is why we have RTE_PTYPE_TUNNEL_MPLS_IN_GRE and
RTE_PTYPE_TUNNEL_MPLS_IN_UDP for MPLS.
We could go and indroduce RTE_PTYPE_TUNNEL_ESP_IN_UDP
to resolve the ambiguity, or have RTE_PTYPE_INNER_L4_ESP.
I choose the second variant to have a generic way for 
ESP packets over any type of encapsulation.

--_000_DM4PR12MB75013750F24574ABE3638EC3AF4E2DM4PR12MB7501namp_--