From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id C92B5A0487 for ; Mon, 1 Jul 2019 13:40:43 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 9F43931FC; Mon, 1 Jul 2019 13:40:43 +0200 (CEST) Received: from EUR03-DB5-obe.outbound.protection.outlook.com (mail-eopbgr40088.outbound.protection.outlook.com [40.107.4.88]) by dpdk.org (Postfix) with ESMTP id 8B50D3195 for ; Mon, 1 Jul 2019 13:40:42 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Mellanox.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=TPPqdDAvVANgeANZuazUHMmIPY9lrn+t5i27oydG2K4=; b=XW5FSTytR+yBRql/GGTOkJ0zTowQ468qMAL3a9h0FZNNlwezqohJILsU8EE29Ee3xQBiUuVp1nfbIgWKVLB4JMzEYqZ0TSQGl7rip4Wierkrksy7jwsj/8ChBom22k+KX2qJmPHV4iYzruxmgnJKlZZoj82tMezYA35aF5qd9Ss= Received: from AM6PR05MB6567.eurprd05.prod.outlook.com (20.179.6.215) by AM6PR05MB5270.eurprd05.prod.outlook.com (20.177.196.219) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2032.17; Mon, 1 Jul 2019 11:40:38 +0000 Received: from AM6PR05MB6567.eurprd05.prod.outlook.com ([fe80::357e:67f4:685b:57e2]) by AM6PR05MB6567.eurprd05.prod.outlook.com ([fe80::357e:67f4:685b:57e2%4]) with mapi id 15.20.2032.019; Mon, 1 Jul 2019 11:40:38 +0000 From: Jack Min To: Ori Kam CC: Adrien Mazarguil , John McNamara , Marko Kovacevic , Thomas Monjalon , Ferruh Yigit , Andrew Rybchenko , "dev@dpdk.org" Thread-Topic: [dpdk-dev] [PATCH 1/4] ethdev: add GRE key field to flow API Thread-Index: AQHVKqMpGVIcU3gTvEy0RSSB0lzLK6a1SbEAgABkloA= Date: Mon, 1 Jul 2019 11:40:38 +0000 Message-ID: <20190701114027.cenploimnemtlz4q@mellanox.com> References: <20190624154018.128379-1-jackmin@mellanox.com> <20190624154018.128379-2-jackmin@mellanox.com> In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-clientproxiedby: HK2PR02CA0197.apcprd02.prod.outlook.com (2603:1096:201:21::33) To AM6PR05MB6567.eurprd05.prod.outlook.com (2603:10a6:20b:bc::23) authentication-results: spf=none (sender IP is ) smtp.mailfrom=jackmin@mellanox.com; x-ms-exchange-messagesentrepresentingtype: 1 x-originating-ip: [139.226.40.4] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 158a20a2-5c28-4767-c01c-08d6fe18ef7d x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0; PCL:0; RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600148)(711020)(4605104)(1401327)(4618075)(2017052603328)(7193020); SRVR:AM6PR05MB5270; x-ms-traffictypediagnostic: AM6PR05MB5270: x-ms-exchange-purlcount: 1 x-ld-processed: a652971c-7d2e-4d9b-a6a4-d149256f461b,ExtAddr x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:9508; x-forefront-prvs: 00851CA28B x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(4636009)(366004)(396003)(376002)(39860400002)(136003)(346002)(13464003)(189003)(199004)(229853002)(25786009)(2906002)(6306002)(6512007)(256004)(4326008)(14444005)(71190400001)(966005)(14454004)(71200400001)(6436002)(6486002)(3846002)(6116002)(6246003)(11346002)(2616005)(476003)(446003)(486006)(7736002)(305945005)(478600001)(66066001)(6862004)(81166006)(53936002)(86362001)(81156014)(8936002)(6636002)(8676002)(52116002)(99286004)(76176011)(66946007)(186003)(6506007)(102836004)(66446008)(73956011)(66476007)(66556008)(64756008)(386003)(26005)(53546011)(316002)(37006003)(54906003)(68736007)(36756003)(5660300002)(1076003); DIR:OUT; SFP:1101; SCL:1; SRVR:AM6PR05MB5270; H:AM6PR05MB6567.eurprd05.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1; received-spf: None (protection.outlook.com: mellanox.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam-message-info: RL3lkZt6wO+AO8uUYs1ZPscS7rRFhAx7KSi7oeG3XfvsHfmw3elaiLLPZv1dJW76CIkIQ+i5btrXVwROCPUATsm8GkM4r/Cr6FC7+tjjIJ7gsEYSkts6wfM321reC/Cg+3QV6jwLFcSWpvuyFsts63Uitu1ssRFSqJLMceQs7Z3F2E+pM0oxadAJQerelUK6DosvCHk0yh4xsl+NcVQS/DTKh7xr8QapnqMmjbJWmP9h0P+dUA8PUeTngkdlSJqKrKdl3I5V75ckygMXIBq1ax2RGIqWbvPwLpSP4acDxgsyPWF683+8DgSHcqOEKzkki+a+t5p98TM5hv658pcT7LOGPytDdyTie6mDdAkBIP8BLjEct7cDkj8Ix/QesSmSRPXPwiJN5U71/bb8aW3RTiZT22ajYGvnXtLc1IoXz8Q= Content-Type: text/plain; charset="us-ascii" Content-ID: <0B9B09BE56DD1144B740073B1F7A3A59@eurprd05.prod.outlook.com> Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-Network-Message-Id: 158a20a2-5c28-4767-c01c-08d6fe18ef7d X-MS-Exchange-CrossTenant-originalarrivaltime: 01 Jul 2019 11:40:38.6510 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: a652971c-7d2e-4d9b-a6a4-d149256f461b X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: jackmin@mellanox.com X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM6PR05MB5270 Subject: Re: [dpdk-dev] [PATCH 1/4] ethdev: add GRE key field to flow API X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On Mon, 19-07-01, 13:40, Ori Kam wrote: > Hi Jack, >=20 > I know I acked this patch, but after Dekel patch,=20 > https://patches.dpdk.org/patch/55667/ >=20 > Where it was decided to remove structures for just one variable,=20 > and simply use the value. I wish if possible that you will also modify th= is > patch to match this new convention. >=20 >=20 OK, I'll remove the struct in v2 patch for the new convention. > Thanks, > Ori Kam >=20 > > -----Original Message----- > > From: dev On Behalf Of Xiaoyu Min > > Sent: Monday, June 24, 2019 6:40 PM > > To: Adrien Mazarguil ; John McNamara > > ; Marko Kovacevic > > ; Thomas Monjalon ; > > Ferruh Yigit ; Andrew Rybchenko > > > > Cc: dev@dpdk.org > > Subject: [dpdk-dev] [PATCH 1/4] ethdev: add GRE key field to flow API > >=20 > > Add new rte_flow_item_gre_key in order to match the optional key field. > >=20 > > Signed-off-by: Xiaoyu Min > > --- > > doc/guides/prog_guide/rte_flow.rst | 9 +++++++++ > > lib/librte_ethdev/rte_flow.c | 1 + > > lib/librte_ethdev/rte_flow.h | 27 +++++++++++++++++++++++++++ > > 3 files changed, 37 insertions(+) > >=20 > > diff --git a/doc/guides/prog_guide/rte_flow.rst > > b/doc/guides/prog_guide/rte_flow.rst > > index a34d012e55..e900a53e3c 100644 > > --- a/doc/guides/prog_guide/rte_flow.rst > > +++ b/doc/guides/prog_guide/rte_flow.rst > > @@ -980,6 +980,15 @@ Matches a GRE header. > > - ``protocol``: protocol type. > > - Default ``mask`` matches protocol only. > >=20 > > +Item: ``GRE_KEY`` > > +^^^^^^^^^^^^^^^^^ > > + > > +Matches a GRE key field. > > +This should be preceded by item ``GRE`` > > + > > +- ``key``: key value. > > +- Default ``mask`` matches key only. > > + > > Item: ``FUZZY`` > > ^^^^^^^^^^^^^^^ > >=20 > > diff --git a/lib/librte_ethdev/rte_flow.c b/lib/librte_ethdev/rte_flow.= c > > index 3277be1edb..1cd5f4d263 100644 > > --- a/lib/librte_ethdev/rte_flow.c > > +++ b/lib/librte_ethdev/rte_flow.c > > @@ -55,6 +55,7 @@ static const struct rte_flow_desc_data > > rte_flow_desc_item[] =3D { > > MK_FLOW_ITEM(NVGRE, sizeof(struct rte_flow_item_nvgre)), > > MK_FLOW_ITEM(MPLS, sizeof(struct rte_flow_item_mpls)), > > MK_FLOW_ITEM(GRE, sizeof(struct rte_flow_item_gre)), > > + MK_FLOW_ITEM(GRE_KEY, sizeof(struct rte_flow_item_gre_key)), > > MK_FLOW_ITEM(FUZZY, sizeof(struct rte_flow_item_fuzzy)), > > MK_FLOW_ITEM(GTP, sizeof(struct rte_flow_item_gtp)), > > MK_FLOW_ITEM(GTPC, sizeof(struct rte_flow_item_gtp)), > > diff --git a/lib/librte_ethdev/rte_flow.h b/lib/librte_ethdev/rte_flow.= h > > index f3a8fb103f..a708ccd53b 100644 > > --- a/lib/librte_ethdev/rte_flow.h > > +++ b/lib/librte_ethdev/rte_flow.h > > @@ -289,6 +289,13 @@ enum rte_flow_item_type { > > */ > > RTE_FLOW_ITEM_TYPE_GRE, > >=20 > > + /** > > + * Matches a GRE optional key field. > > + * > > + * See struct rte_flow_item_gre_key. > > + */ > > + RTE_FLOW_ITEM_TYPE_GRE_KEY, > > + > > /** > > * [META] > > * > > @@ -856,6 +863,26 @@ static const struct rte_flow_item_gre > > rte_flow_item_gre_mask =3D { > > }; > > #endif > >=20 > > +/** > > + * RTE_FLOW_ITEM_GRE_KEY. > > + * > > + * Matches the presence of a GRE key. > > + * > > + * Normally preceding by: > > + * > > + * - RTE_FLOW_ITEM_TYPE_GRE > > + */ > > +struct rte_flow_item_gre_key { > > + rte_be32_t key; /**< Application specific key value (K bit). */ > > +}; > > + > > +/** Default mask for RTE_FLOW_ITEM_TYPE_GRE_KEY. */ > > +#ifndef __cplusplus > > +static const struct rte_flow_item_gre_key rte_flow_item_gre_key_mask = =3D { > > + .key =3D RTE_BE32(UINT32_MAX), > > +}; > > +#endif > > + > > /** > > * RTE_FLOW_ITEM_TYPE_FUZZY > > * > > -- > > 2.21.0 >=20