From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.1 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,URIBL_SBL,URIBL_SBL_A autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 94111C5B578 for ; Mon, 1 Jul 2019 05:40:32 +0000 (UTC) Received: from dpdk.org (dpdk.org [92.243.14.124]) by mail.kernel.org (Postfix) with ESMTP id 237DA20B7C for ; Mon, 1 Jul 2019 05:40:32 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=Mellanox.com header.i=@Mellanox.com header.b="ZIjZHl8q" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 237DA20B7C Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=mellanox.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=dev-bounces@dpdk.org Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 16E7331FC; Mon, 1 Jul 2019 07:40:30 +0200 (CEST) Received: from EUR02-AM5-obe.outbound.protection.outlook.com (mail-eopbgr00046.outbound.protection.outlook.com [40.107.0.46]) by dpdk.org (Postfix) with ESMTP id CD19A3195 for ; Mon, 1 Jul 2019 07:40:28 +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=sycmdzxwbpHuqZoSm7JPiTwpqzE0VFz5AakX1vsxUz4=; b=ZIjZHl8q+zqIEkGZ86iLeEVjmewzgndJV1+FHfzSHZl+b1BPY/6NVUi2YiV7RaEggqTVxlOV0Q75ZcMFL1YzANnobyCEUZssb3IG4GVn5j02iPvPW+fso9vrKel+lM8Gy5ieSwL6xjARHsxz3z53i9dplArRsjyl/uGZiSok2A0= Received: from AM4PR05MB3425.eurprd05.prod.outlook.com (10.171.190.15) by AM4PR05MB3234.eurprd05.prod.outlook.com (10.170.126.155) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2032.20; Mon, 1 Jul 2019 05:40:26 +0000 Received: from AM4PR05MB3425.eurprd05.prod.outlook.com ([fe80::d12a:4df1:37d7:cc06]) by AM4PR05MB3425.eurprd05.prod.outlook.com ([fe80::d12a:4df1:37d7:cc06%7]) with mapi id 15.20.2032.019; Mon, 1 Jul 2019 05:40:26 +0000 From: Ori Kam To: Jack Min , Adrien Mazarguil , John McNamara , Marko Kovacevic , Thomas Monjalon , Ferruh Yigit , Andrew Rybchenko , Ori Kam CC: "dev@dpdk.org" Thread-Topic: [dpdk-dev] [PATCH 1/4] ethdev: add GRE key field to flow API Thread-Index: AQHVKqMp7Bn0BlhzeEyUGIehvoWowaa1SJTA Date: Mon, 1 Jul 2019 05:40:26 +0000 Message-ID: References: <20190624154018.128379-1-jackmin@mellanox.com> <20190624154018.128379-2-jackmin@mellanox.com> In-Reply-To: <20190624154018.128379-2-jackmin@mellanox.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: spf=none (sender IP is ) smtp.mailfrom=orika@mellanox.com; x-originating-ip: [185.175.35.255] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 5c6c6959-7fbd-484a-40f7-08d6fde69ecf 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:AM4PR05MB3234; x-ms-traffictypediagnostic: AM4PR05MB3234: x-ms-exchange-purlcount: 1 x-ld-processed: a652971c-7d2e-4d9b-a6a4-d149256f461b,ExtAddr x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:8882; x-forefront-prvs: 00851CA28B x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(4636009)(39860400002)(396003)(136003)(346002)(376002)(366004)(189003)(199004)(13464003)(4326008)(14454004)(6246003)(53936002)(5660300002)(7736002)(25786009)(66476007)(6116002)(3846002)(478600001)(9686003)(6306002)(68736007)(55016002)(2906002)(966005)(6436002)(229853002)(7696005)(476003)(81166006)(8936002)(26005)(76176011)(86362001)(186003)(6506007)(53546011)(71190400001)(71200400001)(102836004)(81156014)(446003)(52536014)(8676002)(110136005)(33656002)(11346002)(99286004)(256004)(305945005)(14444005)(74316002)(316002)(486006)(73956011)(66556008)(64756008)(66066001)(66446008)(76116006)(66946007); DIR:OUT; SFP:1101; SCL:1; SRVR:AM4PR05MB3234; H:AM4PR05MB3425.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: mGHxEE3vQ97KcE9txankSZV7BOKIdXAQGVEtzc/sGEuYw0kVQF4QPj+8396APEmz4OVi8/GkmkN5ld9160CusQW7/+JwhJwbQ53H8YdgPMTegfWWkO9nh3xIl7L+7gu3V0lfrcJ1Q1j7NViMJaEBHOoxuNuNsAcRY5IH7fEK4Nu9rOy0xfTJuDFnq8XMaxsLX0F1pnVLc9RCQnxgv/N8bbRm+0U4MIhf5DCF28odBQMgpdA28+hjDkshD37tM+4UaD/BIqyNAD0qsrZw0wwEyC9DMsDZoYsTliJoAJu5eAnxD2uVjCzxqbGHarwaKPnDBLby6AouiR373jEivcZgAJjRFZshkpoBSZZTIRG29dHepv1IwXutIsn6U+XCEBkt+aidMiSr8qHPK/yHDs/LaiFlTfNt6rJtU5lhEe7XPCw= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-Network-Message-Id: 5c6c6959-7fbd-484a-40f7-08d6fde69ecf X-MS-Exchange-CrossTenant-originalarrivaltime: 01 Jul 2019 05:40:26.6423 (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: orika@mellanox.com X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM4PR05MB3234 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" Hi Jack, I know I acked this patch, but after Dekel patch,=20 https://patches.dpdk.org/patch/55667/ 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 this patch to match this new convention. Thanks, Ori Kam > -----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