aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/infiniband/core/uverbs_std_types.c
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 /drivers/infiniband/core/uverbs_std_types.c
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 'drivers/infiniband/core/uverbs_std_types.c')
-rw-r--r--drivers/infiniband/core/uverbs_std_types.c10
1 files changed, 0 insertions, 10 deletions
diff --git a/drivers/infiniband/core/uverbs_std_types.c b/drivers/infiniband/core/uverbs_std_types.c
index 4fedf59ec396..569f48bd821e 100644
--- a/drivers/infiniband/core/uverbs_std_types.c
+++ b/drivers/infiniband/core/uverbs_std_types.c
@@ -144,12 +144,6 @@ static int uverbs_free_srq(struct ib_uobject *uobject,
return ret;
}
-static int uverbs_free_mr(struct ib_uobject *uobject,
- enum rdma_remove_reason why)
-{
- return ib_dereg_mr((struct ib_mr *)uobject->object);
-}
-
static int uverbs_free_xrcd(struct ib_uobject *uobject,
enum rdma_remove_reason why)
{
@@ -265,10 +259,6 @@ DECLARE_UVERBS_NAMED_OBJECT(UVERBS_OBJECT_QP,
DECLARE_UVERBS_NAMED_OBJECT(UVERBS_OBJECT_MW,
&UVERBS_TYPE_ALLOC_IDR(0, uverbs_free_mw));
-DECLARE_UVERBS_NAMED_OBJECT(UVERBS_OBJECT_MR,
- /* 1 is used in order to free the MR after all the MWs */
- &UVERBS_TYPE_ALLOC_IDR(1, uverbs_free_mr));
-
DECLARE_UVERBS_NAMED_OBJECT(UVERBS_OBJECT_SRQ,
&UVERBS_TYPE_ALLOC_IDR_SZ(sizeof(struct ib_usrq_object), 0,
uverbs_free_srq));