Skip to content

RDMA/erdma: Add DMA-BUF memory registration

Boshi Yu linux-rdma 3 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 Latest3 patches 3 repliesIn review
  2. v23 patches 2 repliesSuperseded
  3. v13 patches 2 repliesSuperseded

Changes in v3 from the cover letter

- Patch#3: Switch to the revocable pinned dmabuf interface as suggested by Jason Gunthorpe.

Patches in v3 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3RDMA/erdma: Rename get/put_mtt_entries to erdma_mem_init/uninitdrivers/infiniband/hw/erdma/erdma_verbs.c+32 -320 replies
2/3RDMA/erdma: Introduce struct erdma_mem_init_attrdrivers/infiniband/hw/erdma/erdma_verbs.c drivers/infiniband/hw/erdma/erdma_verbs.h+55 -230 replies
3/3RDMA/erdma: Implement erdma_reg_user_mr_dmabufdrivers/infiniband/hw/erdma/erdma_main.c drivers/infiniband/hw/erdma/erdma_verbs.c drivers/infiniband/hw/erdma/erdma_verbs.h+142 -521 reply

Reviews trailers per patch

All 3 patches have a Reviewed-by or Acked-by.

PatchCheng XuJacob Moroni
1/3R-b
2/3R-b
3/3R-b R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v3 thread

Cover letter [PATCH for-next v3 0/3] RDMA/erdma: Add DMA-BUF memory registration

Hi,

This patch series adds DMA-BUF memory registration support to the erdma driver:

- #1 renames get/put_mtt_entries to erdma_mem_init/uninit to better reflect their purpose of initializing the struct erdma_mem.
- #2 introduces struct erdma_mem_init_attr to pass parameters to erdma_mem_init(), improving code maintainability and preparing for DMA-BUF support.
- #3 implements erdma_reg_user_mr_dmabuf() to enable DMA-BUF based user memory registration using the revocable pinned dmabuf interface.

One known limitation: if the DEREG_MR command fails in the revoke callback, the driver can only log an error, since erdma does not support a function-level reset like irdma's request_reset() yet. We plan to introduce such a mechanism in future work.

Thanks,
Boshi Yu

---

v3:
- Patch#3: Switch to the revocable pinned dmabuf interface as suggested by Jason Gunthorpe.

v2:
- Patch#2: Add validation for the return value of ib_umem_find_best_pgsz().

v1:

Boshi Yu (3):
RDMA/erdma: Rename get/put_mtt_entries to erdma_mem_init/uninit RDMA/erdma: Introduce struct erdma_mem_init_attr RDMA/erdma: Implement erdma_reg_user_mr_dmabuf

 drivers/infiniband/hw/erdma/erdma_main.c  |   1 +
 drivers/infiniband/hw/erdma/erdma_verbs.c | 262 +++++++++++++++-------
 drivers/infiniband/hw/erdma/erdma_verbs.h |  17 ++
 3 files changed, 201 insertions(+), 79 deletions(-)
Signature · 1 line
2.46.0