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 964F6A0524; Tue, 13 Apr 2021 15:03:48 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 1C929160F4A; Tue, 13 Apr 2021 15:03:48 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0a-0016f401.pphosted.com [67.231.148.174]) by mails.dpdk.org (Postfix) with ESMTP id 02605160E7C for ; Tue, 13 Apr 2021 15:03:45 +0200 (CEST) Received: from pps.filterd (m0045849.ppops.net [127.0.0.1]) by mx0a-0016f401.pphosted.com (8.16.0.43/8.16.0.43) with SMTP id 13DD1mrc019611; Tue, 13 Apr 2021 06:03:43 -0700 Received: from nam12-dm6-obe.outbound.protection.outlook.com (mail-dm6nam12lp2168.outbound.protection.outlook.com [104.47.59.168]) by mx0a-0016f401.pphosted.com with ESMTP id 37w6vugwe4-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 13 Apr 2021 06:03:43 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=QPpFa+7gtfybxSBN1NQZL1ZAsjGtBkhJW0Z0Ag1ApO9WXVnJqsmwNrsSGDw5pQ6jgy+5qDKH1b3otMq6kaceJMPCofSOm0WEzrlFprAplL8RHZDRvLlTrB1CkGFN49CdD/er3hDiiZDhGj3v/+h3TI5GOlzp9B/3rGM+yM/AUsfZQqLkgcJxZ/CI+D3E7kxM49WOAGeu1U99jN9rXQWZnZMu4ecX+JwELDP2yVQJ5QQbcRsVXPj4uso8+w7evSOTOvnCT7FHrfmpG2yFws+FGZ4+uuUws4cnwZe1ZTaUZ0pikhC2Js6iFNa5UlkH+YHv2JUiHOrCbL7eOZsi/3JL5g== 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-SenderADCheck; bh=YSdynvm1O+Uy87fdlRrpzbJAiIgpK0ZPjpIf7hAHeek=; b=Xz5P8pd25D4jgRxmV4kGCNVHPFA6aReQVAmyzQ3SlW5PJWgWAMiy43T9eUMIEq9+7D9ksnNXX97w3JxRy+9bex/FnplfGcjOKYYGQjEVyeiFIvM47TLDhnm6Npny6rmkrupKeyZ59MFAOPYArmVL8ul+jbyBDMjvzOZJOj3CaieZNIBX0d4jBWbq1rwlPpfmjvUaocP6gm+x02aEm+7XUqJGFd9phhaTPYJ1c1oyd/zIFka/Y6C7LwgBbK8VJr6FCPQ4yYtf8IOsZvwy0rx6NltEw9Euwc6Ux17NB6GPu00Bs+YIud+5MebqxOcNof+IrOVlLiYtIE96ucmlNJlPEQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=marvell.com; dmarc=pass action=none header.from=marvell.com; dkim=pass header.d=marvell.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.onmicrosoft.com; s=selector1-marvell-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=YSdynvm1O+Uy87fdlRrpzbJAiIgpK0ZPjpIf7hAHeek=; b=Gh8fe70l7/oJ+oMw3KQYk45XiM0jFH6gerCoLdloZJ1shTFMeIff2Pf2D2qlE+OfpidRErGYnJvd8ApJCYrtg14Jiv3AVFf/NXWoF+lYENUwe5LqAolY91vwxqTEkHcCsh7++WcGPxYADPQgefb8taK60sZezr8BJws43uU7DpM= Received: from MW2PR18MB2284.namprd18.prod.outlook.com (2603:10b6:907:10::16) by CO6PR18MB3812.namprd18.prod.outlook.com (2603:10b6:5:341::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4020.18; Tue, 13 Apr 2021 13:03:40 +0000 Received: from MW2PR18MB2284.namprd18.prod.outlook.com ([fe80::3168:cb00:6607:743f]) by MW2PR18MB2284.namprd18.prod.outlook.com ([fe80::3168:cb00:6607:743f%7]) with mapi id 15.20.4020.022; Tue, 13 Apr 2021 13:03:39 +0000 From: Akhil Goyal To: Olivier Matz , Tejasree Kondoj , Konstantin Ananyev CC: Radu Nicolau , Anoob Joseph , Ankur Dwivedi , Jerin Jacob Kollanukkaran , "dev@dpdk.org" Thread-Topic: [EXT] Re: [dpdk-dev] [PATCH v3 2/4] mbuf: add packet type for UDP-ESP tunnel packets Thread-Index: AQHXLEwiwVQqHlDsoUKbtlFLy2Bd7aqqdt6AgAGKr8CABnArwA== Date: Tue, 13 Apr 2021 13:03:39 +0000 Message-ID: References: <20210408081720.23314-1-ktejasree@marvell.com> <20210408081720.23314-3-ktejasree@marvell.com> <20210408111007.GT1650@platinum> In-Reply-To: Accept-Language: en-US Content-Language: en-US X-Mentions: konstantin.ananyev@intel.com X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: 6wind.com; dkim=none (message not signed) header.d=none;6wind.com; dmarc=none action=none header.from=marvell.com; x-originating-ip: [182.69.47.6] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 2507ea5a-b463-47d6-ff81-08d8fe7c8ee7 x-ms-traffictypediagnostic: CO6PR18MB3812: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:10000; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: nxgB27g0k29mCsOIQXQ5mqxGUfzubwpylYFn6J8IjRm4otZ7KCoR9xGCwO5dKCOQtdDpLDArqh/TPWSbotWXzN8dL4gIfM1Hj+3ooX4SYf12npAgYmMipHCZrHN+D7AZ6MpwucUvcRyTGroRzbhtFgZa++NMwJ/GmBx7VLFtXa7Mj95o2T58cl1GWumA0XCjCa+JHROCmntuJb7ml67gK7WhEK1qMfMZTTtI/oX7BHnEPDrnAZKbq2JlDZYqch1RfHS5ztNtVu10lZZGmQ4byTtwh5jt7jBWDwUDs7CIwzwjw0Zim1vcObfaoFWzdPgroMH1gPyKQqZiTscCajNsH16T4AdxoiMvCVrsJHswnug9RDfEEjcaG2dlmqLobPK0rabp4gDNcuy2T5w2haaRY5BDZPxfe8hcV13xQiXmBf579oBnWZjtcz91JDSiJdvqmRpBxgNKMts7WGaTqTS5t0reFan6RpSYi1d9Tr0MNR6nODbue7d1OLd2iLfgodLgVxoa6z8FIMhxUSMerQqirhJLyEfXjYo2oMjENiJqhTLADRVVIKl0QmtcUaDPVnpJvucfXPatvOgYBZT0EpxpAV90plRc7JxfMgfdkv8l2hM= x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:MW2PR18MB2284.namprd18.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(366004)(8936002)(86362001)(7696005)(9686003)(64756008)(66476007)(2906002)(122000001)(66946007)(66556008)(4326008)(110136005)(66446008)(186003)(6506007)(76116006)(498600001)(55016002)(38100700002)(52536014)(33656002)(83380400001)(71200400001)(26005)(54906003)(5660300002)(8676002); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata: =?us-ascii?Q?A9mVuQodVXrYC0eO6gXkMfWOaN+TSSAN4zmsqBs15wUniaKiL5WKIggORPXv?= =?us-ascii?Q?balQsg+6hLvfJI7gxJx+EeRoGvXoRTbdmuzshUPcL4zWF/ic4FDRB5LDECXj?= =?us-ascii?Q?4aO5fyBlOQOfhwhp/cTFHowvCD0dIEyEktWGtphwtzNzl7s/eA0sb0E4+TQp?= =?us-ascii?Q?feF6VKXDURCQPScS3Ux6ZJU+isLKLGSIMabOEg/CZy1LZfpxUdhO9IavFuz/?= =?us-ascii?Q?K+d8+CcSPowBFV2syhQpoee6sP7C4Z0PKkxoSvaZGUUdg+oSj1b0doqlnGea?= =?us-ascii?Q?CRydFJh2GRD/17Ik0ExUI/hXG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-ascii?Q?JNSAVPj51E67GxDOIyvDS8eZHxMD7BipRYmV1lOei4kJw3VwPUHNhwbEFIpw?= =?us-ascii?Q?t6X0O9F73WVroXxfNMxWQBcmq1kMnvbpniBJY/qfpFYabrJeVte91EIUowEW?= =?us-ascii?Q?m/A=3D?= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: marvell.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: MW2PR18MB2284.namprd18.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 2507ea5a-b463-47d6-ff81-08d8fe7c8ee7 X-MS-Exchange-CrossTenant-originalarrivaltime: 13 Apr 2021 13:03:39.7505 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 70e1fb47-1155-421d-87fc-2e58f638b6e0 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: wi9Q/t3Vu+kwd9RCA/dWCnq+HlqIYA+RgwKGTU7ilVdn1eztPVA5yn43Zvbv2bIzfFwTcVpmBsgapwQZjmn/Qw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: CO6PR18MB3812 X-Proofpoint-GUID: WoimYFGItd8loBrla84TR_chlwcAMWYS X-Proofpoint-ORIG-GUID: WoimYFGItd8loBrla84TR_chlwcAMWYS X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.391, 18.0.761 definitions=2021-04-13_07:2021-04-13, 2021-04-13 signatures=0 Subject: Re: [dpdk-dev] [EXT] Re: [PATCH v3 2/4] mbuf: add packet type for UDP-ESP tunnel packets 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 Sender: "dev" Hi Olivier/ Konstantin, > > On Thu, Apr 08, 2021 at 01:47:18PM +0530, Tejasree Kondoj wrote: > > > Adding new mbuf packet type for UDP encapsulated > > > ESP packets. > > > > > > Signed-off-by: Tejasree Kondoj > > > --- > > > doc/guides/rel_notes/release_21_05.rst | 5 +++++ > > > lib/librte_mbuf/rte_mbuf_ptype.h | 21 +++++++++++++++++++++ > > > 2 files changed, 26 insertions(+) > > > > > > diff --git a/doc/guides/rel_notes/release_21_05.rst > > b/doc/guides/rel_notes/release_21_05.rst > > > index 5565c7637c..c9e9e2ec22 100644 > > > --- a/doc/guides/rel_notes/release_21_05.rst > > > +++ b/doc/guides/rel_notes/release_21_05.rst > > > @@ -55,6 +55,11 @@ New Features > > > Also, make sure to start the actual text at the margin. > > > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D > > > > > > +* **Added new packet type for UDP-ESP packets in mbuf.** > > > + > > > + Added new packet type ``RTE_PTYPE_TUNNEL_ESP_IN_UDP`` which can > > be > > > + used to identify UDP encapsulated ESP packets. > > > + > > > * **Enhanced ethdev representor syntax.** > > > > > > * Introduced representor type of VF, SF and PF. > > > diff --git a/lib/librte_mbuf/rte_mbuf_ptype.h > > b/lib/librte_mbuf/rte_mbuf_ptype.h > > > index 17a2dd3576..bf92ce0c1a 100644 > > > --- a/lib/librte_mbuf/rte_mbuf_ptype.h > > > +++ b/lib/librte_mbuf/rte_mbuf_ptype.h > > > @@ -491,6 +491,27 @@ extern "C" { > > > * | 'destination port'=3D6635> > > > */ > > > #define RTE_PTYPE_TUNNEL_MPLS_IN_UDP 0x0000d000 > > > +/** > > > + * ESP-in-UDP tunneling packet type (RFC 3948). > > > + * > > > + * Packet format: > > > + * <'ether type'=3D0x0800 > > > + * | 'version'=3D4, 'protocol'=3D17 > > > + * | 'destination port'=3D4500> > > > + * or, > > > + * <'ether type'=3D0x86DD > > > + * | 'version'=3D6, 'next header'=3D17 > > > + * | 'destination port'=3D4500> > > > + * or, > > > + * <'ether type'=3D0x0800 > > > + * | 'version'=3D4, 'protocol'=3D17 > > > + * | 'source port'=3D4500> > > > + * or, > > > + * <'ether type'=3D0x86DD > > > + * | 'version'=3D6, 'next header'=3D17 > > > + * | 'source port'=3D4500> > > > + */ > > > +#define RTE_PTYPE_TUNNEL_ESP_IN_UDP 0x0000e000 > > > /** > > > * Mask of tunneling packet types. > > > */ > > > > We arrive at the end of the values in packet type tunnel types, > > and there is another pending patch that needs another tunnel type. > > > > As there is already a RTE_PTYPE_TUNNEL_ESP, what would you think about > > trying to reuse it, and differentiate IP/ESP from IP/UDP/ESP by using > > the L4 layer type (unknown vs udp)? Or maybe add RTE_PTYPE_L4_NONE. > > > > It is sensible, because it can be considered as an API change for > > current users of RTE_PTYPE_TUNNEL_ESP. I don't really know how this > > type is used by applications. >=20 > It is OK to use combination of these two but with an assumption > that a normal - IP-UDP packet when encrypted will be an IP-ESP packet > And L4 types are reset from the mbuf->packet_type by the driver. > @Konstantin Ananyev: Are you OK with this assumption? >=20 > And, if we choose this path, then also we may need a macro in this file, > So that application doesn't have to combine that explicitly for a standar= d use > case. > #define RTE_PTYPE_TUNNEL_ESP_IN_UDP RTE_PTYPE_TUNNEL_ESP | > RTE_PTYPE_L4_UDP >=20 > Will this be fine? >=20 Can we proceed with this approach? Regards, Akhil > > > > I think it is time to start thinking about how the packet_type > > mbuf API can evolve to solve this issue. > > > > By the way, the update of *rte_get_ptype_tunnel_name() is missing.