Skip to content

Support meter policy API

Jiawei Wang dpdk-dev 2 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v10 Latest2 patches 5 repliesIn review
  2. v92 patches 5 repliesSuperseded

Changes in v10 from the cover letter

* Rebase.

Patches in v10 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2ethdev: add pre-defined meter policy APIapp/test-flow-perf/main.c app/test-pmd/cmdline.c app/test-pmd/cmdline_mtr.c +19 more+610 -12563 replies
2/2app/testpmd: support policy actions per colorapp/test-pmd/cmdline.c app/test-pmd/cmdline_flow.c app/test-pmd/cmdline_mtr.c +4 more+269 -141 reply

Reviews trailers per patch

All 2 patches have a Reviewed-by or Acked-by.

PatchMatan AzradRay KinsellaOri KamJasvinder SinghCristian DumitrescuAjit Khaparde
1/2A-b A-b A-b A-b A-b A-b
2/2A-b A-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 6 reviewers.

Read the v10 thread

Cover letter [dpdk-dev] [PATCH v10 0/2] Support meter policy API

Currently, the flow meter policy does not support multiple actions per color; also the allowed action types per color are very limited. In addition, the policy cannot be pre-defined.

Due to the growing in flow actions offload abilities there is a potential for the user to use variety of actions per color differently. This new meter policy API comes to allow this potential in the most ethdev common way using rte_flow action definition.
A list of rte_flow actions will be provided by the user per color in order to create a meter policy.
In addition, the API forces to pre-define the policy before the meters creation in order to allow sharing of single policy with multiple meters efficiently.

meter_policy_id is added into struct rte_mtr_params. So that it can get the policy during the meters creation.

Add two common policy template as macros in the header file,

RFC ("ethdev: add pre-defined meter policy API")
https://patchwork.dpdk.org/project/dpdk/patch/[email protected]/

Depends-on: series=16520 ("Add ASO meter support in MLX5 PMD ")
https://patchwork.dpdk.org/project/dpdk/list/?series=16520

v10:
* Rebase.

v9:
* Rebase.
* Fix the comments for softnic driver.

v8:
* Fix rebase conflict issues and CI warning.

v7:
* Fix comments and place two common policy template as macros.

v6:
* Delete policy example.

v5:
* Fix comments about rte_mtr_meter_policy_add.

v4:
* Fix comments about Depends-on.

v3:
* Fix coding style issues.

v2:
* Delete default policy and change relation doc files.

Haifei Luo (1):
app/testpmd: support policy actions per color

Li Zhang (1):
ethdev: add pre-defined meter policy API

 app/test-flow-perf/main.c                          |   7 -
 app/test-pmd/cmdline.c                             |  14 +-
 app/test-pmd/cmdline_flow.c                        | 118 +++++-
 app/test-pmd/cmdline_mtr.c                         | 257 ++++--------
 app/test-pmd/cmdline_mtr.h                         |   4 +-
 app/test-pmd/config.c                              |  32 ++
 app/test-pmd/testpmd.h                             |   2 +
 doc/guides/prog_guide/rte_flow.rst                 |  21 +
 .../prog_guide/traffic_metering_and_policing.rst   |  16 +-
 doc/guides/rel_notes/release_21_05.rst             |  21 +
 doc/guides/testpmd_app_ug/testpmd_funcs.rst        |  48 ++-
 drivers/net/mlx5/mlx5.h                            |  24 +-
 drivers/net/mlx5/mlx5_flow.c                       |  46 --
 drivers/net/mlx5/mlx5_flow.h                       |  18 +-
 drivers/net/mlx5/mlx5_flow_aso.c                   |   8 +-
 drivers/net/mlx5/mlx5_flow_dv.c                    | 461 +--------------------
 drivers/net/mlx5/mlx5_flow_meter.c                 | 369 +----------------
 drivers/net/softnic/rte_eth_softnic_flow.c         |  19 +-
 drivers/net/softnic/rte_eth_softnic_internals.h    |  18 +-
 drivers/net/softnic/rte_eth_softnic_meter.c        | 297 ++++++++++---
 lib/librte_ethdev/rte_flow.h                       |  22 +
 lib/librte_ethdev/rte_mtr.c                        |  55 ++-
 lib/librte_ethdev/rte_mtr.h                        | 223 +++++++---
 lib/librte_ethdev/rte_mtr_driver.h                 |  44 +-
 lib/librte_ethdev/version.map                      |   5 +-
 25 files changed, 879 insertions(+), 1270 deletions(-)
Signature · 1 line
1.8.3.1