On 13/04/2021 01:14, Li Zhang wrote:
> 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.
> 
> Allow coloring the packet using a new rte_flow_action_color
> as could be done by the old policy API.
> 
> The next API function were added:
> - rte_mtr_meter_policy_create
> - rte_mtr_meter_policy_delete
> - rte_mtr_meter_policy_update
> - rte_mtr_meter_policy_validate
> The next struct was changed:
> - rte_mtr_params
> - rte_mtr_capabilities
> The next API was deleted:
> - rte_mtr_policer_actions_update
> 
> To support this API the following app were changed:
> app/test-flow-perf: clean meter policer
> app/testpmd: clean meter policer
> 
> To support this API the following drivers were changed:
> net/softnic: support meter policy API
> 1. cleans meter rte_mtr_policer_action.
> 2. Support policy API to get color action as policer action did.
>    The color action will be mapped into rte_table_action_policer.
> 
> net/mlx5: clean meter creation management
> Cleans and breaks part of the current meter management
> in order to allow better design with policy API.
> 
> Signed-off-by: Li Zhang <l...@nvidia.com>
> Signed-off-by: Haifei Luo <haif...@nvidia.com>
> Signed-off-by: Jiawei Wang <jiaw...@nvidia.com>
> Acked-by: Matan Azrad <ma...@nvidia.com>
> ---
>  app/test-flow-perf/main.c                     |   7 -
>  app/test-pmd/cmdline.c                        |   1 -
>  app/test-pmd/cmdline_mtr.c                    | 172 -------
>  app/test-pmd/cmdline_mtr.h                    |   1 -
>  doc/guides/prog_guide/rte_flow.rst            |  21 +
>  .../traffic_metering_and_policing.rst         |  16 +-
>  doc/guides/rel_notes/release_21_05.rst        |  22 +-
>  doc/guides/testpmd_app_ug/testpmd_funcs.rst   |  18 -
>  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 +-
>  .../net/softnic/rte_eth_softnic_internals.h   |  18 +-
>  drivers/net/softnic/rte_eth_softnic_meter.c   | 264 +++++++---
>  lib/librte_ethdev/rte_flow.h                  |  22 +
>  lib/librte_ethdev/rte_mtr.c                   |  55 ++-
>  lib/librte_ethdev/rte_mtr.h                   | 215 ++++++--
>  lib/librte_ethdev/rte_mtr_driver.h            |  44 +-
>  lib/librte_ethdev/version.map                 |   5 +-
>  22 files changed, 568 insertions(+), 1258 deletions(-)
> 


Acked-by: Ray Kinsella <m...@ashroe.eu>

Reply via email to