mlx5: sharing global MR cache between drivers
Status from this message: Applied, thanks.
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v3 Latest18 patches 1 replyApplied
- v218 patches 2 repliesSuperseded
- v118 patches 0 repliesSuperseded
Patches in v3 Applied
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/18 | net/mlx5/windows: fix miss callback register for mem eventdrivers/ | +13 | 0 replies | |
| 2/18 | common/mlx5: share basic probing with the internal driversdrivers/ drivers/ drivers/ +8 more | +94 | 0 replies | |
| 3/18 | common/mlx5: share common definitionsdrivers/ drivers/ drivers/ +3 more | +49 | 0 replies | |
| 4/18 | common/mlx5: share memory related devargsdrivers/ drivers/ drivers/ +8 more | +186 | 0 replies | |
| 5/18 | net/mlx5/windows: rearrange probing codedrivers/ | +94 | 0 replies | |
| 6/18 | common/mlx5: move basic probing functions to commondrivers/ drivers/ drivers/ +7 more | +411 | 0 replies | |
| 7/18 | net/mlx5: remove redundant flag in device configdrivers/ drivers/ drivers/ +2 more | +21 | 0 replies | |
| 8/18 | common/mlx5: share device context objectdrivers/ drivers/ drivers/ +25 more | +321 | 0 replies | |
| 9/18 | common/mlx5: add ROCE disable in context device creationdrivers/ drivers/ drivers/ +12 more | +188 | 0 replies | |
| 10/18 | common/mlx5: share the protection domain objectdrivers/ drivers/ drivers/ +32 more | +167 | 0 replies | |
| 11/18 | common/mlx5: share the HCA capabilities handledrivers/ drivers/ drivers/ +15 more | +100 | 0 replies | |
| 12/18 | net/mlx5: remove redundancy in MR filedrivers/ drivers/ | +1 | 0 replies | |
| 13/18 | common/mlx5: add MR ctrl init functiondrivers/ drivers/ drivers/ +5 more | +42 | 0 replies | |
| 14/18 | common/mlx5: add global MR cache create functiondrivers/ drivers/ drivers/ +12 more | +70 | 0 replies | |
| 15/18 | common/mlx5: share MR top-half search functiondrivers/ drivers/ drivers/ +3 more | +77 | 0 replies | |
| 16/18 | common/mlx5: share MR managementdrivers/ drivers/ drivers/ +27 more | +110 | 0 replies | |
| 17/18 | common/mlx5: support device DMA map and unmapdrivers/ drivers/ drivers/ +4 more | +100 | 0 replies | |
| 18/18 | common/mlx5: share MR mempool registrationdrivers/ drivers/ drivers/ +16 more | +322 | 0 replies |
Reviews trailers per patch
All 18 patches have a Reviewed-by or Acked-by.
| Patch | Matan Azrad |
|---|---|
| 1/18 | A-b |
| 2/18 | A-b |
| 3/18 | A-b |
| 4/18 | A-b |
| 5/18 | A-b |
| 6/18 | A-b |
| 7/18 | A-b |
| 8/18 | A-b |
| 9/18 | A-b |
| 10/18 | A-b |
| 11/18 | A-b |
| 12/18 | A-b |
| 13/18 | A-b |
| 14/18 | A-b |
| 15/18 | A-b |
| 16/18 | A-b |
| 17/18 | A-b |
| 18/18 | A-b |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [dpdk-dev] [PATCH v3 00/18] mlx5: sharing global MR cache between drivers
From: Michael Baum <[email protected]>
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 itself all the objects required for communication with the hardware, as well as a global MR cache that manages memory mappings.
The management of the caches separately by the different drivers, is not very efficient. In fact the same memory is managed several times and each caching handle is done by doubling the number of drivers, so we want to manage this cache jointly by the common driver.
This feature will move management to common driver in two phases.
Phase 1: sharing HW objects between drivers (11 patches)
The communication with the hardware - for any MR handle - is conducted by the Protection Domain, so we are motivated to share it between the drivers. However, to create it we need to give the context of the device, so the context must also be shared between the drivers. At this point we will share between the drivers the next trio (CTX, PD, pdn) to create an infrastructure that will allow sharing of dependent objects, and in particular the global MR cache.
The common driver itself will create this trio individually for all drivers, before calling their probe function. As a parameter to the probe function, it will give them a pointer to the structure containing the trio.
Phase 2: sharing global MR cache between drivers (7 patches) The common driver will add to the structure containing the trio also the structure that manages the global MR cache, and will keep a list of such structures for memory management. In each driver, each queue will manage its own local MR cache. If the queue does not find its cache, it will switch to searching the global MR cache shared by all. Caching access will be through the pointer that the driver received as a parameter in probing.
v2: rebase
v3: fix compilation issue
Michael Baum (18):
net/mlx5/windows: fix miss callback register for mem event common/mlx5: share basic probing with the internal drivers common/mlx5: share common definitions common/mlx5: share memory related devargs net/mlx5/windows: rearrange probing code common/mlx5: move basic probing functions to common net/mlx5: remove redundant flag in device config common/mlx5: share device context object common/mlx5: add ROCE disable in context device creation common/mlx5: share the protection domain object common/mlx5: share the HCA capabilities handle net/mlx5: remove redundancy in MR file common/mlx5: add MR ctrl init function common/mlx5: add global MR cache create function common/mlx5: share MR top-half search function common/mlx5: share MR management
common/mlx5: support device DMA map and unmap common/mlx5: share MR mempool registration
drivers/common/mlx5/linux/mlx5_common_os.c | 280 +++++++- drivers/common/mlx5/linux/mlx5_common_os.h | 16 +- drivers/common/mlx5/linux/mlx5_common_verbs.c | 96 ++- drivers/common/mlx5/linux/mlx5_nl.c | 2 +- drivers/common/mlx5/linux/mlx5_nl.h | 6 +- drivers/common/mlx5/mlx5_common.c | 596 +++++++++++++++--- drivers/common/mlx5/mlx5_common.h | 96 +-- drivers/common/mlx5/mlx5_common_defs.h | 45 ++ drivers/common/mlx5/mlx5_common_mp.h | 11 + drivers/common/mlx5/mlx5_common_mr.c | 192 +++++- drivers/common/mlx5/mlx5_common_mr.h | 76 ++- drivers/common/mlx5/mlx5_common_private.h | 6 - drivers/common/mlx5/mlx5_devx_cmds.h | 12 +- drivers/common/mlx5/mlx5_malloc.h | 1 - drivers/common/mlx5/version.map | 29 +- drivers/common/mlx5/windows/mlx5_common_os.c | 245 ++++++- drivers/common/mlx5/windows/mlx5_common_os.h | 9 +- drivers/compress/mlx5/mlx5_compress.c | 245 ++----- drivers/crypto/mlx5/mlx5_crypto.c | 209 +----- drivers/crypto/mlx5/mlx5_crypto.h | 6 +- drivers/crypto/mlx5/mlx5_crypto_dek.c | 5 +- drivers/net/mlx5/linux/mlx5_ethdev_os.c | 6 +- drivers/net/mlx5/linux/mlx5_mp_os.c | 12 +- drivers/net/mlx5/linux/mlx5_os.c | 511 ++++----------- drivers/net/mlx5/linux/mlx5_verbs.c | 99 +-- drivers/net/mlx5/linux/mlx5_verbs.h | 2 - drivers/net/mlx5/meson.build | 1 - drivers/net/mlx5/mlx5.c | 241 ++----- drivers/net/mlx5/mlx5.h | 57 +- drivers/net/mlx5/mlx5_defs.h | 22 +- drivers/net/mlx5/mlx5_devx.c | 39 +- drivers/net/mlx5/mlx5_flow.c | 6 +- drivers/net/mlx5/mlx5_flow_aso.c | 50 +- drivers/net/mlx5/mlx5_flow_dv.c | 66 +- drivers/net/mlx5/mlx5_flow_verbs.c | 4 +- drivers/net/mlx5/mlx5_mr.c | 397 ------------ drivers/net/mlx5/mlx5_mr.h | 26 - drivers/net/mlx5/mlx5_rx.c | 16 +- drivers/net/mlx5/mlx5_rx.h | 20 +- drivers/net/mlx5/mlx5_rxq.c | 11 +- drivers/net/mlx5/mlx5_rxtx.c | 1 - drivers/net/mlx5/mlx5_rxtx.h | 27 - drivers/net/mlx5/mlx5_rxtx_vec.h | 1 - drivers/net/mlx5/mlx5_trigger.c | 8 +- drivers/net/mlx5/mlx5_tx.c | 1 - drivers/net/mlx5/mlx5_tx.h | 30 +- drivers/net/mlx5/mlx5_txpp.c | 23 +- drivers/net/mlx5/mlx5_txq.c | 10 +- drivers/net/mlx5/windows/mlx5_ethdev_os.c | 12 +- drivers/net/mlx5/windows/mlx5_os.c | 402 ++---------- drivers/regex/mlx5/mlx5_regex.c | 144 +---- drivers/regex/mlx5/mlx5_regex.h | 27 +- drivers/regex/mlx5/mlx5_regex_control.c | 19 +- drivers/regex/mlx5/mlx5_regex_fastpath.c | 47 +- drivers/regex/mlx5/mlx5_rxp.c | 62 +- drivers/vdpa/mlx5/mlx5_vdpa.c | 212 +------ drivers/vdpa/mlx5/mlx5_vdpa.h | 5 +- drivers/vdpa/mlx5/mlx5_vdpa_event.c | 25 +- drivers/vdpa/mlx5/mlx5_vdpa_lm.c | 6 +- drivers/vdpa/mlx5/mlx5_vdpa_mem.c | 13 +- drivers/vdpa/mlx5/mlx5_vdpa_steer.c | 11 +- drivers/vdpa/mlx5/mlx5_vdpa_virtq.c | 15 +- 62 files changed, 2083 insertions(+), 2787 deletions(-) create mode 100644 drivers/common/mlx5/mlx5_common_defs.h delete mode 100644 drivers/net/mlx5/mlx5_mr.c delete mode 100644 drivers/net/mlx5/mlx5_mr.h
Signature · 1 line
2.25.1