1 /* 2 * This file is auto-generated. Modifications will be lost. 3 * 4 * See https://android.googlesource.com/platform/bionic/+/master/libc/kernel/ 5 * for more information. 6 */ 7 #ifndef IB_USER_IOCTL_CMDS_H 8 #define IB_USER_IOCTL_CMDS_H 9 #define UVERBS_ID_NS_MASK 0xF000 10 #define UVERBS_ID_NS_SHIFT 12 11 #define UVERBS_UDATA_DRIVER_DATA_NS 1 12 #define UVERBS_UDATA_DRIVER_DATA_FLAG (1UL << UVERBS_ID_NS_SHIFT) 13 enum uverbs_default_objects { 14 UVERBS_OBJECT_DEVICE, 15 UVERBS_OBJECT_PD, 16 UVERBS_OBJECT_COMP_CHANNEL, 17 UVERBS_OBJECT_CQ, 18 UVERBS_OBJECT_QP, 19 UVERBS_OBJECT_SRQ, 20 UVERBS_OBJECT_AH, 21 UVERBS_OBJECT_MR, 22 UVERBS_OBJECT_MW, 23 UVERBS_OBJECT_FLOW, 24 UVERBS_OBJECT_XRCD, 25 UVERBS_OBJECT_RWQ_IND_TBL, 26 UVERBS_OBJECT_WQ, 27 UVERBS_OBJECT_FLOW_ACTION, 28 UVERBS_OBJECT_DM, 29 UVERBS_OBJECT_COUNTERS, 30 UVERBS_OBJECT_ASYNC_EVENT, 31 }; 32 enum { 33 UVERBS_ATTR_UHW_IN = UVERBS_UDATA_DRIVER_DATA_FLAG, 34 UVERBS_ATTR_UHW_OUT, 35 }; 36 enum uverbs_methods_device { 37 UVERBS_METHOD_INVOKE_WRITE, 38 UVERBS_METHOD_INFO_HANDLES, 39 UVERBS_METHOD_QUERY_PORT, 40 UVERBS_METHOD_GET_CONTEXT, 41 UVERBS_METHOD_QUERY_CONTEXT, 42 UVERBS_METHOD_QUERY_GID_TABLE, 43 UVERBS_METHOD_QUERY_GID_ENTRY, 44 }; 45 enum uverbs_attrs_invoke_write_cmd_attr_ids { 46 UVERBS_ATTR_CORE_IN, 47 UVERBS_ATTR_CORE_OUT, 48 UVERBS_ATTR_WRITE_CMD, 49 }; 50 enum uverbs_attrs_query_port_cmd_attr_ids { 51 UVERBS_ATTR_QUERY_PORT_PORT_NUM, 52 UVERBS_ATTR_QUERY_PORT_RESP, 53 }; 54 enum uverbs_attrs_get_context_attr_ids { 55 UVERBS_ATTR_GET_CONTEXT_NUM_COMP_VECTORS, 56 UVERBS_ATTR_GET_CONTEXT_CORE_SUPPORT, 57 }; 58 enum uverbs_attrs_query_context_attr_ids { 59 UVERBS_ATTR_QUERY_CONTEXT_NUM_COMP_VECTORS, 60 UVERBS_ATTR_QUERY_CONTEXT_CORE_SUPPORT, 61 }; 62 enum uverbs_attrs_create_cq_cmd_attr_ids { 63 UVERBS_ATTR_CREATE_CQ_HANDLE, 64 UVERBS_ATTR_CREATE_CQ_CQE, 65 UVERBS_ATTR_CREATE_CQ_USER_HANDLE, 66 UVERBS_ATTR_CREATE_CQ_COMP_CHANNEL, 67 UVERBS_ATTR_CREATE_CQ_COMP_VECTOR, 68 UVERBS_ATTR_CREATE_CQ_FLAGS, 69 UVERBS_ATTR_CREATE_CQ_RESP_CQE, 70 UVERBS_ATTR_CREATE_CQ_EVENT_FD, 71 }; 72 enum uverbs_attrs_destroy_cq_cmd_attr_ids { 73 UVERBS_ATTR_DESTROY_CQ_HANDLE, 74 UVERBS_ATTR_DESTROY_CQ_RESP, 75 }; 76 enum uverbs_attrs_create_flow_action_esp { 77 UVERBS_ATTR_CREATE_FLOW_ACTION_ESP_HANDLE, 78 UVERBS_ATTR_FLOW_ACTION_ESP_ATTRS, 79 UVERBS_ATTR_FLOW_ACTION_ESP_ESN, 80 UVERBS_ATTR_FLOW_ACTION_ESP_KEYMAT, 81 UVERBS_ATTR_FLOW_ACTION_ESP_REPLAY, 82 UVERBS_ATTR_FLOW_ACTION_ESP_ENCAP, 83 }; 84 enum uverbs_attrs_modify_flow_action_esp { 85 UVERBS_ATTR_MODIFY_FLOW_ACTION_ESP_HANDLE = UVERBS_ATTR_CREATE_FLOW_ACTION_ESP_HANDLE, 86 }; 87 enum uverbs_attrs_destroy_flow_action_esp { 88 UVERBS_ATTR_DESTROY_FLOW_ACTION_HANDLE, 89 }; 90 enum uverbs_attrs_create_qp_cmd_attr_ids { 91 UVERBS_ATTR_CREATE_QP_HANDLE, 92 UVERBS_ATTR_CREATE_QP_XRCD_HANDLE, 93 UVERBS_ATTR_CREATE_QP_PD_HANDLE, 94 UVERBS_ATTR_CREATE_QP_SRQ_HANDLE, 95 UVERBS_ATTR_CREATE_QP_SEND_CQ_HANDLE, 96 UVERBS_ATTR_CREATE_QP_RECV_CQ_HANDLE, 97 UVERBS_ATTR_CREATE_QP_IND_TABLE_HANDLE, 98 UVERBS_ATTR_CREATE_QP_USER_HANDLE, 99 UVERBS_ATTR_CREATE_QP_CAP, 100 UVERBS_ATTR_CREATE_QP_TYPE, 101 UVERBS_ATTR_CREATE_QP_FLAGS, 102 UVERBS_ATTR_CREATE_QP_SOURCE_QPN, 103 UVERBS_ATTR_CREATE_QP_EVENT_FD, 104 UVERBS_ATTR_CREATE_QP_RESP_CAP, 105 UVERBS_ATTR_CREATE_QP_RESP_QP_NUM, 106 }; 107 enum uverbs_attrs_destroy_qp_cmd_attr_ids { 108 UVERBS_ATTR_DESTROY_QP_HANDLE, 109 UVERBS_ATTR_DESTROY_QP_RESP, 110 }; 111 enum uverbs_methods_qp { 112 UVERBS_METHOD_QP_CREATE, 113 UVERBS_METHOD_QP_DESTROY, 114 }; 115 enum uverbs_attrs_create_srq_cmd_attr_ids { 116 UVERBS_ATTR_CREATE_SRQ_HANDLE, 117 UVERBS_ATTR_CREATE_SRQ_PD_HANDLE, 118 UVERBS_ATTR_CREATE_SRQ_XRCD_HANDLE, 119 UVERBS_ATTR_CREATE_SRQ_CQ_HANDLE, 120 UVERBS_ATTR_CREATE_SRQ_USER_HANDLE, 121 UVERBS_ATTR_CREATE_SRQ_MAX_WR, 122 UVERBS_ATTR_CREATE_SRQ_MAX_SGE, 123 UVERBS_ATTR_CREATE_SRQ_LIMIT, 124 UVERBS_ATTR_CREATE_SRQ_MAX_NUM_TAGS, 125 UVERBS_ATTR_CREATE_SRQ_TYPE, 126 UVERBS_ATTR_CREATE_SRQ_EVENT_FD, 127 UVERBS_ATTR_CREATE_SRQ_RESP_MAX_WR, 128 UVERBS_ATTR_CREATE_SRQ_RESP_MAX_SGE, 129 UVERBS_ATTR_CREATE_SRQ_RESP_SRQ_NUM, 130 }; 131 enum uverbs_attrs_destroy_srq_cmd_attr_ids { 132 UVERBS_ATTR_DESTROY_SRQ_HANDLE, 133 UVERBS_ATTR_DESTROY_SRQ_RESP, 134 }; 135 enum uverbs_methods_srq { 136 UVERBS_METHOD_SRQ_CREATE, 137 UVERBS_METHOD_SRQ_DESTROY, 138 }; 139 enum uverbs_methods_cq { 140 UVERBS_METHOD_CQ_CREATE, 141 UVERBS_METHOD_CQ_DESTROY, 142 }; 143 enum uverbs_attrs_create_wq_cmd_attr_ids { 144 UVERBS_ATTR_CREATE_WQ_HANDLE, 145 UVERBS_ATTR_CREATE_WQ_PD_HANDLE, 146 UVERBS_ATTR_CREATE_WQ_CQ_HANDLE, 147 UVERBS_ATTR_CREATE_WQ_USER_HANDLE, 148 UVERBS_ATTR_CREATE_WQ_TYPE, 149 UVERBS_ATTR_CREATE_WQ_EVENT_FD, 150 UVERBS_ATTR_CREATE_WQ_MAX_WR, 151 UVERBS_ATTR_CREATE_WQ_MAX_SGE, 152 UVERBS_ATTR_CREATE_WQ_FLAGS, 153 UVERBS_ATTR_CREATE_WQ_RESP_MAX_WR, 154 UVERBS_ATTR_CREATE_WQ_RESP_MAX_SGE, 155 UVERBS_ATTR_CREATE_WQ_RESP_WQ_NUM, 156 }; 157 enum uverbs_attrs_destroy_wq_cmd_attr_ids { 158 UVERBS_ATTR_DESTROY_WQ_HANDLE, 159 UVERBS_ATTR_DESTROY_WQ_RESP, 160 }; 161 enum uverbs_methods_wq { 162 UVERBS_METHOD_WQ_CREATE, 163 UVERBS_METHOD_WQ_DESTROY, 164 }; 165 enum uverbs_methods_actions_flow_action_ops { 166 UVERBS_METHOD_FLOW_ACTION_ESP_CREATE, 167 UVERBS_METHOD_FLOW_ACTION_DESTROY, 168 UVERBS_METHOD_FLOW_ACTION_ESP_MODIFY, 169 }; 170 enum uverbs_attrs_alloc_dm_cmd_attr_ids { 171 UVERBS_ATTR_ALLOC_DM_HANDLE, 172 UVERBS_ATTR_ALLOC_DM_LENGTH, 173 UVERBS_ATTR_ALLOC_DM_ALIGNMENT, 174 }; 175 enum uverbs_attrs_free_dm_cmd_attr_ids { 176 UVERBS_ATTR_FREE_DM_HANDLE, 177 }; 178 enum uverbs_methods_dm { 179 UVERBS_METHOD_DM_ALLOC, 180 UVERBS_METHOD_DM_FREE, 181 }; 182 enum uverbs_attrs_reg_dm_mr_cmd_attr_ids { 183 UVERBS_ATTR_REG_DM_MR_HANDLE, 184 UVERBS_ATTR_REG_DM_MR_OFFSET, 185 UVERBS_ATTR_REG_DM_MR_LENGTH, 186 UVERBS_ATTR_REG_DM_MR_PD_HANDLE, 187 UVERBS_ATTR_REG_DM_MR_ACCESS_FLAGS, 188 UVERBS_ATTR_REG_DM_MR_DM_HANDLE, 189 UVERBS_ATTR_REG_DM_MR_RESP_LKEY, 190 UVERBS_ATTR_REG_DM_MR_RESP_RKEY, 191 }; 192 enum uverbs_methods_mr { 193 UVERBS_METHOD_DM_MR_REG, 194 UVERBS_METHOD_MR_DESTROY, 195 UVERBS_METHOD_ADVISE_MR, 196 UVERBS_METHOD_QUERY_MR, 197 UVERBS_METHOD_REG_DMABUF_MR, 198 }; 199 enum uverbs_attrs_mr_destroy_ids { 200 UVERBS_ATTR_DESTROY_MR_HANDLE, 201 }; 202 enum uverbs_attrs_advise_mr_cmd_attr_ids { 203 UVERBS_ATTR_ADVISE_MR_PD_HANDLE, 204 UVERBS_ATTR_ADVISE_MR_ADVICE, 205 UVERBS_ATTR_ADVISE_MR_FLAGS, 206 UVERBS_ATTR_ADVISE_MR_SGE_LIST, 207 }; 208 enum uverbs_attrs_query_mr_cmd_attr_ids { 209 UVERBS_ATTR_QUERY_MR_HANDLE, 210 UVERBS_ATTR_QUERY_MR_RESP_LKEY, 211 UVERBS_ATTR_QUERY_MR_RESP_RKEY, 212 UVERBS_ATTR_QUERY_MR_RESP_LENGTH, 213 UVERBS_ATTR_QUERY_MR_RESP_IOVA, 214 }; 215 enum uverbs_attrs_reg_dmabuf_mr_cmd_attr_ids { 216 UVERBS_ATTR_REG_DMABUF_MR_HANDLE, 217 UVERBS_ATTR_REG_DMABUF_MR_PD_HANDLE, 218 UVERBS_ATTR_REG_DMABUF_MR_OFFSET, 219 UVERBS_ATTR_REG_DMABUF_MR_LENGTH, 220 UVERBS_ATTR_REG_DMABUF_MR_IOVA, 221 UVERBS_ATTR_REG_DMABUF_MR_FD, 222 UVERBS_ATTR_REG_DMABUF_MR_ACCESS_FLAGS, 223 UVERBS_ATTR_REG_DMABUF_MR_RESP_LKEY, 224 UVERBS_ATTR_REG_DMABUF_MR_RESP_RKEY, 225 }; 226 enum uverbs_attrs_create_counters_cmd_attr_ids { 227 UVERBS_ATTR_CREATE_COUNTERS_HANDLE, 228 }; 229 enum uverbs_attrs_destroy_counters_cmd_attr_ids { 230 UVERBS_ATTR_DESTROY_COUNTERS_HANDLE, 231 }; 232 enum uverbs_attrs_read_counters_cmd_attr_ids { 233 UVERBS_ATTR_READ_COUNTERS_HANDLE, 234 UVERBS_ATTR_READ_COUNTERS_BUFF, 235 UVERBS_ATTR_READ_COUNTERS_FLAGS, 236 }; 237 enum uverbs_methods_actions_counters_ops { 238 UVERBS_METHOD_COUNTERS_CREATE, 239 UVERBS_METHOD_COUNTERS_DESTROY, 240 UVERBS_METHOD_COUNTERS_READ, 241 }; 242 enum uverbs_attrs_info_handles_id { 243 UVERBS_ATTR_INFO_OBJECT_ID, 244 UVERBS_ATTR_INFO_TOTAL_HANDLES, 245 UVERBS_ATTR_INFO_HANDLES_LIST, 246 }; 247 enum uverbs_methods_pd { 248 UVERBS_METHOD_PD_DESTROY, 249 }; 250 enum uverbs_attrs_pd_destroy_ids { 251 UVERBS_ATTR_DESTROY_PD_HANDLE, 252 }; 253 enum uverbs_methods_mw { 254 UVERBS_METHOD_MW_DESTROY, 255 }; 256 enum uverbs_attrs_mw_destroy_ids { 257 UVERBS_ATTR_DESTROY_MW_HANDLE, 258 }; 259 enum uverbs_methods_xrcd { 260 UVERBS_METHOD_XRCD_DESTROY, 261 }; 262 enum uverbs_attrs_xrcd_destroy_ids { 263 UVERBS_ATTR_DESTROY_XRCD_HANDLE, 264 }; 265 enum uverbs_methods_ah { 266 UVERBS_METHOD_AH_DESTROY, 267 }; 268 enum uverbs_attrs_ah_destroy_ids { 269 UVERBS_ATTR_DESTROY_AH_HANDLE, 270 }; 271 enum uverbs_methods_rwq_ind_tbl { 272 UVERBS_METHOD_RWQ_IND_TBL_DESTROY, 273 }; 274 enum uverbs_attrs_rwq_ind_tbl_destroy_ids { 275 UVERBS_ATTR_DESTROY_RWQ_IND_TBL_HANDLE, 276 }; 277 enum uverbs_methods_flow { 278 UVERBS_METHOD_FLOW_DESTROY, 279 }; 280 enum uverbs_attrs_flow_destroy_ids { 281 UVERBS_ATTR_DESTROY_FLOW_HANDLE, 282 }; 283 enum uverbs_method_async_event { 284 UVERBS_METHOD_ASYNC_EVENT_ALLOC, 285 }; 286 enum uverbs_attrs_async_event_create { 287 UVERBS_ATTR_ASYNC_EVENT_ALLOC_FD_HANDLE, 288 }; 289 enum uverbs_attrs_query_gid_table_cmd_attr_ids { 290 UVERBS_ATTR_QUERY_GID_TABLE_ENTRY_SIZE, 291 UVERBS_ATTR_QUERY_GID_TABLE_FLAGS, 292 UVERBS_ATTR_QUERY_GID_TABLE_RESP_ENTRIES, 293 UVERBS_ATTR_QUERY_GID_TABLE_RESP_NUM_ENTRIES, 294 }; 295 enum uverbs_attrs_query_gid_entry_cmd_attr_ids { 296 UVERBS_ATTR_QUERY_GID_ENTRY_PORT, 297 UVERBS_ATTR_QUERY_GID_ENTRY_GID_INDEX, 298 UVERBS_ATTR_QUERY_GID_ENTRY_FLAGS, 299 UVERBS_ATTR_QUERY_GID_ENTRY_RESP_ENTRY, 300 }; 301 #endif 302