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 B3F34A034D; Tue, 11 Jan 2022 08:24:28 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 45C9F41180; Tue, 11 Jan 2022 08:24:28 +0100 (CET) Received: from NAM10-DM6-obe.outbound.protection.outlook.com (mail-dm6nam10on2063.outbound.protection.outlook.com [40.107.93.63]) by mails.dpdk.org (Postfix) with ESMTP id 3EDA840041 for ; Tue, 11 Jan 2022 08:24:27 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=KCGwIQBhU0RImPWi/d9cIM6LPbioTGK+IkZ+ZuGyyXvGlfeYVbiVe09rUVRD8IBNdLdEOjDOmlNHZvvMfVo7uwa5rwkhRTdNLes8Ru/VO4YRJE711yX+l1sKb8oL5wuNN9HaR95jTTIIE1nK0sZ91/6OmwsKmWpspBb15vnmz72xtEOMbr0TBvnJzEVVPUKnQY3eQlxrB0Ns9jJSBCVZz97vIfiVwm6etPN2vkb6DptjkjiUazvtyZ/Dpqb9VpC98GfSGiJBnCksrQXzDL1ppKfVvlzmA7WTa2X82ptFwIKsRswA974oqxwUMazNqGOcBgWhLsSM8+4ktC6ztGZ6Vg== 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=9SSB633gWMiogsX66VI0JDPRh7gwlNas7sNyedtmg0c=; b=j/PMmFO/gcz0u2gRkqFGHUJgcWJ+cnKFapO5gL9Ftg9WrJKAbELG3pVNRCQfPNyPJ93L1D4fu1mQKVe4TB/oiFgyUzdWNtSAPyveCbHHtIYeT9e+OgJfcmickcD74lLflnxjZ546crIJGvySWFq1UkD8da7BhKKwLTexXKfa1Pv54mgZh7s69wayPUIY5w2rPvjUA1hcwdeg3K1VvnUVChF6gNcIChtCA0KMXZmx0eHUNaOcK1nzu/6opDnhKwLJH3GKOgNknmEONd/YXLq7ukWMxBORMXyh+mnlXZ3EFlsiErINjSpBNRXJFj7n7YkMGKLts6cHzhbURpGCsyyfpQ== 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=9SSB633gWMiogsX66VI0JDPRh7gwlNas7sNyedtmg0c=; b=bFQ2rfrjHusaZi9rwy5DVAGtJT8NyuAq4jUVRWrrJl5rcK5ytGZzlUefbc7eI8xUzLZ/Gfe4vFZnt/UlOrcTRUOO20EibErWtWMIXgeq9rh7LnDXEsdwE2Hai47dEYmHTGCBPxgOEUDUi6f8TPD7L/LMKDeg8jTvzHr3QslsB5/AMQklUlHvFvtsykgVgOWHxy72AnvxJ7qsBgzeLjvolE4xlHkK2pQ8ysE6fR6fZfKcZW4HNV7Mi2tzeZzU/0MoLpya4P7DxK8EBNbJ0ROohcAkuPB8HF3DfJbVdTDG/RF2ex6aSH5vSoam3tzGg6M5/q8nubII51SoI3i7JE4Qdg== Received: from MW2PR12MB4666.namprd12.prod.outlook.com (2603:10b6:302:13::22) by MW2PR12MB2380.namprd12.prod.outlook.com (2603:10b6:907:4::32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4867.9; Tue, 11 Jan 2022 07:24:25 +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.4867.012; Tue, 11 Jan 2022 07:24:25 +0000 From: Ori Kam 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 Thread-Topic: [RFC 1/3] ethdev: support GRE optional fields Thread-Index: AQHX/SqU/7cI7vQpLkqVqKJmDy8VHaxarcHwgAKTDgCAADyjEA== Date: Tue, 11 Jan 2022 07:24:25 +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: aa2cc457-f963-467e-3b4e-08d9d4d36553 x-ms-traffictypediagnostic: MW2PR12MB2380: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: oBZNt76mVFjUg+qFHy9kpK3ie1mGhYXXJTvuQn/Lv8s0Q4Hu0aenAjetxY4q8wHwF7cQh5BOopWtQpmYEOgS5lK6p/mJsB849SFf/fAmlj//oJ4/yw3NzRi1sKLAuV8iniu//kFvTN+fRtax8zr7ezzf97HLRxmyVGSbkppMdFr2ecs3A1lXwZd+HFpHcpXclBP3XqQhdlyuizKgTpJCwwXSj9AA6d3orlDJQBohtEKCLHYpB02zxP5t4wBFJ8p4zEAqBK8b/tbdRtZg89+C+tnGHe5z31HYrjfJKq6G1HldoPEfoBwa3Dih550BXHJqqU1ZGa4IqnXGhvtEj0XIEU11UBgmabq94J4tyV/boXF77mPfkR9iPI0R7yMQGIIxW9irVBsTUx3f9mXC65RtjovFWLLqNHFwz0dKYZkhC47kfci/WYxQcFvAML0tF05Fm08MAW1AmVAhwEx0KQK+4PEPgn6ysejp1OqBVYOnBYQK5H48uQtUiNIY3U7+qu0OmzyMXg4iLExlfDfnZlhWPpepaVBEimy/rtsBkYeBHBIluV9jMfyAVl42riB4jAinKkmnxR+n73AJFJahDNTxmdviVGEPvSxTM84Gl1SyBi0eaqxJNi+4muB3inFp9B+JDOLvt9ZWlIsYsMvC23Yb7dpvsLyg/0N1zvrfZyVYs+nRIkY3L9k5Q5pCMM0nKsYvKgbN51MNvNYiLjh8TZzhPg== 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)(316002)(38070700005)(8676002)(4326008)(71200400001)(8936002)(38100700002)(110136005)(122000001)(2906002)(66446008)(52536014)(186003)(66476007)(26005)(76116006)(66946007)(66556008)(86362001)(5660300002)(53546011)(55016003)(33656002)(6506007)(508600001)(83380400001)(7696005)(64756008)(9686003); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?vWTrEpcmCZHbmES+gkpUIhx12QpaZreuKNsnFOfsvjOM4ZFMQxoSNtTrNbgW?= =?us-ascii?Q?Xxy4fbGOfr3/ndQz2AaBioJUTLrMejVfacNWZ9z34OC0vC0aRbQxRa/0hwUa?= =?us-ascii?Q?JUazeEf81bHV2m2h3Gz8r7ElBkrZQhz9Oys+x8/fbr/TeeNIC+yvvHS/xage?= =?us-ascii?Q?P1xGNwa4B+wUhqbq1z7qPPceE4G8CFa1LNDG/JNWPIuFTJ0Y76M29Pk/nooV?= =?us-ascii?Q?Ow8dnpQ1Li/rsz5yLIT7+SRIkZ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ascii?Q?ohUkviTD6G/eNobwVPajmm2miywYfJQd5ICLBaC7pvyXQ2dk4wmVXnl52mD5?= =?us-ascii?Q?U8L79hf2bGCyAC95jmQ/NGS0/hihD0SJzmr7+zTF/WvRKaVk9i/T/7/cMQNg?= =?us-ascii?Q?Di/MvHjuuYkRYmTcDutsMno3zSp3eKuY/TbwSsUWzFkVsO2gGS7XMgO/NcXM?= =?us-ascii?Q?CHuDY8q1N2U/CCTZL1BMq8W5EnnyP1vIXz31U4mpIGpljU/Flc4IccQ7yfEf?= =?us-ascii?Q?+X66+Spmg5FGm9z2taBJjky8zRWmmU7HcqTxTkbWI4UxCU58un8BcXFpyDKE?= =?us-ascii?Q?N8qTecOJezia1RzhJRdmzknztG3AU2du5RJKMd4qbch9QIDLrQyOsdUKV4Vs?= =?us-ascii?Q?gvQUSVb1vf0EE23W/yUMjPIZh0ASE+xr3oMAyYmCBWwL0ftgLP/e1b/ICq+x?= =?us-ascii?Q?+KG+u0CEmqoT6IGvWm61NVOjYyeRjz3FqjL+YrMHOL4khixuYwYk51Z49pb+?= =?us-ascii?Q?iaTHx+1bohck+mKSyWsWE3k=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: aa2cc457-f963-467e-3b4e-08d9d4d36553 X-MS-Exchange-CrossTenant-originalarrivaltime: 11 Jan 2022 07:24:25.1996 (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: f+O0m5e+8gKunPtRvEWR8Mctx9wXDAFs7WoBPxACIEHqmCM+I9euDvL+hkjHgxcjvIuo9EchG4LXsbhU68QRkQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: MW2PR12MB2380 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 Sean, > -----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 >=20 > Hi Ori, >=20 > > -----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 a= s "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? >=20 > Do you mean to add description like bellow? >=20 > Item: ``GRE_KEY`` > ^^^^^^^^^^^^^^^ > +This action is deprecated. Consider `Item: GRE_OPTION`. Yes and also add the depreciation notice in the release notes, there is also 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 sho= uld be removed. >=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..27b414= 0 > > > 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 >=20 > Thanks, > Sean