[RFC 3/3] net/mlx5: add external Rx queue

2022-01-01 Thread michaelba
From: Michael Baum Add API to map and unmap HW queue id to rte_flow queue id. Signed-off-by: Michael Baum --- drivers/net/mlx5/mlx5_rx.h | 6 + drivers/net/mlx5/rte_pmd_mlx5.h | 45 + 2 files changed, 51 insertions(+) diff --git a/drivers/net/mlx5/mlx

[RFC 2/3] common/mlx5: add shared PD support

2022-01-01 Thread michaelba
From: Michael Baum Add option to probe common device using import CTX/PD functions instead of create functions. This option requires accepting the context FD and the PD handle as devargs. Signed-off-by: Michael Baum --- drivers/common/mlx5/linux/mlx5_common_os.c | 160 +-- dr

[RFC 1/3] common/mlx5: glue device and PD importation

2022-01-01 Thread michaelba
From: Michael Baum Add support for rdma-core API to import device. The API gets ibv_context file descriptor and returns an ibv_context pointer that is associated with the given file descriptor. Add also support for rdma-core API to import PD. The API gets ibv_context and PD handle and returns a p

[RFC 0/3] net/mlx5: add external RxQ support

2022-01-01 Thread michaelba
From: Michael Baum These patches add support to external Rx queues. External queue is a queue that is managed by a process external to DPDK, but uses DPDK process to generate its flow rules. For the hardware to allow the DPDK process to set rules for it, the process needs to use the same PD of t

[RFC 3/3] common/mlx5: refactore devargs management

2022-01-01 Thread michaelba
From: Michael Baum Improve the devargs handling in the following aspects: - Parse the devargs string only once. - Return error and report for unknown keys. - Return error for changing common devargs in probe again. Signed-off-by: Michael Baum --- drivers/common/mlx5/mlx5_common.c | 313 +++

[RFC 1/3] net/mlx5: remove some duplications

2022-01-01 Thread michaelba
From: Michael Baum Removes duplications in a few kinds: - Same function or operation for both Linux and Windows. - Same variable/structure for both common and net drivers. - Function called twice during spawn function. - Query device by Verbs twice during probing. Signed-off-by: Michael Baum --

[RFC 0/3] common/mlx5: refactor devargs management

2022-01-01 Thread michaelba
From: Michael Baum These patches rearrange the management of the devargs on two different levels. The first splits the net driver's devargs into two categories, device-dependent devargs and port-dependent devargs. Arguments that depend on the device are updated once in the creation of the shared

[PATCH] common/mlx5: fix missing validation in devargs parsing

2021-12-16 Thread michaelba
From: Michael Baum The rte_kvargs_parse function parses the arguments "key=value,key=value,..." string and return an allocated structure that contains a key/value list. It enables also to send a key without value and updates the values in the following ways: - "key=value,key,..." - value is upda

[PATCH] net/mlx5: fix the memory socket selection in ASO management

2021-12-08 Thread michaelba
From: Michael Baum In ASO objects creation (WQE, CQE and MR), socket number is given as a parameter. The selection was wrongly socket 0 hardcoded even if the user didn't configure memory for this socket. This patch replaces the selection to default socket (SOCKET_ID_ANY). Fixes: f935ed4b645a (

[PATCH v2] compress/mlx5: fix double close for context device

2021-11-25 Thread michaelba
From: Michael Baum The context of the device opens once in the common probe and closes with its removal. If the probe of one of the drivers fails, it releases its resources and then the common closes the context. But mistakenly in the compress probe, if there isn't enough capabilities to support

[PATCH] compress/mlx5: fix double close for context device

2021-11-24 Thread michaelba
From: Michael Baum The context of the device opens once in the common probe and closes with its removal. If the probe of one of the drivers fails, it releases its resources and then the common closes the context. But mistakenly in the compress probe, if ther isn't enough capabilities to support

[PATCH] net/mlx5: fix devargs validation for multiclass probe

2021-11-24 Thread michaelba
From: Michael Baum The mlx5_args function reads the devargs and checks if they are valid for this driver and if not it returns an error. This was normal behavior as long as all the devargs come to this driver, but since it is possible to run several drivers together, the function may return an e

[PATCH] common/mlx5: fix error handling in multi-class probe

2021-11-24 Thread michaelba
From: Michael Baum The common drivers_probe function calls in a loop to all probe functions for classes requested by the user. After it manages to probe them all, it updates this on the device in the "classes_loaded" field. If one of them fails, all those probed to it are remove using the driver

[PATCH 3/3] net/mlx5: fix missing adjustment MPRQ stride devargs

2021-11-23 Thread michaelba
From: Michael Baum In Multy-Packet RQ creation, the user can choose the number of strides and their size in bytes. The user updates it using specific devargs for both of these parameters. The above two parameters determine the size of the WQE which is actually their product of multiplication. If

[PATCH 2/3] net/mlx5: improve stride parameter names

2021-11-23 Thread michaelba
From: Michael Baum In the striding RQ management there are two important parameters, the size of the single stride in bytes and the number of strides. Both the data-path structure and config structure keep the log of the above parameters. However, in their names there is no mention that the valu

[PATCH 1/3] common/mlx5: add min WQE size for striding RQ

2021-11-23 Thread michaelba
From: Michael Baum Some devices have a WQE size limit for striding RQ. On some newer devices, this limitation is smaller and information on its size is provided by the firmware. This patch adds the attribute query from firmware: the minimum required size of WQE in a strided RQ in granularity of

[PATCH 0/3] fix MPRQ prepare

2021-11-23 Thread michaelba
From: Michael Baum Prepare Multy-Packet RQ and fix missing devargs check. Michael Baum (3): common/mlx5: add min WQE size for striding RQ net/mlx5: improve stride parameter names net/mlx5: fix missing adjustment MPRQ stride devargs drivers/common/mlx5/mlx5_devx_cmds.c | 16 ++ drivers/c

[PATCH] common/mlx5: fix memory leak in Windows dereg MR function

2021-11-17 Thread michaelba
From: Michael Baum The "mlx5_devx_cmd_mkey_create" DevX cmd allocates DevX object using mlx5_malloc and then creates MKey using glue function. Compatibly, "mlx5_devx_cmd_destroy" cmd releases first the MKey using glue function, and then free the DevX object using mlx5_free. On Windows OS, the re

[PATCH] common/mlx5: fix user mode register access attribute

2021-11-17 Thread michaelba
From: Michael Baum To detect the timestamp mode configured on the NIC the mlx5 PMD uses the firmware command ACCESS_REGISTER_USER. The HCA capability command has an attribute flag checking whether firmware supports the command. However, the HCA capability query command read the flag from wrong p

[PATCH] common/mlx5: fix redundant field in MR control structure

2021-11-16 Thread michaelba
From: Michael Baum Inside the MR control structure there is a pointer to the common device. This pointer enables access to the global cache as well as hardware objects that may be required in case a new MR needs to be created. The purpose of adding this pointer into the MR control structure was

[dpdk-dev] [PATCH v3 14/18] common/mlx5: add global MR cache create function

2021-10-19 Thread michaelba
From: Michael Baum Add function for global shared MR cache structure initialization. This function include: - btree initialization. - set callbacks for reg and dereg MR. Signed-off-by: Michael Baum Acked-by: Matan Azrad --- drivers/common/mlx5/linux/mlx5_common_verbs.c | 15 +++ drivers

[dpdk-dev] [PATCH v3 15/18] common/mlx5: share MR top-half search function

2021-10-19 Thread michaelba
From: Michael Baum Add function to search in local liniar cache and use it in the drivers instead of their functions. Signed-off-by: Michael Baum Acked-by: Matan Azrad --- drivers/common/mlx5/mlx5_common.h| 9 drivers/common/mlx5/mlx5_common_mr.c | 52 +++

[dpdk-dev] [PATCH v3 13/18] common/mlx5: add MR ctrl init function

2021-10-19 Thread michaelba
From: Michael Baum Add function for MR control structure initialization. This function include: - btree initialization. - dev_gen_ptr initialization. Signed-off-by: Michael Baum Acked-by: Matan Azrad --- drivers/common/mlx5/mlx5_common_mr.c| 28 + drivers/common/

[dpdk-dev] [PATCH v3 17/18] common/mlx5: support device DMA map and unmap

2021-10-19 Thread michaelba
From: Michael Baum Since MR management has moved to the common area, there is no longer a need for the DMA map and unmap function for each driver. This patch share those functions. For most drivers it supports these operations for the first time. Signed-off-by: Michael Baum Acked-by: Matan Azra

