public inbox for linux-rdma@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH rdma-next 00/15] RDMA: Introduce generic buffer descriptor infrastructure for umem
@ 2026-03-25 15:00 Jiri Pirko
  2026-03-25 15:00 ` [PATCH rdma-next 01/15] RDMA/core: " Jiri Pirko
                   ` (15 more replies)
  0 siblings, 16 replies; 19+ messages in thread
From: Jiri Pirko @ 2026-03-25 15:00 UTC (permalink / raw)
  To: linux-rdma
  Cc: jgg, leon, mrgolin, gal.pressman, sleybo, parav, mbloch,
	yanjun.zhu, wangliang74, marco.crivellari, roman.gushchin,
	phaddad, lirongqing, ynachum, huangjunxian6,
	kalesh-anakkur.purayil, ohartoov, michaelgur, shayd, edwards,
	sriharsha.basavapatna, andrew.gospodarek, selvin.xavier

From: Jiri Pirko <jiri@nvidia.com>

This patchset introduces a generic buffer descriptor infrastructure
for passing memory buffers (dma-buf or user VA) to uverbs commands,
and wires it up for CQ and QP creation in the uverbs core, efa, mlx5,
bnxt_re and mlx4 drivers.
Instead of adding per-command UAPI attributes for each new buffer
type, a single UVERBS_ATTR_BUFFERS array attribute carries all buffer
descriptors. Each descriptor specifies a buffer type and is indexed by
per-command slot enums. A consumption check ensures userspace and
driver agree on which buffers are used.
The patchset:
1. Introduces the core ib_umem_list infrastructure and UAPI.
2. Factors out CQ buffer umem processing into a helper.
3. Integrates umem_list into CQ creation, with fallback to existing
   per-attribute path.
4-7. Converts efa, mlx5, bnxt_re and mlx4 to use umem_list for CQ
   buffer.
8. Removes the legacy umem field from struct ib_cq, now that all
   drivers use umem_list for CQ buffer management.
9. Adds a consumption check verifying all umem_list buffers were
   consumed by the driver after CQ creation.
10. Integrates umem_list into QP creation.
11. Converts mlx5 QP creation to use umem_list.
12-15. Extends CQ and QP with doorbell record buffer slots and
   converts mlx5 to use them.

Note this re-works the original patchset trying to handle this:
https://lore.kernel.org/all/20260203085003.71184-1-jiri@resnulli.us/
The code is so much different I'm sending this is a new patchset.

Jiri Pirko (15):
  RDMA/core: Introduce generic buffer descriptor infrastructure for umem
  RDMA/uverbs: Push out CQ buffer umem processing into a helper
  RDMA/uverbs: Integrate umem_list into CQ creation
  RDMA/efa: Use umem_list for user CQ buffer
  RDMA/mlx5: Use umem_list for user CQ buffer
  RDMA/bnxt_re: Use umem_list for user CQ buffer
  RDMA/mlx4: Use umem_list for user CQ buffer
  RDMA/uverbs: Remove legacy umem field from struct ib_cq
  RDMA/uverbs: Verify all umem_list buffers are consumed after CQ
    creation
  RDMA/uverbs: Integrate umem_list into QP creation
  RDMA/mlx5: Use umem_list for QP buffers in create_qp
  RDMA/uverbs: Add doorbell record buffer slot to CQ umem_list
  RDMA/mlx5: Use umem_list for CQ doorbell record
  RDMA/uverbs: Add doorbell record buffer slot to QP umem_list
  RDMA/mlx5: Use umem_list for QP doorbell record

 drivers/infiniband/core/core_priv.h           |   1 +
 drivers/infiniband/core/umem.c                | 248 ++++++++++++++++++
 drivers/infiniband/core/uverbs_cmd.c          |  18 +-
 drivers/infiniband/core/uverbs_std_types_cq.c | 158 ++++++-----
 drivers/infiniband/core/uverbs_std_types_qp.c |  26 +-
 drivers/infiniband/core/verbs.c               |  26 +-
 drivers/infiniband/hw/bnxt_re/ib_verbs.c      |  23 +-
 drivers/infiniband/hw/efa/efa_verbs.c         |  17 +-
 drivers/infiniband/hw/mlx4/cq.c               |  21 +-
 drivers/infiniband/hw/mlx5/cq.c               |  40 ++-
 drivers/infiniband/hw/mlx5/doorbell.c         |  41 ++-
 drivers/infiniband/hw/mlx5/mlx5_ib.h          |   3 +-
 drivers/infiniband/hw/mlx5/qp.c               |  76 ++++--
 drivers/infiniband/hw/mlx5/srq.c              |   2 +-
 include/rdma/ib_umem.h                        |  54 ++++
 include/rdma/ib_verbs.h                       |   5 +-
 include/rdma/uverbs_ioctl.h                   |  14 +
 include/uapi/rdma/ib_user_ioctl_cmds.h        |  17 ++
 include/uapi/rdma/ib_user_ioctl_verbs.h       |  27 ++
 19 files changed, 651 insertions(+), 166 deletions(-)

