aboutsummaryrefslogtreecommitdiffstats
path: root/include/rdma/ib_verbs.h
diff options
context:
space:
mode:
authorAriel Levkovich <lariel@mellanox.com>2018-04-05 18:53:25 +0300
committerJason Gunthorpe <jgg@mellanox.com>2018-04-05 11:16:39 -0600
commitbe934cca9e987e73eb20e3c80731a9580d5acc79 (patch)
tree5f86dc099337c73984135db42a3ec003416b5ca8 /include/rdma/ib_verbs.h
parentIB/uverbs: Add alloc/free dm uverbs ioctl support (diff)
downloadlinux-dev-be934cca9e987e73eb20e3c80731a9580d5acc79.tar.xz
linux-dev-be934cca9e987e73eb20e3c80731a9580d5acc79.zip
IB/uverbs: Add device memory registration ioctl support
Adding new ioctl method for the MR object - REG_DM_MR. This command can be used by users to register an allocated device memory buffer as an MR and receive lkey and rkey to be used within work requests. It is added as a new method under the MR object and using a new ib_device callback - reg_dm_mr. The command creates a standard ib_mr object which represents the registered memory. Signed-off-by: Ariel Levkovich <lariel@mellanox.com> Signed-off-by: Leon Romanovsky <leonro@mellanox.com> Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
Diffstat (limited to 'include/rdma/ib_verbs.h')
-rw-r--r--include/rdma/ib_verbs.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/include/rdma/ib_verbs.h b/include/rdma/ib_verbs.h
index 6806c4f5657a..4bd24c48b1ad 100644
--- a/include/rdma/ib_verbs.h
+++ b/include/rdma/ib_verbs.h
@@ -321,6 +321,12 @@ struct ib_cq_caps {
u16 max_cq_moderation_period;
};
+struct ib_dm_mr_attr {
+ u64 length;
+ u64 offset;
+ u32 access_flags;
+};
+
struct ib_dm_alloc_attr {
u64 length;
u32 alignment;
@@ -1797,6 +1803,8 @@ struct ib_mr {
struct list_head qp_entry; /* FR */
};
+ struct ib_dm *dm;
+
/*
* Implementation details of the RDMA core, don't use in drivers:
*/
@@ -2444,6 +2452,9 @@ struct ib_device {
struct ib_dm_alloc_attr *attr,
struct uverbs_attr_bundle *attrs);
int (*dealloc_dm)(struct ib_dm *dm);
+ struct ib_mr * (*reg_dm_mr)(struct ib_pd *pd, struct ib_dm *dm,
+ struct ib_dm_mr_attr *attr,
+ struct uverbs_attr_bundle *attrs);
/**
* rdma netdev operation
*