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 4CCBAA034D; Tue, 11 Jan 2022 09:31:15 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id DDB36411DF; Tue, 11 Jan 2022 09:31:14 +0100 (CET) Received: from NAM12-BN8-obe.outbound.protection.outlook.com (mail-bn8nam12on2065.outbound.protection.outlook.com [40.107.237.65]) by mails.dpdk.org (Postfix) with ESMTP id 54BAB411AE for ; Tue, 11 Jan 2022 09:31:13 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=KquxqPjErlxuAIIWp3Su4nwEXy44BlpXbkxxaFlG6rTLHmdVsAV1Xguq050p2vzYcvIQL3dqy/sDCrNHvkdIBUrfpJE7ef2e0X/2MVVZny8ZEAfrhN3vybOWlFr33eg3MqWZ7FB0u35T4ezkPovmQrttLZKmLujB2DmGkOZXnysDfhwsaGr+h3pPddI0iZawAZAvgf8zr587r3dVq7Z00X+jyq+OuPMMWAu/uvnIID1h6cQzJhJC+X9btYIBCQacHbj4KtWdt7iXLjhN4rMU3XzgJBBIMBurNTLsZuCe+KCV888xZx46KR05HKNV9gYy+UBCTqo39TJqUetCioM47w== 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=dkzaWS0NeSbi7LVNp2RqQ3CJPve8E6OJYZHaRYVTd5w=; b=kozRj1WWPCLVJJtSDixwm6RELSHSBbgsCXRiRApKc278Bo5wsUerkbM9a01Bxak2wIoSLNX3lTsKEFAdPMYCCEFcyHw9ni3pLPscvk0QyfI1gIOw7REAdmQMJ0DR29bWTbQXYCkLBKCxlym+ZeIEmV/DV3y9t4B2ysoR+EgWzSYs9jH/Mv8jbjkh1Qh2dYWXP1u0v9B8nr9K3p4wqcMjXnOXQOhhb19Q3XIccWC4yuBsgoO6dAwmos+u+8jzysSRVMxQAgKlolViAwVbKYtkuGFUTrwVpz5qeD0c/X+6ryN2NshPt6w65Xsdidlte+QNwcz/cBPsk7hEpy+eqoGpKQ== 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=dkzaWS0NeSbi7LVNp2RqQ3CJPve8E6OJYZHaRYVTd5w=; b=LJf56c5bf2tI35aA8GqmoSWo1Q6+p51dWWmvypYmFolr+g3Vb6YHBUfPZvc5i3s3DxsL4gKT9PYWk5fbP+h30eHlIXUjihReHPlLYjduN6IX3jpf9uY+OUxt47wr09/YAaVF/MfjG/lZLtvx/o0ddKjCBJyvtP9O++BilrNKcsExH+tPUy4Wsbk7GrqNH87v+h51j2H3wuzJJU+4QowKXBc7JfHh6HxqiU+DlvVv5gb1V1AWiUjAm9iz8HYQn8Q/5lLLROFu/2aymN7U7OWfTG0wZG7jkh3RehhTlknOZfoflJ+xZX5druaFeryThOArXaMbmVeURiRkAESNM+l0Fg== Received: from DM8PR12MB5398.namprd12.prod.outlook.com (2603:10b6:8:3f::5) by DM4PR12MB5152.namprd12.prod.outlook.com (2603:10b6:5:393::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4867.11; Tue, 11 Jan 2022 08:31:12 +0000 Received: from DM8PR12MB5398.namprd12.prod.outlook.com ([fe80::3503:3e2c:98d2:34ac]) by DM8PR12MB5398.namprd12.prod.outlook.com ([fe80::3503:3e2c:98d2:34ac%9]) with mapi id 15.20.4867.011; Tue, 11 Jan 2022 08:31:12 +0000 From: "Sean Zhang (Networking SW)" To: Ori Kam , Matan Azrad , "NBU-Contact-Thomas Monjalon (EXTERNAL)" , Ferruh Yigit , Andrew Rybchenko CC: "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+3tTaxaruiAgAKQgcCAAD7HgIAAEjBQ Date: Tue, 11 Jan 2022 08:31:11 +0000 Message-ID: References: <20211230030817.15264-1-xiazhang@nvidia.com> <20211230030817.15264-2-xiazhang@nvidia.com> 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: 866dbe22-59be-4de1-cac9-08d9d4dcb993 x-ms-traffictypediagnostic: DM4PR12MB5152: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: MSMDkoUbThk46GD3xeht0kJCh978c3PB4+pILCs7C5Lx2Z69WibmyKQoLs6HUAb6Bm1PcUXnKDMscOBRxHaAmSkUOWPalRcqPeAM+0NvBFGXhsxw7p3Piub8cAho784IBSejYrbO69Ymy4MPhB9AjURuHVbpeK7crbEtnX9QwIxePzGQGUA6e3fZLBJL6kXUcivNQJgGoryel4CYdtGNmaaMrpWqqq6oj18oO2Q0kqziBV7efJgSTPYt31QdAcVPElNTfW9E9arVSkqfGyaQ6Z/WGfR7x46yKvGi2zNLAZp0xtAuohDgqe424jb4h0vFkHwTBSWrUpF8XVAQ94F7nn7E2O1PPAHtKorG+6B2ZSGpimd19cJRjubK5Fou11xiBFmEI1J5TFYGS9AXC0kO5oKMNWoMHdWYL8Qy3OOrtkl+qz/tjcxpmkbQMx2ZXsXpmMjfDVEd9Y+U0NkTFPRax9TjeFDPt4EtpPXmRjqEbZoRWgHAUnwmjmdxvG/yo0X8eArJMZGh/eKwk8Y9Iq0ubdPLZEkynpQEqbNW4IU0mY+s6613EMrowmSt23MQxjA3ijBhSknLb8ks+s9GE32n6DjlaBGP2pjx1IdX6Y3YEA2FYufD8SwcJDkSlRiP61u91fB+XL09HUVZVI8Pv3I2kaWFwUhnLQJSbfkDAofNQh0XXXVFx7+3o9wQW8uTUrhWmblNVvzAwQaMJ/19KVwIxA== 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)(6506007)(53546011)(33656002)(9686003)(38070700005)(5660300002)(83380400001)(7696005)(71200400001)(8936002)(66556008)(8676002)(4326008)(508600001)(52536014)(26005)(86362001)(55016003)(186003)(66946007)(76116006)(2906002)(110136005)(122000001)(66446008)(38100700002)(64756008)(66476007)(316002); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?KCOOSPXVZakDDK0pSY/bPb+PNYArVVW3DhU9IIG4HAqNK9KP2nYox7aquM06?= =?us-ascii?Q?EPULtB5zY9BxamcqvRwjYeTIYRpPx3LELLoaNas4/slJbbt5FGCfNkm9pnbG?= =?us-ascii?Q?tnvR2ieR4P1Gje5zmFaIZrDXLG1pIK0lNDVMhxeei9QMw0EnuK0Vp8mTK7W+?= =?us-ascii?Q?8q2KyDOCSRBs3Y4/9YlkIMhfluazw4QmzbHVxuMF3afDGtS4zJABTcyOAZAx?= =?us-ascii?Q?x3ha2Ys7YPY+ER7N7Z2Oxfj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dUpBatXAXSoBsFPdIWkN8etBKsk5bH6nYcywxJ3HZ+yHZVh5Urb7g9?= =?us-ascii?Q?3Qbe7W1PanXv8FadlA1vY8zq8St13ovWmj7JoUTxHbrI5gRUi/AP+h+fTQ8f?= =?us-ascii?Q?otnxuBRhr+fl2CTxBqNg0LWMOBpSsagE2vKXpxQ9YPObPcS94UbyggK7HhC5?= =?us-ascii?Q?xPc6DfAhTn8RY4qmcTuf9cfvy1sotLedBZY6Cb5c0MFdUQGkMRB6eT6jBDyK?= =?us-ascii?Q?udT6i3TKpGvKYBJFA1jTyLkITWoCHUBbAMnp0ifqV1JY4VObLZBT629yZz1g?= =?us-ascii?Q?IvMMdHBjSyt5KNB1R/WuReDghfvlW0gyBDSsgCqrWcyO20CSZ2zq1Beb/WP8?= =?us-ascii?Q?7SS0N4JnDBOl9AGi1Z+nS5mqnT0fqohmumU31KZhksA4n4ul/tG0pYC9W/gi?= =?us-ascii?Q?MpiPNtXFWd8v+iLLrvQw+Yk5LIZfx2bobmJAO8WEAAIRKViUvrjEMJktbho8?= =?us-ascii?Q?D4x4Io6P9Sc+8IoYuvuDatM=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: 866dbe22-59be-4de1-cac9-08d9d4dcb993 X-MS-Exchange-CrossTenant-originalarrivaltime: 11 Jan 2022 08:31:12.0062 (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: s0ou97duIOF4keSJlmY1KhFNgbZ9FY0Is2wntCq0Z1+WVRAyuy4Gof/2tdPa8E8O2RsxagIDYNdkffbtC0S8xA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM4PR12MB5152 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 Ori, > -----Original Message----- > From: Ori Kam > Sent: Tuesday, January 11, 2022 3:24 PM > To: Sean Zhang (Networking SW) ; Matan Azrad > ; NBU-Contact-Thomas Monjalon (EXTERNAL) > ; Ferruh Yigit ; Andrew > Rybchenko > Cc: dev@dpdk.org > Subject: RE: [RFC 1/3] ethdev: support GRE optional fields >=20 > Hi Sean, >=20 > > -----Original Message----- > > From: Sean Zhang (Networking SW) > > Sent: Tuesday, January 11, 2022 5:45 AM > > Subject: RE: [RFC 1/3] ethdev: support GRE optional fields > > > > Hi Ori, > > > > > -----Original Message----- > > > From: Ori Kam > > > Sent: Sunday, January 9, 2022 8:30 PM > > > To: Sean Zhang (Networking SW) ; Matan Azrad > > > ; NBU-Contact-Thomas Monjalon (EXTERNAL) > > > ; Ferruh Yigit ; Andrew > > > Rybchenko > > > Cc: dev@dpdk.org > > > Subject: RE: [RFC 1/3] ethdev: support GRE optional fields > > > > > > Hi Sean, > > > > > > > > > > -----Original Message----- > > > > From: Sean Zhang > > > > Subject: [RFC 1/3] ethdev: support GRE optional fields > > > > > > > > Add flow pattern items and header format for matching optional > > > > fields > > > > (checksum/key/sequence) in GRE header. And the flags in gre item > > > > should be correspondingly set with the new added items. > > > > > > > > Signed-off-by: Sean Zhang > > > > --- > > > > doc/guides/prog_guide/rte_flow.rst | 16 ++++++++++++++++ > > > > lib/ethdev/rte_flow.c | 1 + > > > > lib/ethdev/rte_flow.h | 18 ++++++++++++++++++ > > > > 3 files changed, 35 insertions(+) > > > > > > > > diff --git a/doc/guides/prog_guide/rte_flow.rst > > > > b/doc/guides/prog_guide/rte_flow.rst > > > > index c51ed88..48d5685 100644 > > > > --- a/doc/guides/prog_guide/rte_flow.rst > > > > +++ b/doc/guides/prog_guide/rte_flow.rst > > > > @@ -1113,6 +1113,22 @@ This should be preceded by item ``GRE``. > > > > - Value to be matched is a big-endian 32 bit integer. > > > > - When this item present it implicitly match K bit in default mask= as "1" > > > > > > > > +Item: ``GRE_OPTION`` > > > > +^^^^^^^^^^^^^^^^^^^^ > > > > + > > > > +Matches a GRE optional fields (checksum/key/sequence). > > > > +This should be preceded by item ``GRE``. > > > > + > > > > +- ``checksum``: checksum. > > > > +- ``key``: key. > > > > +- ``sequence``: sequence. > > > > +- The items in GRE_OPTION do not change bit > > > > +flags(c_bit/k_bit/s_bit) in GRE > > > > + item. The bit flags need be set with GRE item by application. > > > > +When the items > > > > + present, the corresponding bits in GRE spec and mask should be > > > > +set "1" by > > > > + application, it means to match specified value of the fields. > > > > +When the items > > > > + no present, but the corresponding bits in GRE spec and mask is > > > > +"1", it means > > > > + to match any value of the fields. > > > > + > > > > Item: ``FUZZY`` > > > > ^^^^^^^^^^^^^^^ > > > > > > > > diff --git a/lib/ethdev/rte_flow.c b/lib/ethdev/rte_flow.c index > > > > a93f68a..03bd1df 100644 > > > > --- a/lib/ethdev/rte_flow.c > > > > +++ b/lib/ethdev/rte_flow.c > > > > @@ -139,6 +139,7 @@ struct rte_flow_desc_data { > > > > MK_FLOW_ITEM(META, sizeof(struct rte_flow_item_meta)), > > > > MK_FLOW_ITEM(TAG, sizeof(struct rte_flow_item_tag)), > > > > MK_FLOW_ITEM(GRE_KEY, sizeof(rte_be32_t)), > > > > + MK_FLOW_ITEM(GRE_OPTION, sizeof(struct rte_gre_hdr_option)), > > > > > > I think that this new item is making the gre_key redundant, why not > > > deprecate it? > > > > Do you mean to add description like bellow? > > > > Item: ``GRE_KEY`` > > ^^^^^^^^^^^^^^^ > > +This action is deprecated. Consider `Item: GRE_OPTION`. >=20 > Yes and also add the depreciation notice in the release notes, there is a= lso > need to see if other PMD are using the GRE_KEY. > But to be clear do not remove this support now just send notice that it > should be removed. Got it, and will update in v2 patch. Thanks, Sean >=20 > > > > > > > > > MK_FLOW_ITEM(GTP_PSC, sizeof(struct rte_flow_item_gtp_psc)), > > > > MK_FLOW_ITEM(PPPOES, sizeof(struct rte_flow_item_pppoe)), > > > > MK_FLOW_ITEM(PPPOED, sizeof(struct rte_flow_item_pppoe)), diff - > > > -git > > > > a/lib/ethdev/rte_flow.h b/lib/ethdev/rte_flow.h index > > > > 1031fb2..27b4140 > > > > 100644 > > > > --- a/lib/ethdev/rte_flow.h > > > > +++ b/lib/ethdev/rte_flow.h > > > > @@ -660,6 +660,13 @@ enum rte_flow_item_type { > > > > * See struct rte_flow_item_ppp. > > > > */ > > > > RTE_FLOW_ITEM_TYPE_PPP, > > > > + > > > > + /** > > > > + * Matches GRE optional fields. > > > > + * > > > > + * See struct rte_gre_hdr_option. > > > > + */ > > > > + RTE_FLOW_ITEM_TYPE_GRE_OPTION, > > > > }; > > > > > > > > /** > > > > @@ -1196,6 +1203,17 @@ struct rte_flow_item_gre { #endif > > > > > > > > /** > > > > + * 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; > > > > +}; > > > > + > > > > +/** > > > > * RTE_FLOW_ITEM_TYPE_FUZZY > > > > * > > > > * Fuzzy pattern match, expect faster than default. > > > > -- > > > > 1.8.3.1 > > > > > > Best, > > > Ori > > > > Thanks, > > Sean