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 8F12DA00E6 for ; Tue, 9 Jul 2019 07:21:08 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id D127D325F; Tue, 9 Jul 2019 07:21:07 +0200 (CEST) Received: from EUR01-VE1-obe.outbound.protection.outlook.com (mail-eopbgr140089.outbound.protection.outlook.com [40.107.14.89]) by dpdk.org (Postfix) with ESMTP id 3DFEA2E81 for ; Tue, 9 Jul 2019 07:21:06 +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=fZGA5EuQZ6Qu0yw4gc+WCHQzbU8Efl4EXEBtK3MVoNg=; b=hIBwJ9gX685C1iVCL7/QHNo5Jm2WZbOCndodgsll9/Wt2MKd+3ZUtRz8lcwrvXsesZJGfO2tlTSO4tBbx2QB4GWRM2ztC7pIoyFHQ553kRQgZP42/+zn7gptdFF7Ecm/YSzJV22jlQqKzuM5RZdEiQLOACmbkkBDGY5qCKWb2mg= Received: from AM4PR05MB3265.eurprd05.prod.outlook.com (10.171.188.154) by AM4PR05MB3235.eurprd05.prod.outlook.com (10.171.188.16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2052.19; Tue, 9 Jul 2019 05:21:04 +0000 Received: from AM4PR05MB3265.eurprd05.prod.outlook.com ([fe80::1442:fc4d:41ad:29d2]) by AM4PR05MB3265.eurprd05.prod.outlook.com ([fe80::1442:fc4d:41ad:29d2%5]) with mapi id 15.20.2052.019; Tue, 9 Jul 2019 05:21:04 +0000 From: Slava Ovsiienko To: Jack Min , Adrien Mazarguil , Ori Kam , John McNamara , Marko Kovacevic , Thomas Monjalon , Ferruh Yigit , Andrew Rybchenko CC: "dev@dpdk.org" Thread-Topic: [Suspected-Phishing][PATCH v7 1/4] ethdev: add GRE key field to flow API Thread-Index: AQHVMxeo1Sf4DCIto0uiODJ9AxcBzabBxfGg Date: Tue, 9 Jul 2019 05:21:04 +0000 Message-ID: References: <20190624154018.128379-1-jackmin@mellanox.com> <25601478c6091a6324781d9604e64a2867f81dc6.1562320050.git.jackmin@mellanox.com> In-Reply-To: <25601478c6091a6324781d9604e64a2867f81dc6.1562320050.git.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=viacheslavo@mellanox.com; x-originating-ip: [95.67.35.250] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 860537f8-0dd7-43df-4fc0-08d7042d3d71 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:AM4PR05MB3235; x-ms-traffictypediagnostic: AM4PR05MB3235: x-ld-processed: a652971c-7d2e-4d9b-a6a4-d149256f461b,ExtAddr x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:7219; x-forefront-prvs: 0093C80C01 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(4636009)(396003)(136003)(376002)(346002)(39860400002)(366004)(189003)(199004)(13464003)(256004)(7696005)(6246003)(476003)(99286004)(486006)(33656002)(14444005)(102836004)(55016002)(110136005)(76176011)(11346002)(446003)(9686003)(26005)(186003)(6436002)(14454004)(66946007)(73956011)(2906002)(66476007)(66446008)(64756008)(66556008)(8936002)(52536014)(4326008)(229853002)(74316002)(7736002)(86362001)(25786009)(81166006)(81156014)(8676002)(5660300002)(478600001)(305945005)(3846002)(71200400001)(6116002)(71190400001)(53936002)(316002)(6506007)(53546011)(68736007)(76116006)(66066001); DIR:OUT; SFP:1101; SCL:1; SRVR:AM4PR05MB3235; H:AM4PR05MB3265.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: KOhdGV87jZ+nF3J8KYN66JYU9hBKcOk1PQiTxA0DqTmsy77fuL8XRDf/f+LdFMKwSA2MQHrJ2pyejyj4hDzC5Oe6L3idHfogstbQ2kAksi18/ZEq/XL4Bgz2DCq9TiyUA0dpaGMtNea0xfpaxs2JA1NJmgYttt7tz3ytpJlWK3gNYSlDosTNEFxf9QbIQsuJjbYMNVDWpAlGAbDn9uqnsOOFSX6G4nM0xTs1zL8SQDhPzXa1+9S9poG9ssYMo6BIjeKittpglrM7diCZu7dB05mk6aiYx/QIJzui/ca8HPT5aF97Te6WtwMv7iUYWvk6l8vw0tu4Gx/yIgxBksdZGCt65J46tE8PR0YsALfoPPiIcSofOM9uYD18fDfbsSBJI5USJ6rZr0XapAGhIc7HnL2Zzj9/9VN/qb/1q5HU8KM= 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: 860537f8-0dd7-43df-4fc0-08d7042d3d71 X-MS-Exchange-CrossTenant-originalarrivaltime: 09 Jul 2019 05:21:04.5131 (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: viacheslavo@mellanox.com X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM4PR05MB3235 Subject: Re: [dpdk-dev] [Suspected-Phishing][PATCH v7 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" > -----Original Message----- > From: Xiaoyu Min > Sent: Friday, July 5, 2019 12:54 > To: Adrien Mazarguil ; Ori Kam > ; Slava Ovsiienko ; > John McNamara ; Marko Kovacevic > ; Thomas Monjalon > ; Ferruh Yigit ; Andrew > Rybchenko > Cc: dev@dpdk.org > Subject: [Suspected-Phishing][PATCH v7 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 > Acked-by: Ori Kam > Acked-by: Adrien Mazarguil > Signed-off-by: Xiaoyu Min Acked-by: Viacheslav Ovsiienko > --- > doc/guides/prog_guide/rte_flow.rst | 9 +++++++++ > lib/librte_ethdev/rte_flow.c | 1 + > lib/librte_ethdev/rte_flow.h | 13 +++++++++++++ > 3 files changed, 23 insertions(+) >=20 > diff --git a/doc/guides/prog_guide/rte_flow.rst > b/doc/guides/prog_guide/rte_flow.rst > index a34d012e55..8072fc1664 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``. > + > +- 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: ``FUZZY`` > ^^^^^^^^^^^^^^^ >=20 > diff --git a/lib/librte_ethdev/rte_flow.c b/lib/librte_ethdev/rte_flow.c = index > 5c4952242f..f617e0304f 100644 > --- a/lib/librte_ethdev/rte_flow.c > +++ b/lib/librte_ethdev/rte_flow.c > @@ -74,6 +74,7 @@ static const struct rte_flow_desc_data > rte_flow_desc_item[] =3D { > sizeof(struct rte_flow_item_icmp6_nd_opt_tla_eth)), > MK_FLOW_ITEM(MARK, sizeof(struct rte_flow_item_mark)), > MK_FLOW_ITEM(META, sizeof(struct rte_flow_item_meta)), > + MK_FLOW_ITEM(GRE_KEY, sizeof(rte_be32_t)), > }; >=20 > /** Generate flow_action[] entry. */ > diff --git a/lib/librte_ethdev/rte_flow.h b/lib/librte_ethdev/rte_flow.h = index > f3a8fb103f..bdb8edee42 100644 > --- a/lib/librte_ethdev/rte_flow.h > +++ b/lib/librte_ethdev/rte_flow.h > @@ -421,6 +421,19 @@ enum rte_flow_item_type { > * See struct rte_flow_item_meta. > */ > RTE_FLOW_ITEM_TYPE_META, > + > + /** > + * Matches a GRE optional key field. > + * > + * The value should a big-endian 32bit integer. > + * > + * When this item present the K bit is implicitly matched as "1" > + * in the default mask. > + * > + * @p spec/mask type: > + * @code rte_be32_t * @endcode > + */ > + RTE_FLOW_ITEM_TYPE_GRE_KEY, > }; >=20 > /** > -- > 2.21.0