Skip to content

net/mlx5: support meter policy operations

Li Zhang dpdk-dev 8 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v8 Latest4 patches 1 replyIn review
  2. v74 patches 1 replySuperseded
  3. v64 patches 0 repliesSuperseded
Earlier versions · 5
VersionPostedPatchesRepliesStatus
v54 patches0 repliesSuperseded
v44 patches0 repliesSuperseded
v34 patches0 repliesSuperseded
v24 patches0 repliesSuperseded
v14 patches0 repliesSuperseded

Changes in v8 from the cover letter

* Fix comments about release-note

Patches in v8 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/4net/mlx5: support meter policy operationsdrivers/net/mlx5/linux/mlx5_os.c drivers/net/mlx5/mlx5.c drivers/net/mlx5/mlx5.h +6 more+2242 -1280 replies
2/4net/mlx5: support meter creation with policydrivers/net/mlx5/linux/mlx5_os.c drivers/net/mlx5/mlx5.h drivers/net/mlx5/mlx5_flow.c +3 more+621 -2440 replies
3/4net/mlx5: prepare sub-policy for a flow with meterdrivers/net/mlx5/mlx5_flow.h drivers/net/mlx5/mlx5_flow_dv.c+155 -00 replies
4/4net/mlx5: connect meter policy to created flowsdoc/guides/nics/mlx5.rst doc/guides/rel_notes/release_21_05.rst drivers/net/mlx5/mlx5_flow.c +2 more+421 -570 replies

Reviews trailers per patch

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

PatchMatan Azrad
1/4A-b
2/4A-b
3/4A-b
4/4A-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v8 thread

Cover letter [dpdk-dev] [PATCH v8 0/4] net/mlx5: support meter policy operations

MLX5 PMD checks the validation of actions in policy while add a new meter policy, if pass the validation, allocates the new policy object from the meter policy indexed memory pool.

It is common to use the same policy for multiple meters. MLX5 PMD supports two types of policy: termination policy and no-termination policy.

The termination policy must have a fate action as in the policy actions, it can support QUEUE, RSS, PORT_ID, DROP, JUMP, MARK and SET_TAG actions if policy color is GREEN, also supports DROP action if policy color is RED.

The no-termination policy uses policy ID 0 as default policy, it is created internal and cannot be changed by API. The default policy red action is drop, green action is jump to suffix table. Create this policy by policy API with green/yellow no action, red with drop action.
One example in testpmd command:
add port meter policy 0 g_actions end y_actions end r_actions drop / end

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

Depends-on: series=16524 ("Support meter policy API ")
https://patchwork.dpdk.org/project/dpdk/list/?series=16524

V8:
* Fix comments about release-note
v7:
* Rebase.
V6:
* Fix comments about Depends-on.
V5:
* Fix comments about destory meter on different ports. V4:
* Fix comments about rte_mtr_meter_policy_add. V3:
* Fix comments about Depends-on.
V2:
* Add MLX5_MTR_DEFAULT_POLICY_ID in MLX5 PMD.

Li Zhang (3):
net/mlx5: support meter policy operations net/mlx5: support meter creation with policy net/mlx5: prepare sub-policy for a flow with meter

Shun Hao (1):
net/mlx5: connect meter policy to created flows

 doc/guides/nics/mlx5.rst               |   12 +
 doc/guides/rel_notes/release_21_05.rst |    1 +
 drivers/net/mlx5/linux/mlx5_os.c       |   13 +-
 drivers/net/mlx5/mlx5.c                |   77 +-
 drivers/net/mlx5/mlx5.h                |  212 ++-
 drivers/net/mlx5/mlx5_flow.c           |  654 +++++++-
 drivers/net/mlx5/mlx5_flow.h           |  119 +-
 drivers/net/mlx5/mlx5_flow_aso.c       |   10 +-
 drivers/net/mlx5/mlx5_flow_dv.c        | 1895 ++++++++++++++++++++++--
 drivers/net/mlx5/mlx5_flow_meter.c     |  742 +++++++++-
 drivers/net/mlx5/mlx5_trigger.c        |    1 +
 11 files changed, 3373 insertions(+), 363 deletions(-)
Signature · 1 line
2.27.0