[dpdk-dev] [PATCH v3 11/18] common/mlx5: share the HCA capabilities handle

2021-10-19 Thread michaelba
From: Michael Baum Add HCA attributes structure as a field of device config structure. It query in common probing, and updates the timestamp format fields. Each driver use HCA attributes from common device config structure, instead of query it for itself. Signed-off-by: Michael Baum Acked-by:

[dpdk-dev] [PATCH v3 18/18] common/mlx5: share MR mempool registration

2021-10-19 Thread michaelba
From: Michael Baum Expand the use of mempool registration to MR management for other drivers. Signed-off-by: Michael Baum Acked-by: Matan Azrad --- drivers/common/mlx5/mlx5_common.c | 148 ++ drivers/common/mlx5/mlx5_common.h | 9 ++ drivers/common/mlx5/mlx5_

[dpdk-dev] [PATCH v3 12/18] net/mlx5: remove redundancy in MR file

2021-10-19 Thread michaelba
From: Michael Baum This patch remove two redundant things from MR file: 1. mr_find_contig_memsegs_data structure which is moved to common file before. 2. External memory mechanism - mlx5_tx_update_ext_mp function. Since commit [1] which added support for DMA map and unmap, external mem

[dpdk-dev] [PATCH v3 16/18] common/mlx5: share MR management

2021-10-19 Thread michaelba
From: Michael Baum Add global shared MR cache as a field of common device structure. Move MR management to use this global cache for all drivers. Signed-off-by: Michael Baum Acked-by: Matan Azrad --- drivers/common/mlx5/mlx5_common.c| 54 - drivers/common/mlx5/mlx5_com

[dpdk-dev] [PATCH v3 09/18] common/mlx5: add ROCE disable in context device creation

2021-10-19 Thread michaelba
From: Michael Baum Add option to get IB device after disabling RoCE. It is relevant if there is vDPA class in device arguments list. Use common device context in vDPA driver and remove the ctx field from its private structure. Signed-off-by: Michael Baum Acked-by: Matan Azrad --- drivers/com

[dpdk-dev] [PATCH v3 06/18] common/mlx5: move basic probing functions to common

2021-10-19 Thread michaelba
From: Michael Baum Move open IBV/DevX device function to common. Signed-off-by: Michael Baum Acked-by: Matan Azrad --- drivers/common/mlx5/linux/mlx5_common_os.c| 86 ++ drivers/common/mlx5/linux/mlx5_common_os.h| 3 + drivers/common/mlx5/linux/mlx5_common_verbs.c | 70 +

[dpdk-dev] [PATCH v3 07/18] net/mlx5: remove redundant flag in device config

2021-10-19 Thread michaelba
From: Michael Baum Device configure structure has flag named devx as same as SH structure with the same meaning. Remove the flag from the configuration structure and move all the usages to the SH flag. Signed-off-by: Michael Baum Acked-by: Matan Azrad --- drivers/net/mlx5/linux/mlx5_os.c |

[dpdk-dev] [PATCH v3 08/18] common/mlx5: share device context object

2021-10-19 Thread michaelba
From: Michael Baum Create shared context device in common area and add it as a field of common device. Use this context device in all drivers and remove the ctx field from their private structure. Signed-off-by: Michael Baum Acked-by: Matan Azrad --- drivers/common/mlx5/linux/mlx5_common_os.c

[dpdk-dev] [PATCH v3 05/18] net/mlx5/windows: rearrange probing code

2021-10-19 Thread michaelba
From: Michael Baum Rearrange device detection code. Rearrange configuration structures filling. Remove unneeded variables. Signed-off-by: Michael Baum Acked-by: Matan Azrad --- drivers/net/mlx5/windows/mlx5_os.c | 224 - 1 file changed, 94 insertions(+), 130 deleti

[dpdk-dev] [PATCH v3 10/18] common/mlx5: share the protection domain object

2021-10-19 Thread michaelba
From: Michael Baum Create shared Protection Domain in common area and add it and its PDN as fields of common device structure. Use this Protection Domain in all drivers and remove the PD and PDN fields from their private structure. Signed-off-by: Michael Baum Acked-by: Matan Azrad --- driver

[dpdk-dev] [PATCH v3 01/18] net/mlx5/windows: fix miss callback register for mem event

