numam-dpdk/drivers/net/softnic
Li Zhang 5f0d54f372 ethdev: add pre-defined 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.

Allow coloring the packet using a new rte_flow_action_color
as could be done by the old policy API.

Add two common policy template as macros in the head file.

The next API function were added:
- rte_mtr_meter_policy_add
- 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. Supports 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 <lizh@nvidia.com>
Signed-off-by: Haifei Luo <haifeil@nvidia.com>
Signed-off-by: Jiawei Wang <jiaweiw@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
Acked-by: Ray Kinsella <mdr@ashroe.eu>
Acked-by: Ori Kam <orika@nvidia.com>
Acked-by: Jasvinder Singh <jasvinder.singh@intel.com>
Acked-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
Acked-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
2021-04-21 12:22:17 +02:00
..
conn.c mk: build with _GNU_SOURCE defined by default 2018-10-22 11:28:27 +02:00
conn.h net/softnic: add connection agent 2018-07-12 13:52:37 +02:00
firmware.cli net/softnic: add firmware script 2018-07-12 13:55:42 +02:00
meson.build drivers: change indentation in build files 2021-04-21 14:04:09 +02:00
parser.c net/softnic: use POSIX network address conversion 2020-10-23 11:01:25 +02:00
parser.h net: add rte prefix to ether structures 2019-05-24 13:34:45 +02:00
rte_eth_softnic_action.c net/softnic: add symmetric crypto action 2018-10-26 14:13:45 +02:00
rte_eth_softnic_cli.c replace packed attributes 2020-04-16 18:16:46 +02:00
rte_eth_softnic_cryptodev.c net/softnic: use separate session mempools 2019-01-10 16:57:22 +01:00
rte_eth_softnic_flow.c ethdev: add pre-defined meter policy API 2021-04-21 12:22:17 +02:00
rte_eth_softnic_internals.h ethdev: add pre-defined meter policy API 2021-04-21 12:22:17 +02:00
rte_eth_softnic_link.c net/softnic: check status of getting ethdev info 2019-10-07 14:45:35 +02:00
rte_eth_softnic_mempool.c net/softnic: add mempool object 2018-07-12 13:49:44 +02:00
rte_eth_softnic_meter.c ethdev: add pre-defined meter policy API 2021-04-21 12:22:17 +02:00
rte_eth_softnic_pipeline.c net: add rte prefix to TCP structure 2019-05-24 13:34:46 +02:00
rte_eth_softnic_swq.c net/softnic: fix memory illegal access after free 2018-07-23 23:55:26 +02:00
rte_eth_softnic_tap.c replace snprintf with strlcpy without adding extra include 2019-04-04 22:45:54 +02:00
rte_eth_softnic_thread.c eal: rename lcore master and slave 2020-10-20 13:17:08 +02:00
rte_eth_softnic_tm.c net/softnic: fix out-of-bound access 2020-11-03 23:24:24 +01:00
rte_eth_softnic.c ethdev: replace callback getting filter operations 2021-03-26 18:37:13 +01:00
rte_eth_softnic.h enforce experimental tag at beginning of declarations 2019-06-29 19:04:48 +02:00
version.map build: remove library name from version map file name 2020-10-19 22:13:59 +02:00