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>
This commit is contained in:
Chiara Meiohas
2025-03-06 13:51:28 +02:00
committed by Leon Romanovsky
parent cf7174e898
commit fe9d7822ba
4 changed files with 25 additions and 0 deletions

View File

@@ -1530,6 +1530,7 @@ struct ib_ucontext {
struct ib_uverbs_file *ufile;
struct ib_rdmacg_object cg_obj;
u64 enabled_caps;
/*
* Implementation details of the RDMA core, don't use in drivers:
*/