History

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.

Ariel Levkovich committed 8 years ago

Commit bee76d71 parent 1d8eeb96 files · +146 −3Browse files

Showing the changes to include/uapi (1 of 6 files). Show all

Unified · Split

include/uapi/rdma/ib_user_ioctl_cmds.h+15−0
@@ -54,6 +54,7 @@ enum uverbs_default_objects { · 53 unmodified lines
5454 UVERBS_OBJECT_RWQ_IND_TBL,
5555 UVERBS_OBJECT_WQ,
5656 UVERBS_OBJECT_FLOW_ACTION,
57+ UVERBS_OBJECT_DM,
5758 };
5859
5960 enum {
@@ -100,4 +101,18 @@ enum uverbs_methods_actions_flow_action_ops { · 40 unmodified lines
100101 UVERBS_METHOD_FLOW_ACTION_ESP_MODIFY,
101102 };
102103
104+enum uverbs_attrs_alloc_dm_cmd_attr_ids {
105+ UVERBS_ATTR_ALLOC_DM_HANDLE,
106+ UVERBS_ATTR_ALLOC_DM_LENGTH,
107+ UVERBS_ATTR_ALLOC_DM_ALIGNMENT,
108+};
109+
110+enum uverbs_attrs_free_dm_cmd_attr_ids {
111+ UVERBS_ATTR_FREE_DM_HANDLE,
112+};
113+
114+enum uverbs_methods_dm {
115+ UVERBS_METHOD_DM_ALLOC,
116+ UVERBS_METHOD_DM_FREE,
117+};
103118 #endif