1 /****************************************************************************
2  ****************************************************************************
3  ***
4  ***   This header was automatically generated from a Linux kernel header
5  ***   of the same name, to make information necessary for userspace to
6  ***   call into the kernel available to libc.  It contains only constants,
7  ***   structures, and macros generated from the original header, and thus,
8  ***   contains no copyrightable information.
9  ***
10  ***   To edit the content of this header, modify the corresponding
11  ***   source file (e.g. under external/kernel-headers/original/) then
12  ***   run bionic/libc/kernel/tools/update_all.py
13  ***
14  ***   Any manual change here will be lost the next time this script will
15  ***   be run. You've been warned!
16  ***
17  ****************************************************************************
18  ****************************************************************************/
19 #ifndef IB_USER_IOCTL_CMDS_H
20 #define IB_USER_IOCTL_CMDS_H
21 #define UVERBS_ID_NS_MASK 0xF000
22 #define UVERBS_ID_NS_SHIFT 12
23 #define UVERBS_UDATA_DRIVER_DATA_NS 1
24 #define UVERBS_UDATA_DRIVER_DATA_FLAG (1UL << UVERBS_ID_NS_SHIFT)
25 enum uverbs_default_objects {
26   UVERBS_OBJECT_DEVICE,
27   UVERBS_OBJECT_PD,
28   UVERBS_OBJECT_COMP_CHANNEL,
29   UVERBS_OBJECT_CQ,
30   UVERBS_OBJECT_QP,
31   UVERBS_OBJECT_SRQ,
32   UVERBS_OBJECT_AH,
33   UVERBS_OBJECT_MR,
34   UVERBS_OBJECT_MW,
35   UVERBS_OBJECT_FLOW,
36   UVERBS_OBJECT_XRCD,
37   UVERBS_OBJECT_RWQ_IND_TBL,
38   UVERBS_OBJECT_WQ,
39   UVERBS_OBJECT_FLOW_ACTION,
40   UVERBS_OBJECT_DM,
41   UVERBS_OBJECT_COUNTERS,
42   UVERBS_OBJECT_ASYNC_EVENT,
43 };
44 enum {
45   UVERBS_ATTR_UHW_IN = UVERBS_UDATA_DRIVER_DATA_FLAG,
46   UVERBS_ATTR_UHW_OUT,
47 };
48 enum uverbs_methods_device {
49   UVERBS_METHOD_INVOKE_WRITE,
50   UVERBS_METHOD_INFO_HANDLES,
51   UVERBS_METHOD_QUERY_PORT,
52   UVERBS_METHOD_GET_CONTEXT,
53 };
54 enum uverbs_attrs_invoke_write_cmd_attr_ids {
55   UVERBS_ATTR_CORE_IN,
56   UVERBS_ATTR_CORE_OUT,
57   UVERBS_ATTR_WRITE_CMD,
58 };
59 enum uverbs_attrs_query_port_cmd_attr_ids {
60   UVERBS_ATTR_QUERY_PORT_PORT_NUM,
61   UVERBS_ATTR_QUERY_PORT_RESP,
62 };
63 enum uverbs_attrs_get_context_attr_ids {
64   UVERBS_ATTR_GET_CONTEXT_NUM_COMP_VECTORS,
65   UVERBS_ATTR_GET_CONTEXT_CORE_SUPPORT,
66 };
67 enum uverbs_attrs_create_cq_cmd_attr_ids {
68   UVERBS_ATTR_CREATE_CQ_HANDLE,
69   UVERBS_ATTR_CREATE_CQ_CQE,
70   UVERBS_ATTR_CREATE_CQ_USER_HANDLE,
71   UVERBS_ATTR_CREATE_CQ_COMP_CHANNEL,
72   UVERBS_ATTR_CREATE_CQ_COMP_VECTOR,
73   UVERBS_ATTR_CREATE_CQ_FLAGS,
74   UVERBS_ATTR_CREATE_CQ_RESP_CQE,
75 };
76 enum uverbs_attrs_destroy_cq_cmd_attr_ids {
77   UVERBS_ATTR_DESTROY_CQ_HANDLE,
78   UVERBS_ATTR_DESTROY_CQ_RESP,
79 };
80 enum uverbs_attrs_create_flow_action_esp {
81   UVERBS_ATTR_CREATE_FLOW_ACTION_ESP_HANDLE,
82   UVERBS_ATTR_FLOW_ACTION_ESP_ATTRS,
83   UVERBS_ATTR_FLOW_ACTION_ESP_ESN,
84   UVERBS_ATTR_FLOW_ACTION_ESP_KEYMAT,
85   UVERBS_ATTR_FLOW_ACTION_ESP_REPLAY,
86   UVERBS_ATTR_FLOW_ACTION_ESP_ENCAP,
87 };
88 enum uverbs_attrs_modify_flow_action_esp {
89   UVERBS_ATTR_MODIFY_FLOW_ACTION_ESP_HANDLE = UVERBS_ATTR_CREATE_FLOW_ACTION_ESP_HANDLE,
90 };
91 enum uverbs_attrs_destroy_flow_action_esp {
92   UVERBS_ATTR_DESTROY_FLOW_ACTION_HANDLE,
93 };
94 enum uverbs_methods_cq {
95   UVERBS_METHOD_CQ_CREATE,
96   UVERBS_METHOD_CQ_DESTROY,
97 };
98 enum uverbs_methods_actions_flow_action_ops {
99   UVERBS_METHOD_FLOW_ACTION_ESP_CREATE,
100   UVERBS_METHOD_FLOW_ACTION_DESTROY,
101   UVERBS_METHOD_FLOW_ACTION_ESP_MODIFY,
102 };
103 enum uverbs_attrs_alloc_dm_cmd_attr_ids {
104   UVERBS_ATTR_ALLOC_DM_HANDLE,
105   UVERBS_ATTR_ALLOC_DM_LENGTH,
106   UVERBS_ATTR_ALLOC_DM_ALIGNMENT,
107 };
108 enum uverbs_attrs_free_dm_cmd_attr_ids {
109   UVERBS_ATTR_FREE_DM_HANDLE,
110 };
111 enum uverbs_methods_dm {
112   UVERBS_METHOD_DM_ALLOC,
113   UVERBS_METHOD_DM_FREE,
114 };
115 enum uverbs_attrs_reg_dm_mr_cmd_attr_ids {
116   UVERBS_ATTR_REG_DM_MR_HANDLE,
117   UVERBS_ATTR_REG_DM_MR_OFFSET,
118   UVERBS_ATTR_REG_DM_MR_LENGTH,
119   UVERBS_ATTR_REG_DM_MR_PD_HANDLE,
120   UVERBS_ATTR_REG_DM_MR_ACCESS_FLAGS,
121   UVERBS_ATTR_REG_DM_MR_DM_HANDLE,
122   UVERBS_ATTR_REG_DM_MR_RESP_LKEY,
123   UVERBS_ATTR_REG_DM_MR_RESP_RKEY,
124 };
125 enum uverbs_methods_mr {
126   UVERBS_METHOD_DM_MR_REG,
127   UVERBS_METHOD_MR_DESTROY,
128   UVERBS_METHOD_ADVISE_MR,
129 };
130 enum uverbs_attrs_mr_destroy_ids {
131   UVERBS_ATTR_DESTROY_MR_HANDLE,
132 };
133 enum uverbs_attrs_advise_mr_cmd_attr_ids {
134   UVERBS_ATTR_ADVISE_MR_PD_HANDLE,
135   UVERBS_ATTR_ADVISE_MR_ADVICE,
136   UVERBS_ATTR_ADVISE_MR_FLAGS,
137   UVERBS_ATTR_ADVISE_MR_SGE_LIST,
138 };
139 enum uverbs_attrs_create_counters_cmd_attr_ids {
140   UVERBS_ATTR_CREATE_COUNTERS_HANDLE,
141 };
142 enum uverbs_attrs_destroy_counters_cmd_attr_ids {
143   UVERBS_ATTR_DESTROY_COUNTERS_HANDLE,
144 };
145 enum uverbs_attrs_read_counters_cmd_attr_ids {
146   UVERBS_ATTR_READ_COUNTERS_HANDLE,
147   UVERBS_ATTR_READ_COUNTERS_BUFF,
148   UVERBS_ATTR_READ_COUNTERS_FLAGS,
149 };
150 enum uverbs_methods_actions_counters_ops {
151   UVERBS_METHOD_COUNTERS_CREATE,
152   UVERBS_METHOD_COUNTERS_DESTROY,
153   UVERBS_METHOD_COUNTERS_READ,
154 };
155 enum uverbs_attrs_info_handles_id {
156   UVERBS_ATTR_INFO_OBJECT_ID,
157   UVERBS_ATTR_INFO_TOTAL_HANDLES,
158   UVERBS_ATTR_INFO_HANDLES_LIST,
159 };
160 enum uverbs_methods_pd {
161   UVERBS_METHOD_PD_DESTROY,
162 };
163 enum uverbs_attrs_pd_destroy_ids {
164   UVERBS_ATTR_DESTROY_PD_HANDLE,
165 };
166 enum uverbs_methods_mw {
167   UVERBS_METHOD_MW_DESTROY,
168 };
169 enum uverbs_attrs_mw_destroy_ids {
170   UVERBS_ATTR_DESTROY_MW_HANDLE,
171 };
172 enum uverbs_methods_xrcd {
173   UVERBS_METHOD_XRCD_DESTROY,
174 };
175 enum uverbs_attrs_xrcd_destroy_ids {
176   UVERBS_ATTR_DESTROY_XRCD_HANDLE,
177 };
178 enum uverbs_methods_ah {
179   UVERBS_METHOD_AH_DESTROY,
180 };
181 enum uverbs_attrs_ah_destroy_ids {
182   UVERBS_ATTR_DESTROY_AH_HANDLE,
183 };
184 enum uverbs_methods_rwq_ind_tbl {
185   UVERBS_METHOD_RWQ_IND_TBL_DESTROY,
186 };
187 enum uverbs_attrs_rwq_ind_tbl_destroy_ids {
188   UVERBS_ATTR_DESTROY_RWQ_IND_TBL_HANDLE,
189 };
190 enum uverbs_methods_flow {
191   UVERBS_METHOD_FLOW_DESTROY,
192 };
193 enum uverbs_attrs_flow_destroy_ids {
194   UVERBS_ATTR_DESTROY_FLOW_HANDLE,
195 };
196 enum uverbs_method_async_event {
197   UVERBS_METHOD_ASYNC_EVENT_ALLOC,
198 };
199 enum uverbs_attrs_async_event_create {
200   UVERBS_ATTR_ASYNC_EVENT_ALLOC_FD_HANDLE,
201 };
202 #endif
203