Introduce UAPIs to query UCONTEXT, PD and MR properties
Status from this message: Applied to for-next, thanks
Get series with b4
b4 am [email protected]Versions newest first
Changes in v1 from the cover letter
* Replaced "KABI" word with "UAPI".
* Set IOVA as an optional attribute upon query MR.
Patches in v1 Applied
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/7 | IB/uverbs: Enable CQ ioctl commands by defaultdrivers/ drivers/ | +0 | 0 replies | |
| 2/7 | IB/uverbs: Set IOVA on IB MR in uverbs layerdrivers/ drivers/ drivers/ | +4 | 0 replies | |
| 3/7 | IB/uverbs: Expose UAPI to query ucontextdrivers/ drivers/ include/ +1 more | +51 | 0 replies | |
| 4/7 | RDMA/mlx5: Refactor mlx5_ib_alloc_ucontext() responsedrivers/ | +93 | 0 replies | |
| 5/7 | RDMA/mlx5: Implement the query ucontext functionalitydrivers/ drivers/ include/ | +40 | 0 replies | |
| 6/7 | RDMA/mlx5: Introduce UAPI to query PD attributesdrivers/ drivers/ drivers/ +2 more | +60 | 0 replies | |
| 7/7 | IB/uverbs: Expose UAPI to query MRdrivers/ include/ | +60 | 0 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [PATCH rdma-next v1 0/7] Introduce UAPIs to query UCONTEXT, PD and MR properties
From: Leon Romanovsky <[email protected]>
Changelog
v1:
* Replaced "KABI" word with "UAPI".
* Set IOVA as an optional attribute upon query MR.
v0:
https://lore.kernel.org/lkml/[email protected]
------------------------------------------------------------------------------
From Yishai,
This series introduce UAPIs to query existing UCONTEXT, PD and MR for their properties.
By those UAPIs a user space application which owns the command FD of the device can retrieve and rebuild the above objects despite that it wasn't their creator. As of that, PDs and MRs can be shared by any process who owns the command FD of their creator.
This functionality enables to utilize and optimize some application flows, few examples below.
Any solution which is a single business logic based on multi-process design needs this. Example include NGINX, with TCP load balancing, sharing the RSS indirection table with RQ per process. HPC frameworks with multi-rank (process) solution on single hosts. UCX can share IB resources using the shared PD and can help dispatch data to multiple processes/MR's in single RDMA operation. Also, there are use cases when a primary processes registered a large shared memory range, and each worker process spawned will create a private QP on the shared PD, and use the shared MR to save the registration time per-process.
The matching verbs APIs were introduced in the mailing list by the below RFC [1].
In addition, the series enables CQ ioctl commands by default as this functionality is fully mature for a long time and sets IOVA on IB MR in the uverbs layer to let all drivers have it.
[1] https://patchwork.kernel.org/patch/11540665/
Yishai
Yishai Hadas (7):
IB/uverbs: Enable CQ ioctl commands by default IB/uverbs: Set IOVA on IB MR in uverbs layer IB/uverbs: Expose UAPI to query ucontext RDMA/mlx5: Refactor mlx5_ib_alloc_ucontext() response RDMA/mlx5: Implement the query ucontext functionality RDMA/mlx5: Introduce UAPI to query PD attributes IB/uverbs: Expose UAPI to query MR
drivers/infiniband/Kconfig | 8 - drivers/infiniband/core/device.c | 1 + drivers/infiniband/core/uverbs_cmd.c | 4 + drivers/infiniband/core/uverbs_ioctl.c | 1 + drivers/infiniband/core/uverbs_std_types_cq.c | 3 - .../infiniband/core/uverbs_std_types_device.c | 41 +++- drivers/infiniband/core/uverbs_std_types_mr.c | 52 +++- drivers/infiniband/hw/cxgb4/mem.c | 1 - drivers/infiniband/hw/mlx4/mr.c | 1 - drivers/infiniband/hw/mlx5/Makefile | 3 +- drivers/infiniband/hw/mlx5/main.c | 232 ++++++++++-------- drivers/infiniband/hw/mlx5/mlx5_ib.h | 2 + drivers/infiniband/hw/mlx5/std_types.c | 45 ++++ include/rdma/ib_verbs.h | 4 + include/uapi/rdma/ib_user_ioctl_cmds.h | 15 ++ include/uapi/rdma/mlx5_user_ioctl_cmds.h | 14 ++ 16 files changed, 308 insertions(+), 119 deletions(-) create mode 100644 drivers/infiniband/hw/mlx5/std_types.c
--
2.26.2