All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH for-next v4 0/5] RDMA/erdma: Support non-contiguous kernel queue buffers
@ 2026-09-17 12:04 Cheng Xu
  2026-09-17 12:04 ` [PATCH for-next v4 1/5] RDMA/erdma: Unwind kernel QP initialization failures Cheng Xu
                   ` (5 more replies)
  0 siblings, 6 replies; 12+ messages in thread
From: Cheng Xu @ 2026-09-17 12:04 UTC (permalink / raw)
  To: jgg, leon; +Cc: linux-rdma, KaiShen

Hi,

This small patchset introduces support for non-contiguous kernel queue
buffers. Kernel QP and CQ buffers currently use a single coherent DMA
allocation, which can fail for large queues when memory is fragmented.
To address this, we allocate page-sized coherent buffers and describe
them with the existing MTT.

- #1 unwinds kernel QP initialization failures explicitly.
- #2 adds support for non-contiguous kernel QP buffers.
- #3 adds support for non-contiguous kernel CQ buffers.
- #4 unifies userspace and kernel space queue buffer management.
- #5 moves kernel QP helpers after the shared memory helpers.

Changes from v3:
- Address Sashiko automated review findings:
  - Keep the CPU and DMA addresses returned by dma_alloc_coherent() instead
    of deriving a virtual address through scatterlist helpers.
  - Sync continuous MTTs after populating their entries.
  - Keep DMA MRs and MTT-only FRMRs outside queue buffer backing cleanup.

Changes from v2:
- Add explicit resource unwinding for kernel QP initialization.
- Use struct scatterlist for kernel queue buffer pages.
- Make memory cleanup operate only on initialized backing memory.
- Return -ENOMEM when a kernel QP doorbell record allocation fails.

Changes from v1:
- Fix formatting issues.

Thanks,
Cheng Xu

Cheng Xu (5):
  RDMA/erdma: Unwind kernel QP initialization failures
  RDMA/erdma: Support non-contiguous kernel QP buffers
  RDMA/erdma: Support non-contiguous kernel CQ buffers
  RDMA/erdma: Unify userspace and kernel queue buffer management
  RDMA/erdma: Move kernel QP helpers after memory helpers

 drivers/infiniband/hw/erdma/erdma_cq.c    |  18 +-
 drivers/infiniband/hw/erdma/erdma_qp.c    |  38 +-
 drivers/infiniband/hw/erdma/erdma_verbs.c | 569 ++++++++++++----------
 drivers/infiniband/hw/erdma/erdma_verbs.h |  65 ++-
 4 files changed, 404 insertions(+), 286 deletions(-)

-- 
2.31.1

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2026-09-23 10:53 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-09-17 12:04 [PATCH for-next v4 0/5] RDMA/erdma: Support non-contiguous kernel queue buffers Cheng Xu
2026-09-17 12:04 ` [PATCH for-next v4 1/5] RDMA/erdma: Unwind kernel QP initialization failures Cheng Xu
2026-09-17 12:11   ` sashiko-bot
2026-09-17 12:04 ` [PATCH for-next v4 2/5] RDMA/erdma: Support non-contiguous kernel QP buffers Cheng Xu
2026-09-17 12:16   ` sashiko-bot
2026-09-17 12:04 ` [PATCH for-next v4 3/5] RDMA/erdma: Support non-contiguous kernel CQ buffers Cheng Xu
2026-09-17 12:13   ` sashiko-bot
2026-09-17 12:04 ` [PATCH for-next v4 4/5] RDMA/erdma: Unify userspace and kernel queue buffer management Cheng Xu
2026-09-17 12:13   ` sashiko-bot
2026-09-17 12:04 ` [PATCH for-next v4 5/5] RDMA/erdma: Move kernel QP helpers after memory helpers Cheng Xu
2026-09-17 12:10   ` sashiko-bot
2026-09-23 10:53 ` [PATCH for-next v4 0/5] RDMA/erdma: Support non-contiguous kernel queue buffers Leon Romanovsky

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.