49863ae2 | 13-Oct-2021 |
Ivan Malov <ivan.malov@oktetlabs.ru> |
ethdev: add represented port item to flow API
For use in "transfer" flows. Supposed to match traffic entering the embedded switch from the entity represented by the given ethdev. Such an entity can
ethdev: add represented port item to flow API
For use in "transfer" flows. Supposed to match traffic entering the embedded switch from the entity represented by the given ethdev. Such an entity can be a network (via a network port), a guest machine (via a VF) or another ethdev in the same application.
Must not be combined with direction attributes.
Signed-off-by: Ivan Malov <ivan.malov@oktetlabs.ru> Acked-by: Ori Kam <orika@nvidia.com> Acked-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
show more ...
|
f4367c0b | 21-Apr-2021 |
Huisong Li <lihuisong@huawei.com> |
app/testpmd: show link flow control info
This patch supports the query of the link flow control parameter on a port.
The command format is as follows: show port <port_id> flow_ctrl
Signed-off-by:
app/testpmd: show link flow control info
This patch supports the query of the link flow control parameter on a port.
The command format is as follows: show port <port_id> flow_ctrl
Signed-off-by: Huisong Li <lihuisong@huawei.com> Signed-off-by: Min Hu (Connor) <humin29@huawei.com> Acked-by: Xiaoyun Li <xiaoyun.li@intel.com> Acked-by: Kevin Traynor <ktraynor@redhat.com>
show more ...
|
5f0d54f3 | 20-Apr-2021 |
Li Zhang <lizh@nvidia.com> |
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 poli
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>
show more ...
|
4b61b877 | 19-Apr-2021 |
Bing Zhao <bingz@nvidia.com> |
ethdev: introduce indirect flow action
Right now, rte_flow_shared_action_* APIs are used for some shared actions, like RSS, count. The shared action should be created before using it inside a flow.
ethdev: introduce indirect flow action
Right now, rte_flow_shared_action_* APIs are used for some shared actions, like RSS, count. The shared action should be created before using it inside a flow. These shared actions sometimes are not really shared but just some indirect actions decoupled from a flow.
The new functions rte_flow_action_handle_* are added to replace the current shared functions rte_flow_shared_action_*.
There are two types of flow actions: 1. the direct (normal) actions that could be created and stored within a flow rule. Such action is tied to its flow rule and cannot be reused. 2. the indirect action, in the past, named shared_action. It is created from a direct actioni, like count or rss, and then used in the flow rules with an object handle. The PMD will take care of the retrieve from indirect action to the direct action when it is referenced.
The indirect action is accessed (update / query) w/o any flow rule, just via the action object handle. For example, when querying or resetting a counter, it could be done out of any flow using this counter, but only the handle of the counter action object is required. The indirect action object could be shared by different flows or used by a single flow, depending on the direct action type and the real-life requirements. The handle of an indirect action object is opaque and defined in each driver and possibly different per direct action type.
The old name "shared" is improper in a sense and should be replaced.
Since the APIs are changed from "rte_flow_shared_action*" to the new "rte_flow_action_handle*", the testpmd application code and command line interfaces also need to be updated to do the adaption. The testpmd application user guide is also updated. All the "shared action" related parts are replaced with "indirect action" to have a correct explanation.
The parameter of "update" interface is also changed. A general pointer will replace the rte_flow_action struct pointer due to the facts: 1. Some action may not support fields updating. In the example of a counter, the only "update" supported should be the reset. So passing a rte_flow_action struct pointer is meaningless and there is even no such corresponding action struct. What's more, if more than one operations should be supported, for some other action, such pointer parameter may not meet the need. 2. Some action may need conditional or partial update, the current parameter will not provide the ability to indicate which part(s) to update. For different types of indirect action objects, the pointer could either be the same of rte_flow_action* struct - in order not to break the current driver implementation, or some wrapper structures with bits as masks to indicate which part to be updated, depending on real needs of the corresponding direct action. For different direct actions, the structures of indirect action objects updating will be different.
All the underlayer PMD callbacks will be moved to these new APIs.
The RTE_FLOW_ACTION_TYPE_SHARED is kept for now in order not to break the ABI. All the implementations are changed by using RTE_FLOW_ACTION_TYPE_INDIRECT.
Since the APIs are changed from "rte_flow_shared_action*" to the new "rte_flow_action_handle*" and the "update" interface's 3rd input parameter is changed to generic pointer, the mlx5 PMD that uses these APIs needs to do the adaption to the new APIs as well.
Signed-off-by: Bing Zhao <bingz@nvidia.com> Acked-by: Andrey Vesnovaty <andreyv@nvidia.com> Acked-by: Ori Kam <orika@nvidia.com> Acked-by: Ajit Khaparde <ajit.khaparde@broadcom.com> Acked-by: Thomas Monjalon <thomas@monjalon.net>
show more ...
|
7d96f571 | 23-Mar-2021 |
Raslan Darawsheh <rasland@nvidia.com> |
ethdev: update flow item GTP QFI definition
'qfi' field is 8 bits which represent single bit for PPP (paging Policy Presence) single bit for RQI (Reflective QoS Indicator) and 6 bits for QFI (QoS Fl
ethdev: update flow item GTP QFI definition
'qfi' field is 8 bits which represent single bit for PPP (paging Policy Presence) single bit for RQI (Reflective QoS Indicator) and 6 bits for QFI (QoS Flow Identifier) This is based on RFC 38415-g30 https://www.3gpp.org/ftp/Specs/archive/38_series/38.415/38415-g30.zip
Updated the doxygen comment and the mask for 'qfi' to properly identify the full 8 bits of the field.
note: changing the default mask would cause different patterns generated by testpmd.
Fixes: 346553db5bd1 ("ethdev: add GTP extension header to flow API") Cc: stable@dpdk.org
Signed-off-by: Raslan Darawsheh <rasland@nvidia.com> Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
show more ...
|
3b622711 | 07-Apr-2021 |
Salem Sol <salems@nvidia.com> |
app/testpmd: support NVGRE encap as sample action
Add support for rte_flow_action_nvge_encap as a sample action.
The example of test-pmd command:
1. set nvgre ip-version ... tni ... ip-src ... ip
app/testpmd: support NVGRE encap as sample action
Add support for rte_flow_action_nvge_encap as a sample action.
The example of test-pmd command:
1. set nvgre ip-version ... tni ... ip-src ... ip-dst ... set raw_encap 1 eth src... / ipv4... /... set sample_actions 2 nvgre / port_id id 0 / end flow create 0 ... pattern eth / end actions sample ratio 1 index 2 / raw_encap index 1 / port_id id 0...
The flow will result in all the matched egress packets will be encapsulated and sent to wire, and also mirrored the packets using NVGRE encapsulation data and sent to wire.
Signed-off-by: Salem Sol <salems@nvidia.com> Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
show more ...
|