diff options
author | Ariel Levkovich <lariel@mellanox.com> | 2018-04-05 18:53:24 +0300 |
---|---|---|
committer | Jason Gunthorpe <jgg@mellanox.com> | 2018-04-05 11:16:39 -0600 |
commit | bee76d7ab5d270919e80e4764df7cd7e4f06ed24 (patch) | |
tree | d8ba6c8ddbc8aa781427f4c0081e8d05b47fb2d9 /include/uapi/rdma | |
parent | 1d8eeb9f6a6e0d8ac43a54fd95126044bf8d6695 (diff) | |
download | linux-bee76d7ab5d270919e80e4764df7cd7e4f06ed24.tar.gz linux-bee76d7ab5d270919e80e4764df7cd7e4f06ed24.tar.bz2 linux-bee76d7ab5d270919e80e4764df7cd7e4f06ed24.zip |
IB/uverbs: Add alloc/free dm uverbs ioctl support
This change adds uverbs support for allocation/freeing
of device memory commands.
A new uverbs object is defined of type idr to represent
and track the new resource type allocation per context.
The API requires provider driver to implement 2 new ib_device
callbacks - one for allocation and one for deallocation which
return and accept (respectively) the ib_dm object which represents
the allocated memory on the device.
The support is added via the ioctl command infrastructure
only.
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/uapi/rdma')
-rw-r--r-- | include/uapi/rdma/ib_user_ioctl_cmds.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/include/uapi/rdma/ib_user_ioctl_cmds.h b/include/uapi/rdma/ib_user_ioctl_cmds.h index 500b64a444ad..6034df2625c6 100644 --- a/include/uapi/rdma/ib_user_ioctl_cmds.h +++ b/include/uapi/rdma/ib_user_ioctl_cmds.h @@ -54,6 +54,7 @@ enum uverbs_default_objects { UVERBS_OBJECT_RWQ_IND_TBL, UVERBS_OBJECT_WQ, UVERBS_OBJECT_FLOW_ACTION, + UVERBS_OBJECT_DM, }; enum { @@ -100,4 +101,18 @@ enum uverbs_methods_actions_flow_action_ops { UVERBS_METHOD_FLOW_ACTION_ESP_MODIFY, }; +enum uverbs_attrs_alloc_dm_cmd_attr_ids { + UVERBS_ATTR_ALLOC_DM_HANDLE, + UVERBS_ATTR_ALLOC_DM_LENGTH, + UVERBS_ATTR_ALLOC_DM_ALIGNMENT, +}; + +enum uverbs_attrs_free_dm_cmd_attr_ids { + UVERBS_ATTR_FREE_DM_HANDLE, +}; + +enum uverbs_methods_dm { + UVERBS_METHOD_DM_ALLOC, + UVERBS_METHOD_DM_FREE, +}; #endif |