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 76220A04B4; Fri, 8 Nov 2019 15:22:31 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 46FE21C1C7; Fri, 8 Nov 2019 15:22:31 +0100 (CET) Received: from EUR02-HE1-obe.outbound.protection.outlook.com (mail-eopbgr10089.outbound.protection.outlook.com [40.107.1.89]) by dpdk.org (Postfix) with ESMTP id 377591C132 for ; Fri, 8 Nov 2019 15:22:29 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=WrSpz2blfqLvzDm9WPrG+S5iVojw/OVujdxv8Ia0yROgYQuXuHxQws6J7dgA9QCSO8SdSAeyjTtnuHnX9p19s7Tl/xUNORTAN4uqLrSzo0YP6skCU+YympXXGGeznIoSwIxR4nTbghraAblS64eXYOjjbM5tNyfDPJZ54PaWduEJtnJbG7aVM30XCwKUZwvhdHYIggrQ5ZXYOAdjF6xtet15f/2XoIK1sWlXDJqVMxeC6JgK8ePnhoaysni2FGXTwAe9LCUdM2sAv6g4haaQJCqKwa0WT7HGC0eu7mjqmxXILcmy/zGK3lWz+to78BdKQq5AT1BiHzo4nAS9mHQFcw== 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-SenderADCheck; bh=J56GgtoVvXdQ+jBSjd0aEIzaIMTj4DKqCW7QgqDjIw4=; b=lDVX9xeq008WXitzz66qVNvkhVJ3j2eCKGNd2H/IJBWi8COxOJblNfi6H6m16OzKj5JiieItSoasVXr7n8bj+KKrGJWoRUONbY6QlNfNotDC4Sa+ucldn+odxIuftq4SsxQQ5TEpwlSJlyeVX2/NHlm01wxZZBL+mV0GeOHh8K2kXSmRaplrdKrRaAfK3VNfoELsDJu3LvLlVyAAt50KZMPjAivKtdehqsoT8CZ1rEU+CIxWASvFZe829YIjlR2r6o+S8WJEO/5EU2le09jGetcPj8UKhfOj1vGSt0KFB6YvnGxdlq9Jw3CY8u5ZazZ+qrVR5qLiJz5tA8CCPndUMA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=mellanox.com; dmarc=pass action=none header.from=mellanox.com; dkim=pass header.d=mellanox.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Mellanox.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=J56GgtoVvXdQ+jBSjd0aEIzaIMTj4DKqCW7QgqDjIw4=; b=qe+QYChjn8IYUGnFr+NSpmjomJJcDzTfbA/WewzAjeCE3uHcO8TTQ6q8K+z3VqM4usqukjjFGgV+zULo/KzOBGJlS3+/P9K56H5ta4Z6brT3fYpyY/GmUOM1D4Jgcr/cpDRcEmfGVGjAn8FfJ5L8iijoMTACwm0NyujWvkCK2hg= Received: from DB3PR0502MB3964.eurprd05.prod.outlook.com (52.134.65.161) by DB3PR0502MB4089.eurprd05.prod.outlook.com (52.134.68.159) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2408.24; Fri, 8 Nov 2019 14:22:27 +0000 Received: from DB3PR0502MB3964.eurprd05.prod.outlook.com ([fe80::a850:bac9:c90f:f2f5]) by DB3PR0502MB3964.eurprd05.prod.outlook.com ([fe80::a850:bac9:c90f:f2f5%6]) with mapi id 15.20.2408.028; Fri, 8 Nov 2019 14:22:27 +0000 From: Raslan Darawsheh To: Suanming Mou , Slava Ovsiienko , Matan Azrad CC: Ori Kam , "dev@dpdk.org" Thread-Topic: [PATCH v2 00/19] net/mlx5: support meter Thread-Index: AQHVleeNlcXvWVgAaE6QyAPDY2tyP6eBU/8w Date: Fri, 8 Nov 2019 14:22:27 +0000 Message-ID: References: <1573053090-179521-1-git-send-email-suanmingm@mellanox.com> <1573184965-49691-1-git-send-email-suanmingm@mellanox.com> In-Reply-To: <1573184965-49691-1-git-send-email-suanmingm@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=rasland@mellanox.com; x-originating-ip: [188.161.230.21] x-ms-publictraffictype: Email x-ms-office365-filtering-ht: Tenant x-ms-office365-filtering-correlation-id: ec6a120c-d0ed-4aef-58f9-08d764571547 x-ms-traffictypediagnostic: DB3PR0502MB4089:|DB3PR0502MB4089: x-ms-exchange-purlcount: 1 x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:3513; x-forefront-prvs: 0215D7173F x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(4636009)(39860400002)(136003)(366004)(376002)(346002)(396003)(189003)(13464003)(199004)(14444005)(6306002)(55016002)(5024004)(25786009)(6436002)(229853002)(256004)(3846002)(476003)(6116002)(66446008)(71200400001)(71190400001)(11346002)(446003)(76176011)(486006)(66476007)(66946007)(66556008)(9686003)(6246003)(305945005)(64756008)(52536014)(76116006)(316002)(102836004)(81166006)(81156014)(99286004)(966005)(186003)(6636002)(8676002)(53546011)(6506007)(8936002)(5660300002)(7736002)(7696005)(74316002)(66066001)(478600001)(4326008)(110136005)(26005)(2906002)(86362001)(54906003)(14454004)(33656002)(45080400002); DIR:OUT; SFP:1101; SCL:1; SRVR:DB3PR0502MB4089; H:DB3PR0502MB3964.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: BCL:0; x-microsoft-antispam-message-info: skgAo4wKGfeogPsRa1PMWJRC1qmmkTaCslxLAaSf+/IzOmmGz1154GlnRQUMboPkh2G6lz7sTVQtzqgB0VvKVzhvifw5xfE8T4Tn2iOAoln1YX1gQIto/9jafQwr6ryV8Pt1m7c6dq3KD9tiaLXsmZDO89qc5X4VWKGCIqV1giwYh0nFWHN+paoeZ79C8FO2vnTfZd6lZoHQ1twNsCVisG/zHluJNUwbKneLn31S/4Z7SyoDsQSy0ysAoGJz5ER9iU3N4NBtcYgwMBtbl3NlCDNuSBZK13bwf2Xz0XBOHjdgTKCeRAWvJrsFNKGPIzIOulaIdskV0/kzdpVzVeZXAzOdTaDsVoTRHjtVANFrTbvbZs85Eszv5TtqXZYLUtqsYlmHqPoYRvK2jU1fCbh8Lb3jow3ikQFISN7AnkaePN9Af9VEj+ZBD6ZaBIajWKiL 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: ec6a120c-d0ed-4aef-58f9-08d764571547 X-MS-Exchange-CrossTenant-originalarrivaltime: 08 Nov 2019 14:22:27.6605 (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: Vd19jxv9Cil24LguOPDsKjhVjJNsTYMmCWkH5igO7mfbz9gtx9Y5P2uyulCDs9NCB6t3IwfY8CxdgErRrZ9qWQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB3PR0502MB4089 Subject: Re: [dpdk-dev] [PATCH v2 00/19] net/mlx5: support meter 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, > -----Original Message----- > From: Suanming Mou > Sent: Friday, November 8, 2019 5:49 AM > To: Slava Ovsiienko ; Matan Azrad > > Cc: Ori Kam ; Raslan Darawsheh > ; dev@dpdk.org > Subject: [PATCH v2 00/19] net/mlx5: support meter >=20 > The patches introduce the meter action support for mlx5. > The design of the implementation was introduced in RFC as below: > https://eur03.safelinks.protection.outlook.com/?url=3Dhttp%3A%2F%2Finbox. > dpdk.org%2Fdev%2Fb994cd03-02f6-cd50-120f- > dcf0941e4485%40mellanox.com&data=3D02%7C01%7Crasland%40mellano > x.com%7C95ee54ab6dcb43f951bb08d763feab78%7Ca652971c7d2e4d9ba6a4d > 149256f461b%7C0%7C0%7C637087817814515342&sdata=3DXUrJiS50aeFhg > y8Wsm1JtGJcA1hQpINLVzTgUJxDDfk%3D&reserved=3D0 >=20 > The implementation is followed RFC to split flow with meter to three sub > flows. > Prefix flow -> Meter flow -> Suffix flow >=20 > The srTCM color blind mode is supported only, color aware mode and > multiple meter chaining are not supported. >=20 > The patch set add the operations to get the capabilities of the meter act= ion, > create/destroy the action, validate the action, attach/detach the action, > update the action, query the action statistics and flush the actions reso= urces. >=20 > Besides these, as the flow with meter action is split to three sub flows = for > coloring(in prefix flow), color checking(in meter flow), left actions app= lying (in > suffix flow), two registers are used for the color match and prefix-suffi= x flow > match. That's what the "allocate flow meter registers" patch does. >=20 > As with the three sub flows, two more flow tables are created for the met= er > flow and suffix flow in patch "prepare meter flow tables". As wrote in th= e > RFC, meter flow and suffix flow are separated since meter maybe shared > with multiple flows. >=20 > For the meter action statistics's query, the DevX flow counter is exposed= to > meter action in patch "expose flow counters management". >=20 > In the "split meter flow" patch, flow with meter is split to three sub fl= ow. The > *_DECAP and meter action will be in the prefix flow. > And an extra tag action with unique flow id to match with the suffix flow= is > also added to the prefix flow. The suffix flow will apply all the left ac= tions > while the flow id in tag item matches. >=20 > Since the metadata copy mark action is in the meter suffix flow, the REG_= C > for cpoy mark and prefix-suffix flow match is shared. > Once the meter suffix flow add the tag, metadata suffix sub flow won't ad= d > the tag anymore but share the tag is enough. It's done in the "share tag > between meter and metadata" patch. >=20 > --- > v2: rebased on top of the latest code with metadata feature >=20 > Suanming Mou (19): > net/mlx5: add meter operation callback > net/mlx5: fill meter capabilities using DevX > net/mlx5: allocate flow meter registers > net/mlx5: support meter profile operations > net/mlx5: validate meter profile > net/mlx5: prepare meter flow tables > net/mlx5: add policer rules operations > net/mlx5: support basic meter operations > net/mlx5: add meter action creation to the glue > net/mlx5: support meter modification operations > net/mlx5: support meter profile update > net/mlx5: expose flow counters management > net/mlx5: add count action to meter > net/mlx5: add meter statistics read and update > net/mlx5: add meter attach and detach > net/mlx5: support meter flow action > net/mlx5: split meter flow > net/mlx5: share tag between meter and metadata > net/mlx5: clean meter resources >=20 > drivers/net/mlx5/Makefile | 7 + > drivers/net/mlx5/meson.build | 3 + > drivers/net/mlx5/mlx5.c | 29 + > drivers/net/mlx5/mlx5.h | 46 ++ > drivers/net/mlx5/mlx5_devx_cmds.c | 23 + > drivers/net/mlx5/mlx5_flow.c | 632 ++++++++++++++++-- > drivers/net/mlx5/mlx5_flow.h | 153 ++++- > drivers/net/mlx5/mlx5_flow_dv.c | 612 +++++++++++++++++ > drivers/net/mlx5/mlx5_flow_meter.c | 1285 > ++++++++++++++++++++++++++++++++++++ > drivers/net/mlx5/mlx5_glue.c | 30 + > drivers/net/mlx5/mlx5_glue.h | 9 + > drivers/net/mlx5/mlx5_prm.h | 45 ++ > 12 files changed, 2812 insertions(+), 62 deletions(-) create mode 10064= 4 > drivers/net/mlx5/mlx5_flow_meter.c >=20 > -- > 1.8.3.1 Series applied to next-net-mlx, Kindest regards, Raslan Darawsheh