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 8BD23A04AB; Fri, 8 Nov 2019 07:20:12 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 3A5F61BE80; Fri, 8 Nov 2019 07:20:12 +0100 (CET) Received: from EUR04-DB3-obe.outbound.protection.outlook.com (mail-eopbgr60060.outbound.protection.outlook.com [40.107.6.60]) by dpdk.org (Postfix) with ESMTP id BE1532142 for ; Fri, 8 Nov 2019 07:20:10 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=IZmJSgJqZIJRKLcUZphTIfk2jPDOJnouzneiu5BFcFTCaSCT0nVu4BflbJDj6+FlRTW5LaSw30xHmnYoirXe9MsSlOxUntvVP/WnLHlS9+THR7ZNGeOv42XrnEykZrD2K3HW6PstYjchIRMXXY9StrmqrK6W4NcmLgZ1ZS9uAbQoDtAu8O9aqJBm7g/G3AT+cRFCusRBkGGpLFQS1lHsIl+6RA11HYfPZbI8mTENJ1YEICWDrjBtjIfn6Vhtw1w/OdWrdAcVHK+NWKfgM4HWJn59eubRsgN1s91LioxK03fA0NEyKAXrW/W/l1EJ7oz3DHjfIsCI9aH3hKfISnnoYQ== 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=Pl8uEPMk4jg0NQJbXeedT9jVT/kYCm/32PMkzBCfX6I=; b=FR39N2559baXuaa6fz5b5WG996BweFfYfzLHZL8Mgw7svYiooatIM19p2jNC/gz79orudHgOD4sw4RsBzjXKme7/OWkT35YsVNdU//JkioD9rLRwnwWkrE6FWxb3OnyN6MA/xscrmWhPJ1z7vs3IrFAKH5TYYSHd7K0V7vFUIlCeuV0n3I3uyJ522UWQWM5d6eERYqwIJWF0YG1Hs/pt9e1yG2dbt+MIQtIV7NXJKyDunxjJbqTq9PlrsaaIOJkJM5aDHeVKLuKca0Hrp615ATFtmFi7Ef8IaZdwDoZvudvhgOOOhL9i/mAd6jUKHTS5JA6NHVkwWTkkWPx0NDqzZQ== 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=Pl8uEPMk4jg0NQJbXeedT9jVT/kYCm/32PMkzBCfX6I=; b=qYdgz8qN3WA0BORNOtOTja4sl07AI2a1O5ExrWqP8Oin7fuJFvJYr+dqh7PWz439IREbVGXj6Phqpz5iTEuSS0rd1sNsyPqjdh3Wp38pRpw9K7pNgVlNFkvWukJWQ4056me0kvZxMAQFlllWnC1R033s5wMZRIA1THlnejvR01A= Received: from AM0PR0502MB4019.eurprd05.prod.outlook.com (52.133.39.139) by AM0PR0502MB3859.eurprd05.prod.outlook.com (52.133.45.17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2430.20; Fri, 8 Nov 2019 06:20:03 +0000 Received: from AM0PR0502MB4019.eurprd05.prod.outlook.com ([fe80::fd7a:e5a8:deec:c1b0]) by AM0PR0502MB4019.eurprd05.prod.outlook.com ([fe80::fd7a:e5a8:deec:c1b0%7]) with mapi id 15.20.2430.023; Fri, 8 Nov 2019 06:20:04 +0000 From: Matan Azrad To: Suanming Mou , Slava Ovsiienko CC: Ori Kam , Raslan Darawsheh , "dev@dpdk.org" Thread-Topic: [PATCH v2 00/19] net/mlx5: support meter Thread-Index: AQHVleeNrUDgIS7ZU02AMekdtuPuV6eAzSBQ Date: Fri, 8 Nov 2019 06:20:03 +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, he-IL Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: spf=none (sender IP is ) smtp.mailfrom=matan@mellanox.com; x-originating-ip: [77.127.71.76] x-ms-publictraffictype: Email x-ms-office365-filtering-ht: Tenant x-ms-office365-filtering-correlation-id: 6b637d03-17d2-4b9a-1747-08d76413b16d x-ms-traffictypediagnostic: AM0PR0502MB3859:|AM0PR0502MB3859: x-ms-exchange-purlcount: 1 x-ld-processed: a652971c-7d2e-4d9b-a6a4-d149256f461b,ExtFwd x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:6790; x-forefront-prvs: 0215D7173F x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(4636009)(346002)(136003)(376002)(366004)(39860400002)(396003)(199004)(189003)(14454004)(66476007)(55016002)(26005)(476003)(6636002)(11346002)(52536014)(186003)(9686003)(8936002)(71190400001)(6306002)(25786009)(76176011)(6506007)(7696005)(71200400001)(4326008)(446003)(6246003)(5660300002)(102836004)(8676002)(81156014)(86362001)(81166006)(486006)(66446008)(110136005)(229853002)(66556008)(256004)(66946007)(14444005)(6436002)(316002)(7736002)(2906002)(99286004)(305945005)(66066001)(3846002)(33656002)(478600001)(54906003)(64756008)(74316002)(6116002)(45080400002)(966005)(76116006)(5024004); DIR:OUT; SFP:1101; SCL:1; SRVR:AM0PR0502MB3859; H:AM0PR0502MB4019.eurprd05.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX: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: cuyZ/Xe5mmFrdPBESW2Xw6vtmf4hcDS5RlwTVRlW1bMif++3NYER53qCIR3kZ98sCPMMgP0eZc1G+SphxfGNECaQzJAOcBze8ivRvbQLRAPiYyl6LyyWM554r8ro6e8+80h7KWPOnHfVEM0t1wZEPZrrl6XdVEmjrxmXRfBaLZ8yyuQpbVLEqWAAbypcWiGBgvT/cmGHszhOy88HhEMW25+Iw0SwCbzwQLL6bXyyH5xcH3DwSU/HmkTtQ7ktpuEpw+blywIR3Y1D9a7DMrIZvoFlmTYnQZ/EqyveK1Y0FuaK50VWVefDq2KR0Xfh3r3d4x4k+cov9UtrdlkNnGazDh4knqmW032U1661uf8a2q9qv8yK3Nfo6M6MAP4gBecSpsvlWGltUVidqItOc+5xV7OhYyyXmDFxF8NDl2iQO+Dpl4Rco6drbUFYP7rHGUGY 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: 6b637d03-17d2-4b9a-1747-08d76413b16d X-MS-Exchange-CrossTenant-originalarrivaltime: 08 Nov 2019 06:20:03.8608 (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: CHiyc7gmGOre9g1ea/B2qPh8EInVrLVAWJgSz9/wJv8zjAeUKlg8D9kgSJt9X33PytIA3HaDgNeL2vojnYXuag== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM0PR0502MB3859 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" From: Suanming Mou > 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%7Cmatan%40mellanox > .com%7C95ee54ab6dcb43f951bb08d763feab78%7Ca652971c7d2e4d9ba6a4d1 > 49256f461b%7C0%7C0%7C637087817814455376&sdata=3DBTjZsNhFxfWvF > Aw%2F4UHVpBi2GIWGf0LCmRhzFibAUXU%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 For all the series: Acked-by: Matan Azrad > 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