[00/19] net/mlx5: support meter
Message ID | 1573053090-179521-1-git-send-email-suanmingm@mellanox.com (mailing list archive) |
---|---|
Headers |
Return-Path: <dev-bounces@dpdk.org> X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 9825AA04AB; Wed, 6 Nov 2019 16:11:49 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 0BF1F1C0B4; Wed, 6 Nov 2019 16:11:49 +0100 (CET) Received: from git-send-mailer.rdmz.labs.mlnx (unknown [37.142.13.130]) by dpdk.org (Postfix) with ESMTP id F3A7A1C0B2 for <dev@dpdk.org>; Wed, 6 Nov 2019 16:11:47 +0100 (CET) From: Suanming Mou <suanmingm@mellanox.com> To: Cc: dev@dpdk.org Date: Wed, 6 Nov 2019 17:11:09 +0200 Message-Id: <1573053090-179521-1-git-send-email-suanmingm@mellanox.com> X-Mailer: git-send-email 1.8.3.1 Subject: [dpdk-dev] [PATCH 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 <dev.dpdk.org> List-Unsubscribe: <https://mails.dpdk.org/options/dev>, <mailto:dev-request@dpdk.org?subject=unsubscribe> List-Archive: <http://mails.dpdk.org/archives/dev/> List-Post: <mailto:dev@dpdk.org> List-Help: <mailto:dev-request@dpdk.org?subject=help> List-Subscribe: <https://mails.dpdk.org/listinfo/dev>, <mailto:dev-request@dpdk.org?subject=subscribe> Errors-To: dev-bounces@dpdk.org Sender: "dev" <dev-bounces@dpdk.org> |
Message
Suanming Mou
Nov. 6, 2019, 3:11 p.m. UTC
The patches introduce the meter action support for mlx5. The design of the implementation was introduced in RFC as below: http://inbox.dpdk.org/dev/b994cd03-02f6-cd50-120f-dcf0941e4485@mellanox.com The implementation is followed RFC to split flow with meter to three sub flows. Prefix flow -> Meter flow -> Suffix flow The srTCM color blind mode is supported only, color aware mode and multiple meter chaining are not supported. The patch set add the operations to get the capabilities of the meter action, create/destroy the action, validate the action, attach/detach the action, update the action, query the action statistics and flush the actions resources. 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 applying (in suffix flow), two registers are used for the color match and prefix-suffix flow match. That's what the "allocate flow meter registers" patch does. As with the three sub flows, two more flow tables are created for the meter flow and suffix flow in patch "prepare meter flow tables". As wrote in the RFC, meter flow and suffix flow are separated since meter maybe shared with multiple flows. For the meter action statistics's query, the DevX flow counter is exposed to meter action in patch "expose flow counters management". In the "split meter flow" patch, flow with meter is split to three sub flow. 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 actions while the flow id in tag item matches. 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 add the tag anymore but share the tag is enough. It's done in the "share tag between meter and metadata" patch. The meter patch set should be applied after the extensive metadata feature: https://patches.dpdk.org/project/dpdk/list/?series=7242 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 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 | 617 +++++++++++++++-- drivers/net/mlx5/mlx5_flow.h | 153 ++++- drivers/net/mlx5/mlx5_flow_dv.c | 612 +++++++++++++++++ drivers/net/mlx5/mlx5_flow_meter.c | 1283 ++++++++++++++++++++++++++++++++++++ drivers/net/mlx5/mlx5_glue.c | 30 + drivers/net/mlx5/mlx5_glue.h | 9 + drivers/net/mlx5/mlx5_prm.h | 45 ++ 12 files changed, 2804 insertions(+), 53 deletions(-) create mode 100644 drivers/net/mlx5/mlx5_flow_meter.c