RDMA/uverbs: Add support for UCAPs in context creation
authorChiara Meiohas <cmeiohas@nvidia.com>
Thu, 6 Mar 2025 11:51:28 +0000 (13:51 +0200)
committerLeon Romanovsky <leon@kernel.org>
Sun, 9 Mar 2025 17:13:02 +0000 (13:13 -0400)
commitfe9d7822baee65d8e77542391799b2777f5216f5
tree0ef180702b6b121fe1c2a430a48fe202e0cf2cf8
parentcf7174e8982f8e07a04db23e549a3f9c9a80d3ca
RDMA/uverbs: Add support for UCAPs in context creation

Add support for file descriptor array attribute for GET_CONTEXT
commands.

Check that the file descriptor (fd) array represents fds for valid UCAPs.
Store the enabled UCAPs from the fd array as a bitmask in ib_ucontext.

Signed-off-by: Chiara Meiohas <cmeiohas@nvidia.com>
Link: https://patch.msgid.link/ebfb30bc947e2259b193c96a319c80e82599045b.1741261611.git.leon@kernel.org
Reviewed-by: Yishai Hadas <yishaih@nvidia.com>
Signed-off-by: Leon Romanovsky <leon@kernel.org>
drivers/infiniband/core/uverbs_cmd.c
drivers/infiniband/core/uverbs_std_types_device.c
include/rdma/ib_verbs.h
include/uapi/rdma/ib_user_ioctl_cmds.h