mbox series

[v3,0/4] net/mlx5: support meter policy operations

Message ID 20210413001954.2000292-1-lizh@nvidia.com (mailing list archive)
Headers show
Series net/mlx5: support meter policy operations | expand

Message

Li Zhang April 13, 2021, 12:19 a.m. UTC
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=16300  ("Add ASO meter support in MLX5 PMD ")
https://patchwork.dpdk.org/project/dpdk/list/?series=16300

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

V2: Add MLX5_MTR_DEFAULT_POLICY_ID in MLX5 PMD
V3: Fix comments.

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 +
 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    | 1896 ++++++++++++++++++++++++++--
 drivers/net/mlx5/mlx5_flow_meter.c |  728 ++++++++++-
 drivers/net/mlx5/mlx5_trigger.c    |    1 +
 10 files changed, 3365 insertions(+), 357 deletions(-)