2021-10-19 Thread michaelba
From: Michael Baum In device initialization, the driver registers to free hugepages events. When husepage is released, this callback frees all its related MRs. In Windows initialization, this callback is not registered what may cause to use invalid memory. This patch adds memory event callback

[dpdk-dev] [PATCH v3 02/18] common/mlx5: share basic probing with the internal drivers

2021-10-19 Thread michaelba
From: Michael Baum Create common probing structure that includes, for now, basic probing information detected by the common driver and share it with all the internal drivers. Signed-off-by: Michael Baum Acked-by: Matan Azrad --- drivers/common/mlx5/mlx5_common.c | 4 +- drivers/commo

[dpdk-dev] [PATCH v3 03/18] common/mlx5: share common definitions

2021-10-19 Thread michaelba
From: Michael Baum Create MACRO definitions file in the common driver as preparation for MR and basic probe sharing. Move relevant definitions from the net driver to the above file. Signed-off-by: Michael Baum Acked-by: Matan Azrad --- drivers/common/mlx5/mlx5_common.c | 1 + drivers/co

[dpdk-dev] [PATCH v3 04/18] common/mlx5: share memory related devargs

2021-10-19 Thread michaelba
From: Michael Baum Add device configure structure and function to parse user device arguments into it. Move parsing and management of relevant device arguments to common. Signed-off-by: Michael Baum Acked-by: Matan Azrad --- drivers/common/mlx5/mlx5_common.c | 184 ++

[dpdk-dev] [PATCH v3 00/18] mlx5: sharing global MR cache between drivers

2021-10-19 Thread michaelba
From: Michael Baum The MLNX PMD supports 5 classes (net, RegEx, vDPA, Compress and Crypto). The various drivers are registered under the common driver, and managed by it. In the common driver probing, it calls in a loop the probe function of each driver registered to it. Each driver creates for i

[dpdk-dev] [PATCH v2 16/18] common/mlx5: share MR management

2021-10-06 Thread michaelba
From: Michael Baum Add global shared MR cache as a field of common device structure. Move MR management to use this global cache for all drivers. Signed-off-by: Michael Baum Acked-by: Matan Azrad --- drivers/common/mlx5/mlx5_common.c| 54 - drivers/common/mlx5/mlx5_com

[dpdk-dev] [PATCH v2 18/18] common/mlx5: share MR mempool registration

2021-10-06 Thread michaelba
From: Michael Baum Expand the use of mempool registration to MR management for other drivers. Signed-off-by: Michael Baum Acked-by: Matan Azrad --- drivers/common/mlx5/mlx5_common.c | 148 ++ drivers/common/mlx5/mlx5_common.h | 9 ++ drivers/common/mlx5/mlx5_

[dpdk-dev] [PATCH v2 17/18] common/mlx5: support device DMA map and unmap

2021-10-06 Thread michaelba
From: Michael Baum Since MR management has moved to the common area, there is no longer a need for the DMA map and unmap function for each driver. This patch share those functions. For most drivers it supports these operations for the first time. Signed-off-by: Michael Baum Acked-by: Matan Azra

[dpdk-dev] [PATCH v2 14/18] common/mlx5: add global MR cache create function

2021-10-06 Thread michaelba
From: Michael Baum Add function for global shared MR cache structure initialization. This function include: - btree initialization. - set callbacks for reg and dereg MR. Signed-off-by: Michael Baum Acked-by: Matan Azrad --- drivers/common/mlx5/linux/mlx5_common_verbs.c | 15 +++ drivers

[dpdk-dev] [PATCH v2 15/18] common/mlx5: share MR top-half search function

2021-10-06 Thread michaelba
From: Michael Baum Add function to search in local liniar cache and use it in the drivers instead of their functions. Signed-off-by: Michael Baum Acked-by: Matan Azrad --- drivers/common/mlx5/mlx5_common.h| 9 drivers/common/mlx5/mlx5_common_mr.c | 52 +++

[dpdk-dev] [PATCH v2 08/18] common/mlx5: share device context object

2021-10-06 Thread michaelba
From: Michael Baum Create shared context device in common area and add it as a field of common device. Use this context device in all drivers and remove the ctx field from their private structure. Signed-off-by: Michael Baum Acked-by: Matan Azrad --- drivers/common/mlx5/linux/mlx5_common_os.c

