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 E2BDEA04A7; Tue, 25 Jan 2022 10:49:41 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 9FF93428B5; Tue, 25 Jan 2022 10:49:41 +0100 (CET) Received: from NAM10-MW2-obe.outbound.protection.outlook.com (mail-mw2nam10on2060.outbound.protection.outlook.com [40.107.94.60]) by mails.dpdk.org (Postfix) with ESMTP id 6C06D428A1 for ; Tue, 25 Jan 2022 10:49:40 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=lqcxih1JdcKjcu1EPFptWsrx6wDeiTSUDVb6r+adceQQkneklFWN5i5WgnTS0DDipb9pf2akPJkA/M+00z/DvmRtYJhfklJPdT16pm14QT4kF8soT7aSrpw2ynK/hSdLeGIY+ddWTeCr63BljKLnW54IzDPSFreOFAL/bezZffIHzMh/7Bth91WpeHajUmr/d1IrHf5fiPUIFCTphxFqmNI4nPqeRkNXfIKx1r0iK9phlx01hysIpqcriwNmawi5/tHP3WQc6Xdr/dn1+TU+becz6LO8hc8qp7mPSYSET7TXeGW6jdvgLM3RdcZRzZXn/LNpOS24F9ErS6vRSvBJ3w== 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=fHN1+/iSeGMQCTXWthiy6zNDfcHAnkXDclxa8O1IQL4=; b=OSTdHec0glICC6mADR+T/b1CS/OI1EbpPLhgLXw5BfF6ZucYlLsCw0mtD/ilSmEh/ayujkbj1kWipRyQRZhow5NOGUEmqH83htmtCm7lwHRom1vjmulesQJsJf4CRZPVSR6eW2xQ2usEkEAPgmt1DzGseONlW7FjF6Y0d6hw/C7P4oVD41y/fLn7IGrGI+IAYKczifpANxEB7p9oP68zIUobLiWowXn8wj2lds/wHbROHFrYcuZHMiPXlJ6gyW69HvGFNMiwo80ES4nGZHSd9a6uF2RUduGyVkXqprHex6V4N18r/pFqXWnMDcuMSlvp/Ax2Y7PdSDcOYsBhz31VEQ== 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=fHN1+/iSeGMQCTXWthiy6zNDfcHAnkXDclxa8O1IQL4=; b=XautPM7EweBGBV2HTu2pPdloT++HHtKsp7PtVSg4sA8oVpL5IBciCxFcqh1VnhfC6Eg61hp7+kOzEUjxHQCbt6ijJ8pyKRPKlZIMzftZO9LvPEhB6aAE8wGCcMFdmC+DR11QEX35Q8wTlU/1ivOys5Swp9WCPXeAz57UZqRl5TD8WB5T/03ei3+UIuSnbGzXLFE4N8l5pXVOnLAOnk2ohVUZo4+rVZMXRMUJ1eoXB9kL+HABw2Z7kU2X77MobsgD3pxQyZNb+VxxvbQspFqpLpftedquZ9alV8/Sw8FgJojO5ijgbuiR+KDMl5Z6KsGBwQwkXs/kHD074FH5MWpc5Q== Received: from DM8PR12MB5398.namprd12.prod.outlook.com (2603:10b6:8:3f::5) by DM5PR12MB1498.namprd12.prod.outlook.com (2603:10b6:4:f::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4909.7; Tue, 25 Jan 2022 09:49:38 +0000 Received: from DM8PR12MB5398.namprd12.prod.outlook.com ([fe80::a1b6:485c:5b95:94e2]) by DM8PR12MB5398.namprd12.prod.outlook.com ([fe80::a1b6:485c:5b95:94e2%5]) with mapi id 15.20.4930.015; Tue, 25 Jan 2022 09:49:38 +0000 From: "Sean Zhang (Networking SW)" To: Ori Kam , "NBU-Contact-Thomas Monjalon (EXTERNAL)" , 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/SqTJzMqhfRQrU+aRDMTQ+3tTaxqOowAgAACIYCAAA+BgIAJV+QQ Date: Tue, 25 Jan 2022 09:49:38 +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: 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: 3f4e17a8-2686-4367-b4cb-08d9dfe800a4 x-ms-traffictypediagnostic: DM5PR12MB1498:EE_ x-ld-processed: 43083d15-7273-40c1-b7db-39efd9ccc17a,ExtAddr x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:9508; x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: Mtv13cKLA3aeA/JZM9RscIWXjR2bCnvYcRTdGxjEh2etSsjYHk6uAYLAgA08gkHfbWeg8sQ2FTL26IlGWUq6UmISyTwvj8h2z3h58cgh6pP3iCnhq+ja58rvMb5x9HXM11VQSCllg22nTbVJDFBz5dbv0NPqSzi5yomBK8FBoZQKlX1mU0ZcS3J7fGRlBEahIDRx3bepOewq53mFYga9wpNsIn2aKfL5kpYJysGLGHVGXTK6b9fJ26mm+uByceZQn2aRp/NXXqEkb77Cdorn2da0HWuwnRYNkTOKE8ztX305cKNDFf3lL1P/E6Ion0aElxunSZDaDgqoSbL7ScHb10x6PjBTr/17nrt/hF/L9q2iNZn1FbA23Igeb1YOavKGYRyxVpzlTVF6T6JMyeO6bJDR1LrYB+/CRUIa1BfLiuApkvzJGXuYnIo2mMqI2SaR/Y5TjbW+KDmxWlpIR0FqwEze3jdVJtRdFVYYv33K67Fqg51cE4FJ8MqdBVPduwRbdq3SquMZmvOXEknjP0rkXoZm92VPWlnqonBUF2EzqFJQpBjhTlAf+CLdK9isHOIc0HVuh8vcpH2Mjjs2vvQ1OBduKGSeCoexKIk9xho+WhfzRmayOV0HPIPZM4BRtgTtFV9cJWvH8eGGdZsBfcfQxFksrghTNvRf0x2Ov4DN47/NOtv+dtBSLdGCjKQcQiAhwYw6hBRXuS4Se5CeZwgk/v0R1JzFr0t1B8bGEj3m0wk= x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DM8PR12MB5398.namprd12.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(366004)(110136005)(6506007)(186003)(53546011)(316002)(71200400001)(8936002)(2906002)(26005)(55016003)(54906003)(66556008)(66446008)(66946007)(76116006)(33656002)(4326008)(64756008)(38070700005)(8676002)(9686003)(508600001)(66476007)(7696005)(83380400001)(5660300002)(122000001)(86362001)(52536014)(38100700002)(21314003); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?U2WFCWFZDVIhOX5sXrwaaYk9ZxKAsHK+i04SZo8/PsNnlBS1vczHashGKjWL?= =?us-ascii?Q?A+Nozxce+PE1mOg7YT1bs+RyBYWZGvzze4k19Pw3tFzZn/uRZTD5etmdjOjD?= =?us-ascii?Q?hbn5j0oPTkoVpnISqzBfHTeU0QZu3St+rnnVxRuO44jiOgLEsaiLoCLEBlu+?= =?us-ascii?Q?oNv145kDwzxSNBCQfPWaDC5aEi9RQRUg/sI/0hfZyq8iDR2pTDpUT7G7ir2p?= =?us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/jBrs4hvenop76WyK+ZBIwesnsLzzDG?= =?us-ascii?Q?1bMr+wy6p7O4YudI9Wh4Kb4KVKVNHQ4jXhsYUcHyHPjPqiGEYCyMI2XYgHow?= =?us-ascii?Q?B/G0cs9e29ugofEcSeMHyXh+srCvSv6WcnLosv5P048XokihjTJXzz9HCuSo?= =?us-ascii?Q?MWpUFvoloFsfY3MzeUdnE/R8734nlUs70/4taDILZsRRumlWbAdY6EIpx+TX?= =?us-ascii?Q?MmyGi+D5DdoJkA4xcky5d7lpiKCUTh8uH9+PjiQJG64BMa8CNjXttYSaMw23?= =?us-ascii?Q?1b6UEiEkIqWAo77F3kfjhSVaYnnfS/dMof8IKpBsEbzzcsx6zlpQelqc25t1?= =?us-ascii?Q?jQTA/ocU6QDTiVxLl1kT7uY3+AKHLTzC6A87TjltMXzUUFAzxdfEWw8DICxw?= =?us-ascii?Q?8+uImbBk4xvRmuXQUu0GeRku+8+rBXqEU20pBPWlcm1joVrFBGshzaBeRH+y?= =?us-ascii?Q?RjSM1I4TCgixBYKxedXt6dI/rjelagcZ4LMtHw3hpuY99EtqPZi5SXtZOWVi?= =?us-ascii?Q?Ig=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: DM8PR12MB5398.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 3f4e17a8-2686-4367-b4cb-08d9dfe800a4 X-MS-Exchange-CrossTenant-originalarrivaltime: 25 Jan 2022 09:49:38.5055 (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: 7O8/sveyE/BQAdWTKIXfCVp9FYAA7O4dJRJn95NwqKpbDVE5I+YaQxnxG6XLiDoLnTauHJQELrBwxjPN0tQjew== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR12MB1498 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: Ori Kam > Sent: Wednesday, January 19, 2022 6:57 PM > 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 >=20 > Hi, >=20 > > -----Original Message----- > > From: Thomas Monjalon > > Subject: Re: [RFC 1/3] ethdev: support GRE optional fields > > > > 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 structs 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. > > > > +1 for using librte_net. > > This addition in rte_flow looks to be a mistake. > > Please fix the next version. > > > 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; > } >=20 > gre_hdr_option_key { > rte_be_32_t key; > } >=20 > gre_hdr_option_ sequence { > rte_be_32_t sequence; > } >=20 > 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 create the item for each. >=20 > If I'm looking at it from an ideal place, I would like that the optional = fields 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 Eth / ipv4 / udp / gre flags is key & checksum / gre_option check= sum > 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 ca= n > create a new structure gre_ext? >=20 > In any way I think we should think how we allow adding members to > structures without ABI breakage. >=20 > Best, > Ori Thanks for the comments and suggestion. So the acceptable solution is to have new structs define in rte_gre.h? struct gre_hdr_opt_checksum { rte_be_16_t checksum; } =20 struct gre_hdr_opt_key { rte_be_32_t key; } =20 struct gre_hdr_opt_ sequence { rte_be_32_t sequence; } And to add new struct gre_ext defined in rte_flow.h: struct gre_ext { struct rte_gre_hdr hdr; struct gre_hdr_opt_checkum checksum; struct rte_hdr_opt_key key; struct rte_hdr_opt_seq seq; }; And we use struct gre_ext for this new added flow item gre_option. Correct me if my understanding is not right. Thanks, Sean