]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
RDMA/uverbs: Add a common way to create CQ with umem
authorMichael Margolin <mrgolin@amazon.com>
Tue, 8 Jul 2025 20:23:06 +0000 (20:23 +0000)
committerLeon Romanovsky <leon@kernel.org>
Sun, 13 Jul 2025 08:00:34 +0000 (04:00 -0400)
commit1a40c362ae265ca4004f7373b34c22af6810f6cb
tree4e605b45246d7e999c4cca9d0487c259aa827133
parente73242aa14d2ec7f4a1a13688366bb36dc0fe5b7
RDMA/uverbs: Add a common way to create CQ with umem

Add ioctl command attributes and a common handling for the option to
create CQs with memory buffers passed from userspace. When required
attributes are supplied, create umem and provide it for driver's use.
The extension enables creation of CQs on top of preallocated CPU
virtual or device memory buffers, by supplying VA or dmabuf fd, in a
common way.
Drivers can support this flow by initializing a new create_cq_umem fp
field in their ops struct, with a function that can handle the new
parameter.

Signed-off-by: Michael Margolin <mrgolin@amazon.com>
Link: https://patch.msgid.link/20250708202308.24783-2-mrgolin@amazon.com
Reviewed-by: Jason Gunthorpe <jgg@nvidia.com>
Signed-off-by: Leon Romanovsky <leon@kernel.org>
drivers/infiniband/core/device.c
drivers/infiniband/core/uverbs_std_types_cq.c
include/rdma/ib_verbs.h
include/uapi/rdma/ib_user_ioctl_cmds.h