[dpdk-dev] [PATCH v2 10/18] common/mlx5: share the protection domain object

2021-10-06 Thread michaelba
From: Michael Baum Create shared Protection Domain in common area and add it and its PDN as fields of common device structure. Use this Protection Domain in all drivers and remove the PD and PDN fields from their private structure. Signed-off-by: Michael Baum Acked-by: Matan Azrad --- driver

[dpdk-dev] [PATCH v2 12/18] net/mlx5: remove redundancy in MR file

2021-10-06 Thread michaelba
From: Michael Baum This patch remove two redundant things from MR file: 1. mr_find_contig_memsegs_data structure which is moved to common file before. 2. External memory mechanism - mlx5_tx_update_ext_mp function. Since commit [1] which added support for DMA map and unmap, external mem

[dpdk-dev] [PATCH v2 07/18] net/mlx5: remove redundant flag in device config

2021-10-06 Thread michaelba
From: Michael Baum Device configure structure has flag named devx as same as SH structure with the same meaning. Remove the flag from the configuration structure and move all the usages to the SH flag. Signed-off-by: Michael Baum Acked-by: Matan Azrad --- drivers/net/mlx5/linux/mlx5_os.c |

[dpdk-dev] [PATCH v2 13/18] common/mlx5: add MR ctrl init function

2021-10-06 Thread michaelba
From: Michael Baum Add function for MR control structure initialization. This function include: - btree initialization. - dev_gen_ptr initialization. Signed-off-by: Michael Baum Acked-by: Matan Azrad --- drivers/common/mlx5/mlx5_common_mr.c| 28 + drivers/common/

[dpdk-dev] [PATCH v2 11/18] common/mlx5: share the HCA capabilities handle

2021-10-06 Thread michaelba
From: Michael Baum Add HCA attributes structure as a field of device config structure. It query in common probing, and updates the timestamp format fields. Each driver use HCA attributes from common device config structure, instead of query it for itself. Signed-off-by: Michael Baum Acked-by:

[dpdk-dev] [PATCH v2 04/18] common/mlx5: share memory related devargs

2021-10-06 Thread michaelba
From: Michael Baum Add device configure structure and function to parse user device arguments into it. Move parsing and management of relevant device arguments to common. Signed-off-by: Michael Baum Acked-by: Matan Azrad --- drivers/common/mlx5/mlx5_common.c | 184 ++

[dpdk-dev] [PATCH v2 02/18] common/mlx5: share basic probing with the internal drivers

2021-10-06 Thread michaelba
From: Michael Baum Create common probing structure that includes, for now, basic probing information detected by the common driver and share it with all the internal drivers. Signed-off-by: Michael Baum Acked-by: Matan Azrad --- drivers/common/mlx5/mlx5_common.c | 4 +- drivers/commo

[dpdk-dev] [PATCH v2 01/18] net/mlx5/windows: fix miss callback register for mem event

2021-10-06 Thread michaelba
From: Michael Baum In device initialization, the driver registers to free hugepages events. When husepage is released, this callback frees all its related MRs. In Windows initialization, this callback is not registered what may cause to use invalid memory. This patch adds memory event callback

[dpdk-dev] [PATCH v2 05/18] net/mlx5/windows: rearrange probing code

2021-10-06 Thread michaelba
From: Michael Baum Rearrange device detection code. Rearrange configuration structures filling. Remove unneeded variables. Signed-off-by: Michael Baum Acked-by: Matan Azrad --- drivers/net/mlx5/windows/mlx5_os.c | 224 - 1 file changed, 94 insertions(+), 130 deleti

[dpdk-dev] [PATCH v2 00/18] mlx5: sharing global MR cache between drivers

2021-10-06 Thread michaelba
From: Michael Baum The MLNX PMD supports 5 classes (net, RegEx, vDPA, Compress and Crypto). The various drivers are registered under the common driver, and managed by it. In the common driver probing, it calls in a loop the probe function of each driver registered to it. Each driver creates for i

[dpdk-dev] [PATCH v2 09/18] common/mlx5: add ROCE disable in context device creation

2021-10-06 Thread michaelba
From: Michael Baum Add option to get IB device after disabling RoCE. It is relevant if there is vDPA class in device arguments list. Use common device context in vDPA driver and remove the ctx field from its private structure. Signed-off-by: Michael Baum Acked-by: Matan Azrad --- drivers/com