-- 
2.51.1


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

end of thread, other threads:[~2026-03-29 19:09 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-03-25 15:00 [PATCH rdma-next 00/15] RDMA: Introduce generic buffer descriptor infrastructure for umem Jiri Pirko
2026-03-25 15:00 ` [PATCH rdma-next 01/15] RDMA/core: " Jiri Pirko
2026-03-25 15:00 ` [PATCH rdma-next 02/15] RDMA/uverbs: Push out CQ buffer umem processing into a helper Jiri Pirko
2026-03-25 15:00 ` [PATCH rdma-next 03/15] RDMA/uverbs: Integrate umem_list into CQ creation Jiri Pirko
2026-03-25 15:00 ` [PATCH rdma-next 04/15] RDMA/efa: Use umem_list for user CQ buffer Jiri Pirko
2026-03-25 15:00 ` [PATCH rdma-next 05/15] RDMA/mlx5: " Jiri Pirko
2026-03-25 15:00 ` [PATCH rdma-next 06/15] RDMA/bnxt_re: " Jiri Pirko
2026-03-25 15:00 ` [PATCH rdma-next 07/15] RDMA/mlx4: " Jiri Pirko
2026-03-25 15:00 ` [PATCH rdma-next 08/15] RDMA/uverbs: Remove legacy umem field from struct ib_cq Jiri Pirko
2026-03-25 15:00 ` [PATCH rdma-next 09/15] RDMA/uverbs: Verify all umem_list buffers are consumed after CQ creation Jiri Pirko
2026-03-25 15:00 ` [PATCH rdma-next 10/15] RDMA/uverbs: Integrate umem_list into QP creation Jiri Pirko
2026-03-25 15:00 ` [PATCH rdma-next 11/15] RDMA/mlx5: Use umem_list for QP buffers in create_qp Jiri Pirko
2026-03-25 15:00 ` [PATCH rdma-next 12/15] RDMA/uverbs: Add doorbell record buffer slot to CQ umem_list Jiri Pirko
2026-03-25 15:00 ` [PATCH rdma-next 13/15] RDMA/mlx5: Use umem_list for CQ doorbell record Jiri Pirko
2026-03-25 15:00 ` [PATCH rdma-next 14/15] RDMA/uverbs: Add doorbell record buffer slot to QP umem_list Jiri Pirko
2026-03-25 15:00 ` [PATCH rdma-next 15/15] RDMA/mlx5: Use umem_list for QP doorbell record Jiri Pirko
2026-03-27 23:03 ` [PATCH rdma-next 00/15] RDMA: Introduce generic buffer descriptor infrastructure for umem Yanjun.Zhu
2026-03-29 11:26   ` Jiri Pirko
2026-03-29 19:08     ` Zhu Yanjun

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox