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 C3428A034E; Wed, 19 Jan 2022 11:56:52 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 5F80F410FD; Wed, 19 Jan 2022 11:56:52 +0100 (CET) Received: from NAM11-BN8-obe.outbound.protection.outlook.com (mail-bn8nam11on2064.outbound.protection.outlook.com [40.107.236.64]) by mails.dpdk.org (Postfix) with ESMTP id 02DAD4013F for ; Wed, 19 Jan 2022 11:56:50 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=XbYTD1jrDj7GnqlmzzOCwBShe0sRs1NI7XPhYN6Jaemp+ehwodTPxvFmAIi6YuFCaDY+Y6rnRDrpuk6ZEfBZn9DPCSo7T6f13EwXyJcoy/s8Vm5incBzPSsSGXQDfu3wbUOD4d+Vv2vG2keQf4n/cJD9GJWlacXJXcnFdN1qnLmAGzKCaxb5Lm+JGY6GUXRpEuwWffuZdY+3B4RhudgnJsgGcwldSZRytZr8I6no/MNuNfc7EfqeYLp5CZ1bUUJ65X304UedU3w0LuVg6yOVSQRkC/XOjZYsRTg7HSBHFfGHpamvcIi+U/50kC1DhDc2r/G0BASBDHEVCBLdZvpYog== 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=NnTszkPk6Q0VzgqVNpLAwB8qc/3zLubyu1WFBiaOF9Y=; b=B4ni12Ir9zMlYsfEks2yojG0eP5QPHYKF12vzXdBc4zI/0gbsxwQiGR7tbj3sykAPSbtej0vGrB6Z6qj1AFCY05lXICncyMI1UK1hlPs/VLldAL+1u2b/vZ9jXdcFab5JoqvvhO3oEKfcwsuZmDxDF2oNGd0LcXMZjR6Jq34YCzCfFxCC6UDz9IatBDS61SOKERetlL/QXi7f8aoLGWDYfugVP3u89/Z7DS95ZMRvIIIxqLW6lhpA8qL4HMjgDVcplt63XRIHM+89s7M+O/MxOKdoU8DMJuvK3Oxkdvcs1uWrjx7KTLRyn25qwfiDeDiumo8jXnqaWtuMeuCxvjrWw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; 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=NnTszkPk6Q0VzgqVNpLAwB8qc/3zLubyu1WFBiaOF9Y=; b=X2LBUrKzPIHaxyDJXf5TOzESQNU2gsKHtHIdFpmQrCxxaiejypVJiHs/m6A12JRoALCwwDqvjWLHi9EwPY0CRPzIkJxfVQ7tfHJcQYnxIUIFc3Sx7hyc91XBmj/9sJSmKcR6eUf0WlkMa3tlFE7CYKIxtj21kTCi12QDTEmJXVMrPbNw+7qZl5UhRkb1g4Ns5I21NQ8cHPKr6rw1Z2iEEESzTt/F5uFW6VhCfMP9VafdZqQ95VSdpUN7xJoPBRAJ5Fn/ZbO6TgAg8MivbSjTBU/ia1bgsA+W17aLqKDoMBsFEanJZgoO7oFZ0FjeW6BrArPS8gEF/vQ4/od5lSn+eg== Received: from MW2PR12MB4666.namprd12.prod.outlook.com (2603:10b6:302:13::22) by DM6PR12MB4974.namprd12.prod.outlook.com (2603:10b6:5:1bb::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4888.10; Wed, 19 Jan 2022 10:56:49 +0000 Received: from MW2PR12MB4666.namprd12.prod.outlook.com ([fe80::78:438a:c6b7:1cc1]) by MW2PR12MB4666.namprd12.prod.outlook.com ([fe80::78:438a:c6b7:1cc1%3]) with mapi id 15.20.4909.008; Wed, 19 Jan 2022 10:56:49 +0000 From: Ori Kam To: "NBU-Contact-Thomas Monjalon (EXTERNAL)" , "Sean Zhang (Networking SW)" , Matan Azrad , Ferruh Yigit CC: Andrew Rybchenko , "dev@dpdk.org" Subject: RE: [RFC 1/3] ethdev: support GRE optional fields Thread-Topic: [RFC 1/3] ethdev: support GRE optional fields Thread-Index: AQHX/SqU/7cI7vQpLkqVqKJmDy8VHaxqOowAgAACIYCAAASdwA== Date: Wed, 19 Jan 2022 10:56:49 +0000 Message-ID: References: <20211230030817.15264-1-xiazhang@nvidia.com> <20211230030817.15264-2-xiazhang@nvidia.com> <002b1f85-0871-a02f-0345-1b19d722762a@intel.com> <2037437.VsPgYW4pTa@thomas> In-Reply-To: <2037437.VsPgYW4pTa@thomas> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nvidia.com; x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: c667da2a-3a9b-451f-c297-08d9db3a64be x-ms-traffictypediagnostic: DM6PR12MB4974:EE_ x-ld-processed: 43083d15-7273-40c1-b7db-39efd9ccc17a,ExtAddr x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:8882; x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: Qvj4PsZp5dLRk7V9x7k701hohD5vylispJL13jyrxjBVUEaxHhKJUsk13Oef4mSBkl3fjouEc5cbnNVRgeaRHkkk90adKLg8YUWeXkcFUBRLPvLl4tec9qSSJj0pWMotVJBFC7HSTThcGlvAFr5/nm5TMNNrY7b1nFy4emzo8sFFwGe8O3hzZ50G0edLoFujbIfimQiJXL+2godUKQ9pERYc3aCv53n6NW+xVqQv86QPxdq9fGKrHu8J+SuU5IA2bXrCIVKZmiUv6oRJFkIT+rT9hI62c1SX01cuJ6aRD+ivEExVx4YBHwkJi7Wei/Z+IQPBI9nZE1XSTGrD0W/pZgSn77lJWNgVTu8I+yoRPEcNRfDuVQVuBd3FFeVooK3nTCSmQcy1p5v8inaqYJrP+fTD2ZL7wsdUv4mBnLvPJ78z8Zk2BBWuuc+Q7EmjQIydl58dFBGTVkkVXlnMRFXKCF3FHtoeRzkKn6nfcuCzCCvVJM0gOP34OugT4m1Y5vFaGREb7ZUCWFqX3/tebZjjsXSHucdSxSdhSzskWnGeLSG+bDiM1zkNSNKa8P6W8Rmo1xiFw0Gqeh8gKgUMIAU2McvkdZ267frHbvV8zgTFUVwTlYSVfxl6KvnCvSLHwf4Ap76/QVVPwg9GcErKAGP3/yNqfwb7Lof3hWgwUxc9bb1IGVFMkI3I0r2yRS+L9nfnV5RLuQLmWEiulMQRZFe/A7b+NnC7UNo9tGYtv1NgBqk= x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:MW2PR12MB4666.namprd12.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(366004)(7696005)(83380400001)(9686003)(66476007)(76116006)(66446008)(33656002)(122000001)(66556008)(8676002)(4326008)(86362001)(64756008)(71200400001)(55016003)(8936002)(66946007)(2906002)(54906003)(38100700002)(52536014)(186003)(26005)(316002)(53546011)(38070700005)(110136005)(6506007)(508600001)(5660300002)(21314003); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?T9dNtNgfnAI3VCW/7XzJmMLrmnbT+mZvVzGzMp5IhGXNTnWJ9obHcr0HXfGU?= =?us-ascii?Q?6Hp00sG6tVdB6JDgNmFSV88ngBWbRHoh0g85CDxUaiMo3jq98aq6wucvueFk?= =?us-ascii?Q?udCzN+vH3Ou8VHHyXRMDFgfq3+gmb21CqrJdnzdCj02o/FkG8UU+A/a4gvox?= =?us-ascii?Q?7+FPPK1pKpfAw1u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8vV8P3d5?= =?us-ascii?Q?M2grbqHAffknRgeG6gIpGUZHkYhR5Gi5LdRsi6d0gajgUcnKe02tDTdH0WNJ?= =?us-ascii?Q?vhLCXRPAdjWcSEHYR/ULq5v3cyfNS5grb6LTqPS0G7ICecqUC0CAlB85QbbL?= =?us-ascii?Q?O3TSbKxAVbQ0y138vYzEmmi0UDwIGi8TXQWd/zPpC04vVGRMBrFJ1Geum38K?= =?us-ascii?Q?p8y9o+yYLZWPEsjghaZFTYUAr+ArGbM5mRVu+//4xckzvwKuUy3g+hLpY1zJ?= =?us-ascii?Q?RQqVeIneXEqrm00LXopkJjwzvj8N9JGMwjocbAu+2Qm4tG6hMbsIs0Q7rGfu?= =?us-ascii?Q?I+VDy8il3zNNEP+ObXb/vHXIP4Qxy7PHpJCwmB921wQ+MY9nAhjikexI7WyK?= =?us-ascii?Q?wB13AFCiGd2ukS8xOgJSJ6IThz5k/ClnjEJekvmuBeodTnTRP+ORyRe/YBq9?= =?us-ascii?Q?jMurdoNJhzx2dl7peMG0UUaF45XDJGQ+VVzM6Zbfw9ywVVJscx64zX5MkasD?= =?us-ascii?Q?fjmkKlRMdCWMUXQ/x2/ryWsnOOocr3C71EnMN3hVFmy+ZXQwtOs0GgYWBWDg?= =?us-ascii?Q?9w=3D=3D?= 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: MW2PR12MB4666.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: c667da2a-3a9b-451f-c297-08d9db3a64be X-MS-Exchange-CrossTenant-originalarrivaltime: 19 Jan 2022 10:56:49.2726 (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: /DYRjcBjZkPFZH1LduzZo0ouRUrbwCECAHnTkJ4/MgzD6IuT9hVQKH6FVwqiAosG0OEFvbm9dZ3IqdXfHg3uWQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR12MB4974 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 Hi, > -----Original Message----- > From: Thomas Monjalon > Subject: Re: [RFC 1/3] ethdev: support GRE optional fields >=20 > 19/01/2022 10:53, Ferruh Yigit: > > On 12/30/2021 3:08 AM, Sean Zhang wrote: > > > --- a/lib/ethdev/rte_flow.h > > > +++ b/lib/ethdev/rte_flow.h > > > /** > > > + * RTE_FLOW_ITEM_TYPE_GRE_OPTION. > > > + * > > > + * Matches GRE optional fields in header. > > > + */ > > > +struct rte_gre_hdr_option { > > > + rte_be16_t checksum; > > > + rte_be32_t key; > > > + rte_be32_t sequence; > > > +}; > > > + > > > > Hi Ori, Andrew, > > > > The decision was to have protocol structs in the net library and flow s= tructs > > use from there, wasn't it? > > (Btw, a deprecation notice is still pending to clear some existing ones= ) > > > > So for the GRE optional fields, what about having a struct in the 'rte_= gre.h'? > > (Also perhaps an GRE extended protocol header can be defined combining > > 'rte_gre_hdr' and optional fields struct.) > > Later flow API struct can embed that struct. >=20 > +1 for using librte_net. > This addition in rte_flow looks to be a mistake. > Please fix the next version. >=20 Nice idea, but my main concern is that the header should have the header is defined. Since some of the fields are optional this will look something like this: gre_hdr_option_checksum { rte_be_16_t checksum; } gre_hdr_option_key { rte_be_32_t key; } gre_hdr_option_ sequence { rte_be_32_t sequence; } I don't want to have so many rte_flow_items, Has more and more protocols have optional data it doesn't make sense to cre= ate the item for each. If I'm looking at it from an ideal place, I would like that the optional fi= elds will be part of the original item. For example in test pmd I would like to write: Eth / ipv4 / udp / gre flags is key & checksum checksum is yyy key is xxx /= end And not=20 Eth / ipv4 / udp / gre flags is key & checksum / gre_option checksum is yyy= key is xxx / end This means that the structure will look like this: struct rte_flow_item_gre { union { struct { /** * Checksum (1b), reserved 0 (12b), version (3b). * Refer to RFC 2784. */ rte_be16_t c_rsvd0_ver; rte_be16_t protocol; /**< Protocol type. */ } struct rte_gre_hdr hdr } rte_be_16_t checksum; rte_be_32_t key; rte_be_32_t sequence; }; The main issue with this is that it breaks ABI, Maybe to solve this we can create a new structure gre_ext? In any way I think we should think how we allow adding members to structure= s without=20 ABI breakage. Best, Ori