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 B2FBAA034D; Tue, 11 Jan 2022 04:44:48 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 40443410E8; Tue, 11 Jan 2022 04:44:48 +0100 (CET) Received: from NAM02-SN1-obe.outbound.protection.outlook.com (mail-sn1anam02on2085.outbound.protection.outlook.com [40.107.96.85]) by mails.dpdk.org (Postfix) with ESMTP id 2BB9B40041 for ; Tue, 11 Jan 2022 04:44:47 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=d+uAGVtFBMolxvWZpY24sFAyUH3doh1wN9cNX/CvhJA+gk+n4L+T+1uCPUTD5fAoiFomSWuvnxRwFful5IIo0i6PuveahWNvnblzhWTx+Kz9WswLlv5H3iZ4BfGya0ytkdYBllvt96Q7oOxKEpvdGLBiq7b/6IP1urnNykZWoWjvYdMiQGWXX2km4KbB6NGZsF5Biii2aOsNXwzf2/Lm26YgzwTVOTTa7387yNc+Syb7qHJpfVXl/8m8FF2oeDc0Iid0Lsp7BQ1qSU0J6zCiCwPiPZofn6Ld74aBIp/7ChFdejMbRz2XGHt+c6YLznsxp2h2rVXmDrTGW11zW6Xx9Q== 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=MpESqLDARqvPFaJ2cEAkuSMjUfhaoOW6vQ1lAOb0U54=; b=j01FagzeEpRY6XoDzMTMZ8DyL94R2e3lKAqzZW82wJAWvulp3ZldakQTWhwzGtFfbZ/z4YvRhTbZ34EIzVE6GL5+l9xpCXpyQnq2NZ3q2OW/zbFhtTSR+zYAV9HfKrGm3UGQS0VXQIQsDddEkrHh8obqQ0HD7B5i1goojzKMtXOOzoPEKfXFUlbjWgKfVvKvisx61PmT0b22MRlYkp/VMLgbB//2uY0O9RxcEiUdonQImBS95US6WAkl4z87Zu9EhN8zUyTEMHCluRcEI9jq62q9gOaAgPaUvIuOJQdRzOPBgFhIH3vzDzjLVloxqb77fx8aZJf5H70ZqVDkPAiQNg== 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=MpESqLDARqvPFaJ2cEAkuSMjUfhaoOW6vQ1lAOb0U54=; b=HUvNdabhLKJLrjBKUmE83DbJ3tZSPXbSzF+D1JVTM9F+BL56p8cCC7Hmgxz7htlhc5DxDTxMPRzxF6RaKWXkx8aQZPIb44YaZIEs3KYEJWXvwOuWN3/6ZXxvmDG1VdWazcFtpGmAS+dTW0TxspK8z7jpucHHazgflaMWTqZMOasfI0H9uwuQeLNfBt4gGGda779WA/VIhIO6sSPN8/LgFQkbeEw1vvsQYf80RhwNNcIwmAjSjDMs1amFvWQ78FnLadqBZVMWqnm/GSR0L5lGiC18MCA1+AKDWEZxr2cFObJJoOH2OJOkeRutW9o3M3QqBX1ehBqq5Rh75P/frrPeMg== Received: from DM8PR12MB5398.namprd12.prod.outlook.com (2603:10b6:8:3f::5) by DM4PR12MB5359.namprd12.prod.outlook.com (2603:10b6:5:39e::24) 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 03:44:45 +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 03:44:45 +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+3tTaxaruiAgAKQgcA= Date: Tue, 11 Jan 2022 03:44:44 +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: d58737b8-cb12-4078-a958-08d9d4b4b56b x-ms-traffictypediagnostic: DM4PR12MB5359: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: US3E9+M6grcIkgyFFDbRvkq6nnrM46zEdBpEBBqlUr7CebxTleh9GywAH83MgGE6I5/i66svVsN6PWjs9Tl5oSkyWi/1Sf8khyBSeZR8FgvYKOdCRxwpqGE+0LT0mZGeR+NPJcCVBCed5tBqt6Yr1Ga6xlGVojNQ7yW8nBRVgzKRXN188FodzLZ8ujq4u1ScGdT1SNicbfupP86S/TMva1KYV/yy9auOOwA7zIW5MJYKERYxn3OEp9RaxF4e5kEEQeT0iQMrOqUZ9NEL8tF0QJ4Y1vtimmRS4nYhA0fUz/I8CpjooHQvFkA/Aqg0giSYPoYTCWQj0pVMDSG6m3yVHsBQehi+ury8bBCHOHgjlYhZorHELM2s9l/xissXnUNPaF06ZPGlBVufKnG+cpIjh45vM1cV9SzJ/5c+TDjIU4dNC/ZmU2XjZBHAif19jqrcVBGrNHwzzk1ov673Cc4nUBDu0J+jaU9VPY/U9zS+qz1agkWOqq7Ej96c8a4pweRUIv3iCwEZjebDqHf7J/cwwfO2cKDa746zKDUzKRq1rNdA17bgz2XHgZgycAb79IG2bcVZQnknvRLpPdkGUSjFiAXVO9AieSkeoMPfMtYQ19qOJ0JD44R7CmNLQka1dMWLq20zUZkS2BJCSNcwp0jLHmTRupstoooI+eYFJze/v7NaKKuhnf3yOmbQrGBBLw7xmG+snZ5gxAQIoPzYCCh1cg== 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)(66946007)(5660300002)(508600001)(76116006)(66476007)(7696005)(83380400001)(52536014)(122000001)(9686003)(4326008)(38100700002)(38070700005)(66446008)(64756008)(66556008)(110136005)(71200400001)(86362001)(316002)(8676002)(8936002)(33656002)(55016003)(26005)(6506007)(186003)(2906002)(53546011); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?N+SP1Zhi7Rf4RB8mV8fRqun2S+Qpbgap3awKuXl5HLKRLe2w2p+JaJl+1VTc?= =?us-ascii?Q?jhpz4hibkdpR58L9za6jmkSfYYvHsv50HkH7H2AWuyi+9JjxDpcTMxKcOniZ?= =?us-ascii?Q?SKfXI+giWtqSNcwvuRTqnAIZWDabgobb0nR3oxFE/HocZSZyM6IwG8uv72IB?= =?us-ascii?Q?w73z+cBMSE0f9xrugiBi2vaICqMslyykHhDO+6AsCgdO9AJJqITt2gzzT2n+?= =?us-ascii?Q?yH+U3PdnYgR/Jlm3AjbM/IVhWdlrVt0UV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nVSFuryQq6oTmG0O0s+ODUSdeOvJLpF+pJNvYAY6rao6mCbds?= =?us-ascii?Q?VjVEVu4QkFH8YJRdMv4xoBXNBx7dAwrEaGZ5824dUfwKTEZHdomiAeeST+/d?= =?us-ascii?Q?J4vpCRgUgxnBydWBEm5/rWBDRSj8kGf/Te9ivcYERibu0CQ46ZyMysgq9syh?= =?us-ascii?Q?I1R3+cGOobRVuqLxi+eGeMXq1TLEJy99OsPj6C371VWb0NiPZBNs7p0snImC?= =?us-ascii?Q?R5CrpyIi97fFvnlHGvSCQnNfAaJGWn5ZoNvCgodnJbR2z9sVPW4RmXraTB1r?= =?us-ascii?Q?kVSjJD3JZg1Pwr8mUvxVPm/elArT9pmK6kH0xifoCzO4E5JWlFXLuKpHPeej?= =?us-ascii?Q?Lok5dstORZ9GLtIdwRUNjOLTdRiz3igaWUwO3wJmEG1CjcAoxYOJr2Pe1sA2?= =?us-ascii?Q?m7J6EFK5voIjosIvlSyBoem6eeMuvqn+NH5oMKu/q7pjkPsZM3z6yXjPDk4m?= =?us-ascii?Q?nUIisrSITWWVBc3BwrfpUVg=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: d58737b8-cb12-4078-a958-08d9d4b4b56b X-MS-Exchange-CrossTenant-originalarrivaltime: 11 Jan 2022 03:44:45.1788 (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: tQ+yuOQSujVGDKEDWkcbHM6XCwwDTDkzc8eS/Z+mgvlbR0grttL1PfgxSudFmpBC8116yepgPYqdoJmqXeHYhA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM4PR12MB5359 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: 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 >=20 > Hi Sean, >=20 >=20 > > -----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)), >=20 > 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 > > 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 >=20 > Best, > Ori Thanks, Sean