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 52CE0A00C3; Tue, 1 Feb 2022 13:57:56 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 3ED9B40698; Tue, 1 Feb 2022 13:57:56 +0100 (CET) Received: from NAM11-CO1-obe.outbound.protection.outlook.com (mail-co1nam11on2043.outbound.protection.outlook.com [40.107.220.43]) by mails.dpdk.org (Postfix) with ESMTP id 9D9B440691 for ; Tue, 1 Feb 2022 13:57:54 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=d8aCW/5myNcsSIwV7tyfLJaOvcin7pMLE2lsB/YCLlixRqOp0DUEOWDD0Jn66LfCL2Zrg/HLOIeOvROyXZjOfNeczl1i70eb5Id+o09vfl5XCK1QCDXB3lWWiqTe5YeTkWWSM09MWFGHqwp6NFEqD62AeEbsl7vFOw+YdLiGeyYdGGMXyvJBKWgz5bW3zBF2GmcXnnGAmiGxBOJ6HJeAYmM21Lp0/qd0F9/l8xVnwbgLPMQY2wBEAYBw7t/XqO1hfaCwc7iK6F0lOxTh0v76sFG8afU6wDHqFSHEyD51AC5dz1Eb+yQ7ltBKf2a15kqU4KswSts5k6581tXAeQdw0Q== 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=pb+hkiDPZPNOe9FKvkBC3fy9fOnn1w2mNQ3ibwVFtqU=; b=HbQbZmVaSBF8qbHhSbQoomlCkicA3oEUM2kPjZ4pDAnUoxQjPCeMiXHcAWu8nC5wmQcLc7UAUz8papAFksOhILq9ADQCPs0GRZNfgwOa53i7JW8j0og5hgAgfXaZhl9X0wYo2uFWNQUUN2P6kVplbVouecx6gh0eZDSRie8I7+dYWbcdCkuv2fzSJCDUX8AyQKraDNaNK+FlWMqERtnMaZ5szAbsIES9KuRWa0wSXVPioU9XisUTkzML52p3TNkxTqihwtacyk1Ketl+08HARzp7xBBU7i8wMkUlmaKzkTpg1hMRlq61mntLr/16cKXV9Q/I0r03Agnv8F04uzcH5g== 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=pb+hkiDPZPNOe9FKvkBC3fy9fOnn1w2mNQ3ibwVFtqU=; b=QEvmkWSAvIk77Ru/jaeYKdTFqc6HaAE7rTvWmaAxDQ5R2iOOdZOAzXMVWpzsKlUm12IqJQ4gqqYH9V27PR4ptYX5rpficPNcXKAfKg/wpZfe25kROZBvzQVkc6y2w6yj81e3v87xT17TRArDAor5Q81AcLrDxEQjc4++1sqLJHkYig4NnT5YErd5JQVNeOWFk84yaEB7CQ3eETA533nBzOigBQbJoMBFHCcjsw287qzsBzFlHJ50oljnHR6CwW0Jqs50gPSlPXyzmOULM7QQtn+ufZ6EO3ph63h5i8YcHlXQ3HyXwU4TjZXmaalWAJH0rlhp2pYKW+l/yfYQhBnVnw== Received: from MW2PR12MB4666.namprd12.prod.outlook.com (2603:10b6:302:13::22) by CH0PR12MB5267.namprd12.prod.outlook.com (2603:10b6:610:d2::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4930.15; Tue, 1 Feb 2022 12:57:53 +0000 Received: from MW2PR12MB4666.namprd12.prod.outlook.com ([fe80::1869:1984:7899:8cbb]) by MW2PR12MB4666.namprd12.prod.outlook.com ([fe80::1869:1984:7899:8cbb%4]) with mapi id 15.20.4930.022; Tue, 1 Feb 2022 12:57:53 +0000 From: Ori Kam To: "Sean Zhang (Networking SW)" , "NBU-Contact-Thomas Monjalon (EXTERNAL)" , Ferruh Yigit , Andrew Rybchenko CC: "dev@dpdk.org" Subject: RE: [v1 2/4] ethdev: support GRE optional fields Thread-Topic: [v1 2/4] ethdev: support GRE optional fields Thread-Index: AQHYEpDvj91yEW8sxkeaArVaMH2hH6x+rvLw Date: Tue, 1 Feb 2022 12:57:53 +0000 Message-ID: References: <20211230030817.15264-2-xiazhang@nvidia.com> <20220126084404.40178-1-xiazhang@nvidia.com> <20220126084404.40178-3-xiazhang@nvidia.com> In-Reply-To: <20220126084404.40178-3-xiazhang@nvidia.com> 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: 3a733daf-5320-419b-f914-08d9e5827594 x-ms-traffictypediagnostic: CH0PR12MB5267:EE_ x-ld-processed: 43083d15-7273-40c1-b7db-39efd9ccc17a,ExtAddr x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:7219; x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: gl9BDUwBCnNy9Ne17mkSED9eJXGVQW8/dnj7aPjUftKi5rCgsdHF96xWdI1hlsYkaIqRocETuAYTxrHUTO6FFMTqNT9LT/lZy9wTrRAmQXjpjaJ3bURGfVyfI8iLTEDJkDb/sW5QPByuZGIR8ntPQKv2Y69ydK6kETaRsCV3Ug8oW0QxeiQjzUu/p+m1iFa0JgoJYtWlbf2YAV7Yre18FpzytLhn8KIvBtwUJmhir8y+KwWqbIP2V4NZInCTf6vR3EefNkgYm4aBq6cH+7nXhR1on0XCGc5xKM7fNIkbRpQmpG8cJpCMJZuQ8UIcdi7qs5TKNfctD/GXm1KileXdJHdAsH4LNdXcnGYoBaIty5jHbFWV0Qn6tHhENWlGHD/NIReAXQ9VgSrnfC+x3T1diyGiThcFljpBQM0y4PmJ5Gs7BJ9BulJA2wvxyM6aC8ElMIREiPP8A1jl7RDO/4s7sALlkD7t2jOvyQPqStteHNnsFdT/0V8pfMTKOkFJ8AWTtf1uDhdebhHCcHWimZgnIKYJX7LrU4HkMUVHbzoBMSMUrhEqgFgl6pNSLfYCrg0rvW3Ts/JXdofKMX62171Z58QN6fMgAro6o1XCFJHJYghZFRGQsUh7wYsh0xMNwq5npQ4kpuTAAXZh/atkThXfQOYm5oLHJhfVVNmUC5NxuV5/uqqtN7eEMHBrQwVIao3JY932lIN9/f4sSod/PMj7ZQ== 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:(13230001)(4636009)(366004)(6506007)(7696005)(38100700002)(122000001)(55016003)(33656002)(83380400001)(2906002)(5660300002)(52536014)(66556008)(66946007)(76116006)(110136005)(4326008)(8676002)(8936002)(66476007)(186003)(26005)(71200400001)(38070700005)(9686003)(316002)(53546011)(86362001)(508600001)(64756008)(66446008)(20210929001); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?KKOp8NEzKwYigzd/jo/Mc+IutZO/dPRJ9uCC6PhX5/kW0uoA1JbVer7mZ7JU?= =?us-ascii?Q?RUy2Tg28RUuOfzx/EEHQ79eLMMKeepTAnNB5/pu4ig+apd//ejSGALAWyv47?= =?us-ascii?Q?4tgvU5ffwqPIl6mHJ7064shZyg1zyNlwctOL1PJYwWlBatx4oOaWpKFXUzGn?= =?us-ascii?Q?9NV/vLJSlAdovk/SaVlbdAtm3ZL1BkAlalGIWYqyYP3t2qEJIipvMSCwZ788?= =?us-ascii?Q?Y5vZTljA6ZryXoX+qOp/md5+Q1UtCBv13hXtoziuFvTLagCndPuvxq91C1AD?= =?us-ascii?Q?20cJXa524tUN6BXHpREPJDo4c4vSSZKkmpbNK75DKk/7m9UGx8R9OCl82CJN?= =?us-ascii?Q?5xzXAIQDozVxvTCD3lUqlDxzDQ1TZn2y6lPslccCC8utUpCZgVpV/LwJPioj?= =?us-ascii?Q?lBzPI+v0dkpCa6h5m7yNvzsU08sn8ofXh1S5K7N0p0KHZSnzY9jz/wAwZ1r1?= =?us-ascii?Q?NRRZPYM69dAOz/yfmcHqB3/3+cd2clXgRCKeSesRwM2znLQk1om8E+iy8aUF?= =?us-ascii?Q?K62OQXMTN17xBmDJBWsJaJGyztKg4VWEaGfJIvz13H+0ESZszjt14rI8XghF?= =?us-ascii?Q?GeCTysiL2l1HgS1qyyvh3EQqvcBOGl5hbZfBSbA3eSXbEijzaQ81JEyFQxAK?= =?us-ascii?Q?6IAJ3WgEE0p0puDUmoJb+23vvxFZMFv1Th1Otnzy43OumZYMc8y1noNS+aH+?= =?us-ascii?Q?1CSRbXnTnA3YPxhtueFbjG/LCuv2CmxVSTYcXKMOY3HvlTIMD7FBfl6ENVRS?= =?us-ascii?Q?DbwqkrOS8qFgfYliZBKDBNhnTAXl3Y4Bv6nvwvy+68vYrNcR4Raky5OqMcb0?= =?us-ascii?Q?DxTdO1E+lvqVDim/msxXJqhWxBfIQF3BB9zBz7sU72ow3C72puOTT9C22GAP?= =?us-ascii?Q?S0oJ71q/DBP1nzuUie00Kw1IgIIaUpyClk65gTaOVKEnHDI4ma/TBeGm5bdo?= =?us-ascii?Q?JzT1G61Vge5G4CxGugmfE47An+g7HxWgTImtF6bS88ASxhwbxctVZ7zQ2amt?= =?us-ascii?Q?htg2AI8s2NH8GgHKrBWfgX3Ua59SI+t4IoT9BtkxYkP5U/KMSNrOsXT/YAb+?= =?us-ascii?Q?I5knWfRk+/PPARDhj22sHtifO+hZarafOfI72qi/jxc7nprHCx72XgP8Moxl?= =?us-ascii?Q?wtqWiFF8NbmVGJNhGRnoS4rpiqTOTgmn4zZQNFRnUMuHc3nooQwkRI94MkIg?= =?us-ascii?Q?JqoUb3FPle/zi5JbND6B0Q7/BUg3pZUdO2uYbMaG1seIMe+HklRGNiXxGk8u?= =?us-ascii?Q?TS3dE9xppl4AfZyqfQg5MoAVSeoRtuWKAqUMkBzM45U+AXh/0fMDCyVOqbEP?= =?us-ascii?Q?oj/zzr2R5nKWnsCbjVnW+kGUWwIWgAbK1ZT72fxPGWlXQDbO6HACvLJEOFQJ?= =?us-ascii?Q?mSyWz4+PLk0lut2TV0qb9xLOgqT/nicvFFORPs9VYTT8TYna5grjXM7T68Hm?= =?us-ascii?Q?IIvAiP6TFK7kwkhJH8lHzMcJ3TAiWLXx2UboBZ7vG53UPmtJsDwttYs3yruo?= =?us-ascii?Q?Y1+YtPEAvMVVeEPs8Widm7f4U5DQiazYm965Px1k6OJtCW9o7NV5c5oxboLl?= =?us-ascii?Q?BFLgaUuJEIfEUyvhMJmQja7FgbCrvvw19mYgMjFZcYEJyJuXe7eYvLz9YniS?= =?us-ascii?Q?zrc88mb1uT/0jXbTGs/bX8k=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: 3a733daf-5320-419b-f914-08d9e5827594 X-MS-Exchange-CrossTenant-originalarrivaltime: 01 Feb 2022 12:57:53.0217 (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: X2CwxxLc2KdiNBJpzok/19Tij/z+jwyKHLEPK8uz3gGI5Ol8520QD6rgBJ1Hihc1nofm7sBp5nfsql6aU9Yx6Q== X-MS-Exchange-Transport-CrossTenantHeadersStamped: CH0PR12MB5267 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, Please add this feature to the release note. > -----Original Message----- > From: Sean Zhang (Networking SW) > Sent: Wednesday, January 26, 2022 10:44 AM > Subject: [v1 2/4] ethdev: support GRE optional fields >=20 > 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. >=20 > Signed-off-by: Sean Zhang > --- > doc/guides/prog_guide/rte_flow.rst | 17 +++++++++++++++++ > lib/ethdev/rte_flow.c | 1 + > lib/ethdev/rte_flow.h | 19 +++++++++++++++++++ > 3 files changed, 37 insertions(+) >=20 > diff --git a/doc/guides/prog_guide/rte_flow.rst b/doc/guides/prog_guide/r= te_flow.rst > index b4aa9c4..0e47501 100644 > --- a/doc/guides/prog_guide/rte_flow.rst > +++ b/doc/guides/prog_guide/rte_flow.rst > @@ -1106,6 +1106,7 @@ Matches a GRE header. >=20 > Item: ``GRE_KEY`` > ^^^^^^^^^^^^^^^^^ > +This action is deprecated. Consider `Item: GRE_OPTION`. >=20 > Matches a GRE key field. > This should be preceded by item ``GRE``. > @@ -1113,6 +1114,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= " >=20 > +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`` > ^^^^^^^^^^^^^^^ >=20 > diff --git a/lib/ethdev/rte_flow.c b/lib/ethdev/rte_flow.c > index a93f68a..7f93900 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_flow_item_gre_opt)), > 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..db58b47 100644 > --- a/lib/ethdev/rte_flow.h > +++ b/lib/ethdev/rte_flow.h > @@ -37,6 +37,7 @@ > #include > #include > #include > +#include >=20 > #ifdef __cplusplus > extern "C" { > @@ -660,6 +661,13 @@ enum rte_flow_item_type { > * See struct rte_flow_item_ppp. > */ > RTE_FLOW_ITEM_TYPE_PPP, > + > + /** > + * Matches GRE optional fields. > + * > + * See struct rte_flow_item_gre_opt. > + */ > + RTE_FLOW_ITEM_TYPE_GRE_OPTION, > }; >=20 > /** > @@ -1196,6 +1204,17 @@ struct rte_flow_item_gre { > #endif >=20 > /** > + * RTE_FLOW_ITEM_TYPE_GRE_OPTION. > + * > + * Matches GRE optional fields in header. > + */ > +struct rte_flow_item_gre_opt { > + struct rte_gre_hdr_opt_checksum checksum; > + struct rte_gre_hdr_opt_key key; > + struct rte_gre_hdr_opt_sequence sequence; > +}; > + > +/** > * RTE_FLOW_ITEM_TYPE_FUZZY > * > * Fuzzy pattern match, expect faster than default. > -- > 1.8.3.1 Best, Ori