RDMA/uverbs: Export XRC domains to user space
Allow user space to create XRC domains. Because XRCDs are expected to be shared among multiple processes, we use inodes to identify an XRCD. Based on patches by Jack Morgenstein <jackm@dev.mellanox.co.il> Signed-off-by: Sean Hefty <sean.hefty@intel.com> Signed-off-by: Roland Dreier <roland@purestorage.com>
This commit is contained in:

committed by
Roland Dreier

parent
d3d72d909e
commit
53d0bd1e7f
@@ -81,7 +81,9 @@ enum {
|
||||
IB_USER_VERBS_CMD_MODIFY_SRQ,
|
||||
IB_USER_VERBS_CMD_QUERY_SRQ,
|
||||
IB_USER_VERBS_CMD_DESTROY_SRQ,
|
||||
IB_USER_VERBS_CMD_POST_SRQ_RECV
|
||||
IB_USER_VERBS_CMD_POST_SRQ_RECV,
|
||||
IB_USER_VERBS_CMD_OPEN_XRCD,
|
||||
IB_USER_VERBS_CMD_CLOSE_XRCD
|
||||
};
|
||||
|
||||
/*
|
||||
@@ -222,6 +224,21 @@ struct ib_uverbs_dealloc_pd {
|
||||
__u32 pd_handle;
|
||||
};
|
||||
|
||||
struct ib_uverbs_open_xrcd {
|
||||
__u64 response;
|
||||
__u32 fd;
|
||||
__u32 oflags;
|
||||
__u64 driver_data[0];
|
||||
};
|
||||
|
||||
struct ib_uverbs_open_xrcd_resp {
|
||||
__u32 xrcd_handle;
|
||||
};
|
||||
|
||||
struct ib_uverbs_close_xrcd {
|
||||
__u32 xrcd_handle;
|
||||
};
|
||||
|
||||
struct ib_uverbs_reg_mr {
|
||||
__u64 response;
|
||||
__u64 start;
|
||||
|
@@ -851,6 +851,7 @@ struct ib_ucontext {
|
||||
struct list_head qp_list;
|
||||
struct list_head srq_list;
|
||||
struct list_head ah_list;
|
||||
struct list_head xrcd_list;
|
||||
int closing;
|
||||
};
|
||||
|
||||
@@ -881,6 +882,7 @@ struct ib_pd {
|
||||
struct ib_xrcd {
|
||||
struct ib_device *device;
|
||||
atomic_t usecnt; /* count all exposed resources */
|
||||
struct inode *inode;
|
||||
|
||||
struct mutex tgt_qp_mutex;
|
||||
struct list_head tgt_qp_list;
|
||||
|
Reference in New Issue
Block a user