[dpdk-dev] [PATCH v2 03/18] common/mlx5: share common definitions

2021-10-06 Thread michaelba
From: Michael Baum Create MACRO definitions file in the common driver as preparation for MR and basic probe sharing. Move relevant definitions from the net driver to the above file. Signed-off-by: Michael Baum Acked-by: Matan Azrad --- drivers/common/mlx5/mlx5_common.c | 1 + drivers/co

[dpdk-dev] [PATCH v2 06/18] common/mlx5: move basic probing functions to common

2021-10-06 Thread michaelba
From: Michael Baum Move open IBV/DevX device function to common. Signed-off-by: Michael Baum Acked-by: Matan Azrad --- drivers/common/mlx5/linux/mlx5_common_os.c| 86 ++ drivers/common/mlx5/linux/mlx5_common_os.h| 3 + drivers/common/mlx5/linux/mlx5_common_verbs.c | 70 +

[dpdk-dev] [PATCH 17/18] common/mlx5: support device DMA map and unmap

2021-09-30 Thread michaelba
From: Michael Baum Since MR management has moved to the common area, there is no longer a need for the DMA map and unmap function for each driver. This patch share those functions. For most drivers it supports these operations for the first time. Signed-off-by: Michael Baum Acked-by: Matan Azra

[dpdk-dev] [PATCH 18/18] common/mlx5: share MR mempool registration

2021-09-30 Thread michaelba
From: Michael Baum Expand the use of mempool registration to MR management for other drivers. Signed-off-by: Michael Baum Acked-by: Matan Azrad --- drivers/common/mlx5/mlx5_common.c | 148 ++ drivers/common/mlx5/mlx5_common.h | 9 ++ drivers/common/mlx5/mlx5_

[dpdk-dev] [PATCH 16/18] common/mlx5: share MR management

2021-09-30 Thread michaelba
From: Michael Baum Add global shared MR cache as a field of common device structure. Move MR management to use this global cache for all drivers. Signed-off-by: Michael Baum Acked-by: Matan Azrad --- drivers/common/mlx5/mlx5_common.c| 54 - drivers/common/mlx5/mlx5_com

[dpdk-dev] [PATCH 08/18] common/mlx5: share device context object

2021-09-30 Thread michaelba
From: Michael Baum Create shared context device in common area and add it as a field of common device. Use this context device in all drivers and remove the ctx field from their private structure. Signed-off-by: Michael Baum Acked-by: Matan Azrad --- drivers/common/mlx5/linux/mlx5_common_os.c

[dpdk-dev] [PATCH 11/18] common/mlx5: share the HCA capabilities handle

2021-09-30 Thread michaelba
From: Michael Baum Add HCA attributes structure as a field of device config structure. It query in common probing, and updates the timestamp format fields. Each driver use HCA attributes from common device config structure, instead of query it for itself. Signed-off-by: Michael Baum Acked-by:

[dpdk-dev] [PATCH 14/18] common/mlx5: add global MR cache create function

2021-09-30 Thread michaelba
From: Michael Baum Add function for global shared MR cache structure initialization. This function include: - btree initialization. - set callbacks for reg and dereg MR. Signed-off-by: Michael Baum Acked-by: Matan Azrad --- drivers/common/mlx5/linux/mlx5_common_verbs.c | 15 +++ drivers

[dpdk-dev] [PATCH 09/18] common/mlx5: add ROCE disable in context device creation

2021-09-30 Thread michaelba
From: Michael Baum Add option to get IB device after disabling RoCE. It is relevant if there is vDPA class in device arguments list. Use common device context in vDPA driver and remove the ctx field from its private structure. Signed-off-by: Michael Baum Acked-by: Matan Azrad --- drivers/com

[dpdk-dev] [PATCH 12/18] net/mlx5: remove redundancy in MR file

2021-09-30 Thread michaelba
From: Michael Baum This patch remove two redundant things from MR file: 1. mr_find_contig_memsegs_data structure which is moved to common file before. 2. External memory mechanism - mlx5_tx_update_ext_mp function. Since commit [1] which added support for DMA map and unmap, external mem

[dpdk-dev] [PATCH 13/18] common/mlx5: add MR ctrl init function

