aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/include/rdma
diff options
context:
space:
mode:
authorMaor Gottlieb <maorg@mellanox.com>2020-07-06 15:27:15 +0300
committerJason Gunthorpe <jgg@nvidia.com>2020-07-06 19:32:23 -0300
commitb73efcb26e2c6d66797c57bed8df13c3718c58cb (patch)
tree2f686ea30bc28a3098b73d18ee97358aa689a857 /include/rdma
parentRDMA/mlx5: Get XRCD number directly for the internal use (diff)
downloadwireguard-linux-b73efcb26e2c6d66797c57bed8df13c3718c58cb.tar.xz
wireguard-linux-b73efcb26e2c6d66797c57bed8df13c3718c58cb.zip
RDMA/core: Clean ib_alloc_xrcd() and reuse it to allocate XRC domain
ib_alloc_xrcd() already does the required initialization, so move the uverbs to call it and save code duplication, while cleaning the function argument lists of that function. Link: https://lore.kernel.org/r/20200706122716.647338-3-leon@kernel.org Signed-off-by: Maor Gottlieb <maorg@mellanox.com> Signed-off-by: Leon Romanovsky <leonro@mellanox.com> Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
Diffstat (limited to 'include/rdma')
-rw-r--r--include/rdma/ib_verbs.h18
1 files changed, 3 insertions, 15 deletions
diff --git a/include/rdma/ib_verbs.h b/include/rdma/ib_verbs.h
index 204ec7516ef5..db6f78c5394f 100644
--- a/include/rdma/ib_verbs.h
+++ b/include/rdma/ib_verbs.h
@@ -4321,21 +4321,9 @@ int ib_attach_mcast(struct ib_qp *qp, union ib_gid *gid, u16 lid);
*/
int ib_detach_mcast(struct ib_qp *qp, union ib_gid *gid, u16 lid);
-/**
- * ib_alloc_xrcd - Allocates an XRC domain.
- * @device: The device on which to allocate the XRC domain.
- * @caller: Module name for kernel consumers
- */
-struct ib_xrcd *__ib_alloc_xrcd(struct ib_device *device, const char *caller);
-#define ib_alloc_xrcd(device) \
- __ib_alloc_xrcd((device), KBUILD_MODNAME)
-
-/**
- * ib_dealloc_xrcd - Deallocates an XRC domain.
- * @xrcd: The XRC domain to deallocate.
- * @udata: Valid user data or NULL for kernel object
- */
-int ib_dealloc_xrcd(struct ib_xrcd *xrcd, struct ib_udata *udata);
+struct ib_xrcd *ib_alloc_xrcd_user(struct ib_device *device,
+ struct inode *inode, struct ib_udata *udata);
+int ib_dealloc_xrcd_user(struct ib_xrcd *xrcd, struct ib_udata *udata);
static inline int ib_check_mr_access(int flags)
{