| 2b679150 | 24-Feb-2022 |
Suanming Mou <[email protected]> |
net/mlx5: introduce hardware steering operation
The Connect-X steering is a lookup hardware mechanism that accesses flow tables, matches packets to the rules, and performs specified actions. Histori
net/mlx5: introduce hardware steering operation
The Connect-X steering is a lookup hardware mechanism that accesses flow tables, matches packets to the rules, and performs specified actions. Historically, mlx5 PMD implements several software engines to manage steering hardware facility:
- FW Steering - Verbs/Direct Verbs, uses FW calls to manage flows - SW Steering - DevX/mlx5dv, uses WQEs to access table memory directly
However, there are still some disadvantages:
- performance is limited, we should invoke firmware either to manage the entire flow, or to handle some internal steering objects
- organizing and preparing flow infrastructure (actions, matchers, groups, etc.) on the flow inserting is sure to cause slow flow insertion
- security, exposing the low-level steering entries directly to the userspace may cause security risks
A new hardware WQE based steering operation with codename "HW Steering" is going to be introduced to get rid of the security risks. And it will take advantage of the recently new introduced async queue-based rte_flow APIs to prepare everything in advance to achieve high insertion rate.
In this new HW steering engine, the original SW steering rte_flow API will not be supported in the first implementation, only the new async queue-based flow operations is going to be supported. A new steering mode parameter for dv_flow_en will be introduced and user will be able to engage the new steering engine.
This commit adds the basic driver operation.
Signed-off-by: Suanming Mou <[email protected]> Acked-by: Viacheslav Ovsiienko <[email protected]>
show more ...
|
| a13ec19c | 14-Feb-2022 |
Michael Baum <[email protected]> |
net/mlx5: add shared device context config structure
Add configuration structure for shared device context. This structure contains all configurations coming from devargs which oriented to device. I
net/mlx5: add shared device context config structure
Add configuration structure for shared device context. This structure contains all configurations coming from devargs which oriented to device. It is a field of shared device context (SH) structure, and is updated once in mlx5_alloc_shared_dev_ctx() function. This structure cannot be changed when probing again, so add function to prevent it. The mlx5_probe_again_args_validate() function creates a temporary IB context configure structure according to new devargs attached in probing again, then checks the match between the temporary structure and the existing IB context configure structure.
Signed-off-by: Michael Baum <[email protected]> Acked-by: Matan Azrad <[email protected]>
show more ...
|
| cf8971db | 14-Feb-2022 |
Michael Baum <[email protected]> |
net/mlx5: share counter config function
The mlx5_flow_counter_mode_config function exists for both Linux and Windows with the same name and content. This patch moves its implementation to the folder
net/mlx5: share counter config function
The mlx5_flow_counter_mode_config function exists for both Linux and Windows with the same name and content. This patch moves its implementation to the folder shared between the operating systems, removing the duplication.
Signed-off-by: Michael Baum <[email protected]> Acked-by: Matan Azrad <[email protected]>
show more ...
|
| e3032e9c | 14-Feb-2022 |
Michael Baum <[email protected]> |
net/mlx5: share realtime timestamp configure
The realtime timestamp configure work for Linux as same as Windows. This patch removes it to the function implemented in the folder shared between the op
net/mlx5: share realtime timestamp configure
The realtime timestamp configure work for Linux as same as Windows. This patch removes it to the function implemented in the folder shared between the operating systems, removing the duplication.
Signed-off-by: Michael Baum <[email protected]> Acked-by: Matan Azrad <[email protected]>
show more ...
|
| 8f464810 | 14-Feb-2022 |
Michael Baum <[email protected]> |
net/mlx5: remove Verbs query device duplication
The sharing device context structure has a field named "device_attr" which is filled by mlx5_os_get_dev_attr() function. The spawn function calls mlx5
net/mlx5: remove Verbs query device duplication
The sharing device context structure has a field named "device_attr" which is filled by mlx5_os_get_dev_attr() function. The spawn function calls mlx5_os_get_dev_attr() again and save it to local variable identical to "device_attr" field.
There is no need for this duplication, because there is a reference to the sharing device context structure from spawn function.
This patch removes the local "device_attr" from spawn function, and uses the context's field instead.
Signed-off-by: Michael Baum <[email protected]> Acked-by: Matan Azrad <[email protected]>
show more ...
|
| cfe0639b | 14-Feb-2022 |
Michael Baum <[email protected]> |
net/mlx5: remove redundant check of devargs
The device arguments are parsed and updated twice during spawning. First time before creating the share device context, and again later after updating a d
net/mlx5: remove redundant check of devargs
The device arguments are parsed and updated twice during spawning. First time before creating the share device context, and again later after updating a default value to one of the arguments.
This patch consolidates them into one parsing and updates the default values before it.
Signed-off-by: Michael Baum <[email protected]> Acked-by: Matan Azrad <[email protected]>
show more ...
|
| 6be4c57a | 14-Feb-2022 |
Michael Baum <[email protected]> |
net/mlx5: fix errno update in shared context creation
The mlx5_alloc_shared_dev_ctx() function has a local variable named "err" which contains the errno value in case of failure.
When functions cal
net/mlx5: fix errno update in shared context creation
The mlx5_alloc_shared_dev_ctx() function has a local variable named "err" which contains the errno value in case of failure.
When functions called by this function are failed, this variable is updated with their return value (that should be a positive errno value). However, some functions doesn't update errno value by themselves or return negative errno value. If one of them fails, the "err" variable contains negative value what cause to assertion failure.
This patch updates all functions uses by mlx5_alloc_shared_dev_ctx() function to update rte_errno and take this value instead of "err" value.
Fixes: 5dfa003db53f ("common/mlx5: fix post doorbell barrier") Fixes: 5d55a494f4e6 ("net/mlx5: split multi-thread flow handling per OS") Cc: [email protected]
Signed-off-by: Michael Baum <[email protected]> Acked-by: Matan Azrad <[email protected]>
show more ...
|