2021-09-30 Thread michaelba
From: Michael Baum Add function for MR control structure initialization. This function include: - btree initialization. - dev_gen_ptr initialization. Signed-off-by: Michael Baum Acked-by: Matan Azrad --- drivers/common/mlx5/mlx5_common_mr.c| 28 + drivers/common/

[dpdk-dev] [PATCH 10/18] common/mlx5: share the protection domain object

2021-09-30 Thread michaelba
From: Michael Baum Create shared Protection Domain in common area and add it and its PDN as fields of common device structure. Use this Protection Domain in all drivers and remove the PD and PDN fields from their private structure. Signed-off-by: Michael Baum Acked-by: Matan Azrad --- driver

[dpdk-dev] [PATCH 07/18] net/mlx5: remove redundant flag in device config

2021-09-30 Thread michaelba
From: Michael Baum Device configure structure has flag named devx as same as SH structure with the same meaning. Remove the flag from the configuration structure and move all the usages to the SH flag. Signed-off-by: Michael Baum Acked-by: Matan Azrad --- drivers/net/mlx5/linux/mlx5_os.c |

[dpdk-dev] [PATCH 15/18] common/mlx5: share MR top-half search function

2021-09-30 Thread michaelba
From: Michael Baum Add function to search in local liniar cache and use it in the drivers instead of their functions. Signed-off-by: Michael Baum Acked-by: Matan Azrad --- drivers/common/mlx5/mlx5_common.h| 9 drivers/common/mlx5/mlx5_common_mr.c | 52 +++

[dpdk-dev] [PATCH 01/18] net/mlx5/windows: fix miss callback register for mem event

2021-09-30 Thread michaelba
From: Michael Baum In device initialization, the driver registers to free hugepages events. When husepage is released, this callback frees all its related MRs. In Windows initialization, this callback is not registered what may cause to use invalid memory. This patch adds memory event callback

[dpdk-dev] [PATCH 03/18] common/mlx5: share common definitions

2021-09-30 Thread michaelba
From: Michael Baum Create MACRO definitions file in the common driver as preparation for MR and basic probe sharing. Move relevant definitions from the net driver to the above file. Signed-off-by: Michael Baum Acked-by: Matan Azrad --- drivers/common/mlx5/mlx5_common.c | 1 + drivers/co

[dpdk-dev] [PATCH 04/18] common/mlx5: share memory related devargs

2021-09-30 Thread michaelba
From: Michael Baum Add device configure structure and function to parse user device arguments into it. Move parsing and management of relevant device arguments to common. Signed-off-by: Michael Baum Acked-by: Matan Azrad --- drivers/common/mlx5/mlx5_common.c | 184 ++

[dpdk-dev] [PATCH 00/18] mlx5: sharing global MR cache between drivers

2021-09-30 Thread michaelba
From: Michael Baum The MLNX PMD supports 5 classes (net, RegEx, vDPA, Compress and Crypto). The various drivers are registered under the common driver, and managed by it. In the common driver probing, it calls in a loop the probe function of each driver registered to it. Each driver creates for i

[dpdk-dev] [PATCH 05/18] net/mlx5/windows: rearrange probing code

2021-09-30 Thread michaelba
From: Michael Baum Rearrange device detection code. Rearrange configuration structures filling. Remove unneeded variables. Signed-off-by: Michael Baum Acked-by: Matan Azrad --- drivers/net/mlx5/windows/mlx5_os.c | 224 - 1 file changed, 94 insertions(+), 130 deleti

[dpdk-dev] [PATCH 02/18] common/mlx5: share basic probing with the internal drivers

2021-09-30 Thread michaelba
From: Michael Baum Create common probing structure that includes, for now, basic probing information detected by the common driver and share it with all the internal drivers. Signed-off-by: Michael Baum Acked-by: Matan Azrad --- drivers/common/mlx5/mlx5_common.c | 4 +- drivers/commo

[dpdk-dev] [PATCH 06/18] common/mlx5: move basic probing functions to common

2021-09-30 Thread michaelba
From: Michael Baum Move open IBV/DevX device function to common. Signed-off-by: Michael Baum Acked-by: Matan Azrad --- drivers/common/mlx5/linux/mlx5_common_os.c| 86 ++ drivers/common/mlx5/linux/mlx5_common_os.h| 3 + drivers/common/mlx5/linux/mlx5_common_verbs.c | 70 +