[dpdk-dev] [PATCH v2 00/19] net/mlx5: support meter

Raslan Darawsheh rasland at mellanox.com
Fri Nov 8 15:22:27 CET 2019


Hi,

> -----Original Message-----
> From: Suanming Mou <suanmingm at mellanox.com>
> Sent: Friday, November 8, 2019 5:49 AM
> To: Slava Ovsiienko <viacheslavo at mellanox.com>; Matan Azrad
> <matan at mellanox.com>
> Cc: Ori Kam <orika at mellanox.com>; Raslan Darawsheh
> <rasland at mellanox.com>; dev at dpdk.org
> Subject: [PATCH v2 00/19] net/mlx5: support meter
> 
> 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=http%3A%2F%2Finbox.
> dpdk.org%2Fdev%2Fb994cd03-02f6-cd50-120f-
> dcf0941e4485%40mellanox.com&data=02%7C01%7Crasland%40mellano
> x.com%7C95ee54ab6dcb43f951bb08d763feab78%7Ca652971c7d2e4d9ba6a4d
> 149256f461b%7C0%7C0%7C637087817814515342&sdata=XUrJiS50aeFhg
> y8Wsm1JtGJcA1hQpINLVzTgUJxDDfk%3D&reserved=0
> 
> 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.
> 
> ---
> v2: rebased on top of the latest code with metadata feature
> 
> 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       |  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 100644
> drivers/net/mlx5/mlx5_flow_meter.c
> 
> --
> 1.8.3.1


Series applied to next-net-mlx,

Kindest regards,
Raslan Darawsheh


More information about the dev mailing list