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 CFA99A0579; Thu, 8 Apr 2021 14:37:30 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 650FD40698; Thu, 8 Apr 2021 14:37:30 +0200 (CEST) Received: from NAM11-BN8-obe.outbound.protection.outlook.com (mail-bn8nam11on2043.outbound.protection.outlook.com [40.107.236.43]) by mails.dpdk.org (Postfix) with ESMTP id 07FB940138 for ; Thu, 8 Apr 2021 14:37:28 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=gW87PsbS1NoMTSw7c0+nmW42TsGWNDFu+FUykyFWJ9JJ0hWYqHoWMDYhMseXyOHOc9FITopymBRyaSp3hPNgf5ljj9XM+1aUVqQLVwJFYBJoWeQCHPsLv7oisGgQFGWERBowCuKX74+CNWpwoMgRYQS0mTOYxi1aY4gdufATynY654kEW9iS+4fId43Bn5+02fVAeDTltW+gJ32dVSiQ1QkiGLNAyHJ/+N+mhKRnfHjHEEBzGmwN2865Lv3XBoysEQ4U8+qTPsSk9Wh6Cml1Be0iq+HC51Nifnk/k8wa6LN/yIjOAP0oFKD4kMoL3ewoRFwPEVlF4LooT29rwwu4Ww== 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=8MnDelsJgaXhzlSc7QTj6zjqL7BilGtTvR0DVWmB0Yk=; b=iOauOa2fjDoi7yibmckFjrf22hwQKa3fpsszg2iQKANajcPXU7yOlFV66n2Yn9lLlM75m4f9uoYTttzfeBHiDz53xqkNz/O3NfEDEBHwvPWO8/6n738HcVmHNw9fqUr8ouzSkud2Prx+wMW7SQSnoK3AdZtaQIlhx6sg0czG+mJCdT4ipHZsJMu91faVHXI31KepSMXexZTda5xBG5QbjKVMvsj22fx8EfUYvjvK6NdeqRVVUqNNvovpPCdWS2Z+uLdAvy2seJwgB571ZilSBTizmLjXC773ErrNTukeNh5lsRVNgrnkxsx94Qv5tfnuQWljbN7PE61igN2XJFtw1A== 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=8MnDelsJgaXhzlSc7QTj6zjqL7BilGtTvR0DVWmB0Yk=; b=ZKYnF/hphkYj8H63tjSZYCc7iQfiMfOyjSI54URLxPYnfRY/F0fL/E7E7u4R0SadyXrehA2QbswewnGIoIMfowSWb+Y3MbDSmweMn4eqKbrWCwdLjwmsdwI9aB7RmHhZXtwTVW1hlSDK6zqPOCVUQWt0j6J+dbz5jJlQR+E3Sfnavu7YE1hTkuCUE/2DMI4MqPlR4InBxai98QS9Qo6mIgzZMdOcV0XlC+ytt7Ffb6DB5HXwfS062pHtTPWCGd+ntb1vUncvD0dm9H6C/L9FjmFuToSXiGqpHasFXmEkqtaICcSTCYKpV2cf0h4oWD12ky8L+6rKoBBLzhetD97Mzw== Received: from DM6PR12MB2748.namprd12.prod.outlook.com (2603:10b6:5:43::28) by DM6PR12MB3065.namprd12.prod.outlook.com (2603:10b6:5:3c::26) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3999.32; Thu, 8 Apr 2021 12:37:27 +0000 Received: from DM6PR12MB2748.namprd12.prod.outlook.com ([fe80::3d94:1f7f:178f:aba2]) by DM6PR12MB2748.namprd12.prod.outlook.com ([fe80::3d94:1f7f:178f:aba2%6]) with mapi id 15.20.3912.031; Thu, 8 Apr 2021 12:37:27 +0000 From: Raslan Darawsheh To: Olivier Matz CC: "dev@dpdk.org" , "ferruh.yigit@intel.com" , Ori Kam , "andrew.rybchenko@oktetlabs.ru" , "ivan.malov@oktetlabs.ru" , "ying.a.wang@intel.com" , Slava Ovsiienko , Shiri Kuzin Thread-Topic: [PATCH v4 1/2] ethdev: add new ext hdr for gtp psc Thread-Index: AQHXLHLlH2yWQSo7L0Op6qQCfrVvhKqqjhUw Date: Thu, 8 Apr 2021 12:37:27 +0000 Message-ID: References: <20210330075036.6579-2-rasland@nvidia.com> <20210404074552.24190-1-rasland@nvidia.com> <20210404074552.24190-2-rasland@nvidia.com> <20210408122956.GX1650@platinum> In-Reply-To: <20210408122956.GX1650@platinum> Accept-Language: en-US Content-Language: en-US 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=nvidia.com; x-originating-ip: [188.161.230.40] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: eab6ed66-2e3e-465a-6a2f-08d8fa8b1166 x-ms-traffictypediagnostic: DM6PR12MB3065: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:7219; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: i+6Z3TjGyAJDO4PbJWMhAjOsbFYo8WpTYf5eRULTbA+kOvduwSgaKrSFVE2v8tk13TjSzc9edagKVTLKIQ75bgd/wzqXl3ZtXdyhG4rHcqa05U3CkFRq21bZzsDIcJOdmY2gyHkJDZzcmV/dmgU611gBaJRcsQYXsh8fJZfV2sIqMxJGETgv/fpNHu3RTM9xXXkmjRK/AS/k2O3/k5wG+AVrpqIA1GhSCDbGLOxzF++zJa+RDiiQgvlFhgL/0L0X2mJI5FMzUSJS6ymgvxjl0ynYXBNuQtuHm5tyMd7JDaBQFpJa9R3tV07eCbQe0n1Ffu9kiQkC1wkPjmSy6oNWtVKYgrJcQjuTxVV5ICoCl6VpFG/ljM1xuZ1mgn0TkPbXFEaRnpWxZ+TYZ6PDLz+E8pZdn0YKRhN7e1SLCk1AUTVHCggyaUP6PQkEtQFzLUW3/48tcIC/iUDz2QrkH8aVaVeHOWkr2d7i5WQai6DHtWfIh+6OUERcEKqA2z8PLWAciv1i6ZPZmCXeMS4+NgWX4LvwuMUHlfnTKr6ZD9hUpvSQbaGkaFxEihv6Bahw39wUEUntU9BtNvfPxjBQuSUMrU++Arv8lguUFIKZ0+FfAjAT3oz7cl6MfYagt4uVXI8bEZLyEhzp8u6yOKcukAR6f3rPwt/pH25i+9ka/666yT1yqS+QdEJa78nlqKvx8I24gO8FQ0JNFGpW0j4s5L97kQcAdK9Pkl8eehNsAoeLx/E= x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DM6PR12MB2748.namprd12.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(136003)(39860400002)(366004)(346002)(376002)(396003)(6916009)(52536014)(66556008)(66476007)(55016002)(66446008)(64756008)(38100700001)(33656002)(9686003)(83380400001)(86362001)(6506007)(7696005)(53546011)(478600001)(26005)(76116006)(71200400001)(966005)(66946007)(316002)(4326008)(186003)(54906003)(8676002)(107886003)(8936002)(5660300002)(2906002); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata: =?us-ascii?Q?Z2/U71GpApGykg2BmyXwutLfKoVgO/QL4UpprSP3o8yKDnxrGmwvmj1/xjMP?= =?us-ascii?Q?iGpTHlucq+/ARk84FqJK29F4LSdS1ldBGaK2ls394arHn19vBJo1YCAWaepy?= =?us-ascii?Q?WKHV6dn8LSYbrzZXEGqXwlJmFktAITGs1VpG+koIJQv88BJBfSZQhAJNG+I2?= =?us-ascii?Q?p9UcrUaPudsLJ2KTqBg4JFejPksh+Am0aeC1kWPrEzwqhrhhPuTsQzpUHkcI?= =?us-ascii?Q?jw1Z92QTaJnJ1kAv6QC2t9ylFA+w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VrxuFjpRHWIYZgvQ3zTK6OClOyvWN6liYRnji6BUJ0GylYxsZFljnTv9oes?= =?us-ascii?Q?ma9RbEiNRzHi6wgl6vZXOvOwbQFuAn/5FR7l2V2PuQeoKKQ20Ekdl4GUC2XS?= =?us-ascii?Q?TvG5yQ6rLsUFbU1inrFwHb5j1wtzRFXM91fEiBkqe8DAPGckxP0PWgsen7dW?= =?us-ascii?Q?vRZAWW78xCDoW0vkdCSxsbKp?= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: DM6PR12MB2748.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: eab6ed66-2e3e-465a-6a2f-08d8fa8b1166 X-MS-Exchange-CrossTenant-originalarrivaltime: 08 Apr 2021 12:37:27.1458 (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: Nziooo0c06/sqkyWYJXBDcrgEu6sfHovx6RO6Z+y1/TwsjRGFaR6sUaGEcOsBf+ghIzWBjbEXldUCm09w+B0Ag== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR12MB3065 Subject: Re: [dpdk-dev] [PATCH v4 1/2] ethdev: add new ext hdr for gtp psc 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, > -----Original Message----- > From: Olivier Matz > Sent: Thursday, April 8, 2021 3:30 PM > To: Raslan Darawsheh > Cc: dev@dpdk.org; ferruh.yigit@intel.com; Ori Kam ; > andrew.rybchenko@oktetlabs.ru; ivan.malov@oktetlabs.ru; > ying.a.wang@intel.com; Slava Ovsiienko ; Shiri > Kuzin > Subject: Re: [PATCH v4 1/2] ethdev: add new ext hdr for gtp psc >=20 > Hi Raslan, >=20 > On Sun, Apr 04, 2021 at 10:45:51AM +0300, Raslan Darawsheh wrote: > > Define new rte header for gtp PDU session container > > based on RFC 38415-g30 >=20 > Do you have a link to this RFC? Yes sure, https://www.3gpp.org/ftp/Specs/archive/38_series/38.415/38415-g30.zip >=20 > > Signed-off-by: Raslan Darawsheh > > --- > > lib/librte_net/rte_gtp.h | 34 ++++++++++++++++++++++++++++++++++ > > 1 file changed, 34 insertions(+) > > > > diff --git a/lib/librte_net/rte_gtp.h b/lib/librte_net/rte_gtp.h > > index 6a6f9b238d..088b0b5a53 100644 > > --- a/lib/librte_net/rte_gtp.h > > +++ b/lib/librte_net/rte_gtp.h > > @@ -61,6 +61,40 @@ struct rte_gtp_hdr_ext_word { > > uint8_t next_ext; /**< Next Extension Header Type. */ > > } __rte_packed; > > > > +/** > > + * Optional extension for GTP with next_ext set to 0x85 > > + * defined based on RFC 38415-g30. > > + */ > > +__extension__ > > +struct rte_gtp_psc_hdr { > > + uint8_t ext_hdr_len; /**< PDU ext hdr len in multiples of 4 bytes */ > > + uint8_t type:4; /**< PDU type */ > > + uint8_t qmp:1; /**< Qos Monitoring Packet */ > > + union { > > + struct { > > + uint8_t snp:1; /**< Sequence number presence */ > > + uint8_t spare_dl1:2; /**< spare down link bits */ > > + }; > > + struct { > > + uint8_t dl_delay_ind:1; /**< dl delay result presence > */ > > + uint8_t ul_delay_ind:1; /**< ul delay result presence > */ > > + uint8_t snp_ul1:1; /**< Sequence number presence > ul */ > > + }; > > + }; > > + union { > > + struct { > > + uint8_t ppp:1; /**< Paging policy presence */ > > + uint8_t rqi:1; /**< Reflective Qos Indicator */ > > + }; > > + struct { > > + uint8_t n_delay_ind:1; /**< N3/N9 delay result > presence */ > > + uint8_t spare_ul2:1; /**< spare up link bits */ > > + }; > > + }; > > + uint8_t qfi:6; /**< Qos Flow Identifier */ > > + uint8_t data[0]; /**< data feilds */ > > +} __rte_packed; >=20 > With this header, sizeof(rte_gtp_psc_hdr) =3D 5, is it really expected? The data[0] is variable length data, I guess I should send another version = to mention that in the comment maybe. The header size according to the spec should be 4 octets aligned in general= . >=20 > It would help to see the specification to have a better idea of how to Sure, I've just posted the link above, please let me know of any suggestion= that you have, and I'll be glad to do accordingly. > split, but a possible solution is to do something like this: >=20 > struct rte_gtp_psc_generic_hdr { > uint8_t ext_hdr_len; > uint8_t type:4 > uint8_t qmp:1; > uint8_t pad:3; > }; >=20 > struct rte_gtp_psc__hdr { > uint8_t ext_hdr_len; > uint8_t type:4 > uint8_t qmp:1; > uint8_t uint8_t snp:1; > uint8_t spare_dl1:2; > ... > }; >=20 > ... >=20 > struct rte_gtp_psc_hdr { > union { > struct rte_gtp_psc_generic_hdr generic; > struct rte_gtp_psc__hdr ; > struct rte_gtp_psc__hdr ; > }; > }; >=20 > Also, you need to take care about endianness. >=20 >=20 > Regards, > Olivier Kindest regards Raslan Darawsheh