|
|
Log in / Subscribe / Register

RDMA: add per-attribute UMEM for SRQ create and CQ resize

From:  Jiri Pirko <jiri-AT-resnulli.us>
To:  linux-rdma-AT-vger.kernel.org
Subject:  [PATCH rdma-next v2 0/6] RDMA: add per-attribute UMEM for SRQ create and CQ resize
Date:  Mon, 15 Jun 2026 10:50:34 +0200
Message-ID:  <20260615085040.1396623-1-jiri@resnulli.us>
Cc:  jgg-AT-ziepe.ca, leon-AT-kernel.org, mrgolin-AT-amazon.com
Archive-link:  Article

From: Jiri Pirko <jiri@nvidia.com>

This series continues extending the per-attribute UMEM model to the
couple of other uverbs flows that pin user buffers, so that userspace
can back those buffers using previously introduce descriptor
infrastructure.

The underlying infrastructure - ib_umem_get_attr_or_va() and the
per-command UMEM attributes - is already in place and used by the CQ and
QP create methods. This series applies the same model to the flows that
were still VA-only:
- SRQ create: the WQE buffer and the mlx5 doorbell record.
- CQ resize: the resized CQ buffer. Resize CQ was only reachable
  through the legacy write() command (IB_USER_VERBS_CMD_RESIZE_CQ), so
  a modern ioctl method (UVERBS_METHOD_CQ_RESIZE) is added first; the
  per-attribute UMEM descriptor is then carried on top of it.

Wire this up in mlx5 driver for both cases. When the new UMEM
attribute is not supplied, the code falls back to the existing UHW.

---

base-commit: 20ff9350862468af21b46cae2c22d17d6ec637f9
see individual patches for changelog

Jiri Pirko (6):
  RDMA/uverbs: Add SRQ buffer UMEM attribute
  RDMA/mlx5: Use UMEM attribute for SRQ buffer in create_srq
  RDMA/mlx5: Use UMEM attribute for SRQ doorbell record
  RDMA/uverbs: Add ioctl method for CQ resize
  RDMA/uverbs: Add CQ resize buffer UMEM attribute
  RDMA/mlx5: Use UMEM attribute for CQ resize buffer

 drivers/infiniband/core/uverbs_std_types_cq.c | 45 ++++++++++++++++++-
 .../infiniband/core/uverbs_std_types_srq.c    |  2 +
 drivers/infiniband/hw/mlx5/cq.c               |  9 ++--
 drivers/infiniband/hw/mlx5/main.c             |  1 +
 drivers/infiniband/hw/mlx5/mlx5_ib.h          |  1 +
 drivers/infiniband/hw/mlx5/srq.c              | 25 ++++++++++-
 include/uapi/rdma/ib_user_ioctl_cmds.h        |  9 ++++
 include/uapi/rdma/mlx5_user_ioctl_cmds.h      |  4 ++
 8 files changed, 90 insertions(+), 6 deletions(-)

-- 
2.54.0




Copyright © 2026, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds