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 MLX5_USER_IOCTL_CMDS_H 20 #define MLX5_USER_IOCTL_CMDS_H 21 #include <linux/types.h> 22 #include <rdma/ib_user_ioctl_cmds.h> 23 enum mlx5_ib_create_flow_action_attrs { 24 MLX5_IB_ATTR_CREATE_FLOW_ACTION_FLAGS = (1U << UVERBS_ID_NS_SHIFT), 25 }; 26 enum mlx5_ib_alloc_dm_attrs { 27 MLX5_IB_ATTR_ALLOC_DM_RESP_START_OFFSET = (1U << UVERBS_ID_NS_SHIFT), 28 MLX5_IB_ATTR_ALLOC_DM_RESP_PAGE_INDEX, 29 MLX5_IB_ATTR_ALLOC_DM_REQ_TYPE, 30 }; 31 enum mlx5_ib_devx_methods { 32 MLX5_IB_METHOD_DEVX_OTHER = (1U << UVERBS_ID_NS_SHIFT), 33 MLX5_IB_METHOD_DEVX_QUERY_UAR, 34 MLX5_IB_METHOD_DEVX_QUERY_EQN, 35 MLX5_IB_METHOD_DEVX_SUBSCRIBE_EVENT, 36 }; 37 enum mlx5_ib_devx_other_attrs { 38 MLX5_IB_ATTR_DEVX_OTHER_CMD_IN = (1U << UVERBS_ID_NS_SHIFT), 39 MLX5_IB_ATTR_DEVX_OTHER_CMD_OUT, 40 }; 41 enum mlx5_ib_devx_obj_create_attrs { 42 MLX5_IB_ATTR_DEVX_OBJ_CREATE_HANDLE = (1U << UVERBS_ID_NS_SHIFT), 43 MLX5_IB_ATTR_DEVX_OBJ_CREATE_CMD_IN, 44 MLX5_IB_ATTR_DEVX_OBJ_CREATE_CMD_OUT, 45 }; 46 enum mlx5_ib_devx_query_uar_attrs { 47 MLX5_IB_ATTR_DEVX_QUERY_UAR_USER_IDX = (1U << UVERBS_ID_NS_SHIFT), 48 MLX5_IB_ATTR_DEVX_QUERY_UAR_DEV_IDX, 49 }; 50 enum mlx5_ib_devx_obj_destroy_attrs { 51 MLX5_IB_ATTR_DEVX_OBJ_DESTROY_HANDLE = (1U << UVERBS_ID_NS_SHIFT), 52 }; 53 enum mlx5_ib_devx_obj_modify_attrs { 54 MLX5_IB_ATTR_DEVX_OBJ_MODIFY_HANDLE = (1U << UVERBS_ID_NS_SHIFT), 55 MLX5_IB_ATTR_DEVX_OBJ_MODIFY_CMD_IN, 56 MLX5_IB_ATTR_DEVX_OBJ_MODIFY_CMD_OUT, 57 }; 58 enum mlx5_ib_devx_obj_query_attrs { 59 MLX5_IB_ATTR_DEVX_OBJ_QUERY_HANDLE = (1U << UVERBS_ID_NS_SHIFT), 60 MLX5_IB_ATTR_DEVX_OBJ_QUERY_CMD_IN, 61 MLX5_IB_ATTR_DEVX_OBJ_QUERY_CMD_OUT, 62 }; 63 enum mlx5_ib_devx_obj_query_async_attrs { 64 MLX5_IB_ATTR_DEVX_OBJ_QUERY_ASYNC_HANDLE = (1U << UVERBS_ID_NS_SHIFT), 65 MLX5_IB_ATTR_DEVX_OBJ_QUERY_ASYNC_CMD_IN, 66 MLX5_IB_ATTR_DEVX_OBJ_QUERY_ASYNC_FD, 67 MLX5_IB_ATTR_DEVX_OBJ_QUERY_ASYNC_WR_ID, 68 MLX5_IB_ATTR_DEVX_OBJ_QUERY_ASYNC_OUT_LEN, 69 }; 70 enum mlx5_ib_devx_subscribe_event_attrs { 71 MLX5_IB_ATTR_DEVX_SUBSCRIBE_EVENT_FD_HANDLE = (1U << UVERBS_ID_NS_SHIFT), 72 MLX5_IB_ATTR_DEVX_SUBSCRIBE_EVENT_OBJ_HANDLE, 73 MLX5_IB_ATTR_DEVX_SUBSCRIBE_EVENT_TYPE_NUM_LIST, 74 MLX5_IB_ATTR_DEVX_SUBSCRIBE_EVENT_FD_NUM, 75 MLX5_IB_ATTR_DEVX_SUBSCRIBE_EVENT_COOKIE, 76 }; 77 enum mlx5_ib_devx_query_eqn_attrs { 78 MLX5_IB_ATTR_DEVX_QUERY_EQN_USER_VEC = (1U << UVERBS_ID_NS_SHIFT), 79 MLX5_IB_ATTR_DEVX_QUERY_EQN_DEV_EQN, 80 }; 81 enum mlx5_ib_devx_obj_methods { 82 MLX5_IB_METHOD_DEVX_OBJ_CREATE = (1U << UVERBS_ID_NS_SHIFT), 83 MLX5_IB_METHOD_DEVX_OBJ_DESTROY, 84 MLX5_IB_METHOD_DEVX_OBJ_MODIFY, 85 MLX5_IB_METHOD_DEVX_OBJ_QUERY, 86 MLX5_IB_METHOD_DEVX_OBJ_ASYNC_QUERY, 87 }; 88 enum mlx5_ib_var_alloc_attrs { 89 MLX5_IB_ATTR_VAR_OBJ_ALLOC_HANDLE = (1U << UVERBS_ID_NS_SHIFT), 90 MLX5_IB_ATTR_VAR_OBJ_ALLOC_MMAP_OFFSET, 91 MLX5_IB_ATTR_VAR_OBJ_ALLOC_MMAP_LENGTH, 92 MLX5_IB_ATTR_VAR_OBJ_ALLOC_PAGE_ID, 93 }; 94 enum mlx5_ib_var_obj_destroy_attrs { 95 MLX5_IB_ATTR_VAR_OBJ_DESTROY_HANDLE = (1U << UVERBS_ID_NS_SHIFT), 96 }; 97 enum mlx5_ib_var_obj_methods { 98 MLX5_IB_METHOD_VAR_OBJ_ALLOC = (1U << UVERBS_ID_NS_SHIFT), 99 MLX5_IB_METHOD_VAR_OBJ_DESTROY, 100 }; 101 enum mlx5_ib_uar_alloc_attrs { 102 MLX5_IB_ATTR_UAR_OBJ_ALLOC_HANDLE = (1U << UVERBS_ID_NS_SHIFT), 103 MLX5_IB_ATTR_UAR_OBJ_ALLOC_TYPE, 104 MLX5_IB_ATTR_UAR_OBJ_ALLOC_MMAP_OFFSET, 105 MLX5_IB_ATTR_UAR_OBJ_ALLOC_MMAP_LENGTH, 106 MLX5_IB_ATTR_UAR_OBJ_ALLOC_PAGE_ID, 107 }; 108 enum mlx5_ib_uar_obj_destroy_attrs { 109 MLX5_IB_ATTR_UAR_OBJ_DESTROY_HANDLE = (1U << UVERBS_ID_NS_SHIFT), 110 }; 111 enum mlx5_ib_uar_obj_methods { 112 MLX5_IB_METHOD_UAR_OBJ_ALLOC = (1U << UVERBS_ID_NS_SHIFT), 113 MLX5_IB_METHOD_UAR_OBJ_DESTROY, 114 }; 115 enum mlx5_ib_devx_umem_reg_attrs { 116 MLX5_IB_ATTR_DEVX_UMEM_REG_HANDLE = (1U << UVERBS_ID_NS_SHIFT), 117 MLX5_IB_ATTR_DEVX_UMEM_REG_ADDR, 118 MLX5_IB_ATTR_DEVX_UMEM_REG_LEN, 119 MLX5_IB_ATTR_DEVX_UMEM_REG_ACCESS, 120 MLX5_IB_ATTR_DEVX_UMEM_REG_OUT_ID, 121 }; 122 enum mlx5_ib_devx_umem_dereg_attrs { 123 MLX5_IB_ATTR_DEVX_UMEM_DEREG_HANDLE = (1U << UVERBS_ID_NS_SHIFT), 124 }; 125 enum mlx5_ib_pp_obj_methods { 126 MLX5_IB_METHOD_PP_OBJ_ALLOC = (1U << UVERBS_ID_NS_SHIFT), 127 MLX5_IB_METHOD_PP_OBJ_DESTROY, 128 }; 129 enum mlx5_ib_pp_alloc_attrs { 130 MLX5_IB_ATTR_PP_OBJ_ALLOC_HANDLE = (1U << UVERBS_ID_NS_SHIFT), 131 MLX5_IB_ATTR_PP_OBJ_ALLOC_CTX, 132 MLX5_IB_ATTR_PP_OBJ_ALLOC_FLAGS, 133 MLX5_IB_ATTR_PP_OBJ_ALLOC_INDEX, 134 }; 135 enum mlx5_ib_pp_obj_destroy_attrs { 136 MLX5_IB_ATTR_PP_OBJ_DESTROY_HANDLE = (1U << UVERBS_ID_NS_SHIFT), 137 }; 138 enum mlx5_ib_devx_umem_methods { 139 MLX5_IB_METHOD_DEVX_UMEM_REG = (1U << UVERBS_ID_NS_SHIFT), 140 MLX5_IB_METHOD_DEVX_UMEM_DEREG, 141 }; 142 enum mlx5_ib_devx_async_cmd_fd_alloc_attrs { 143 MLX5_IB_ATTR_DEVX_ASYNC_CMD_FD_ALLOC_HANDLE = (1U << UVERBS_ID_NS_SHIFT), 144 }; 145 enum mlx5_ib_devx_async_event_fd_alloc_attrs { 146 MLX5_IB_ATTR_DEVX_ASYNC_EVENT_FD_ALLOC_HANDLE = (1U << UVERBS_ID_NS_SHIFT), 147 MLX5_IB_ATTR_DEVX_ASYNC_EVENT_FD_ALLOC_FLAGS, 148 }; 149 enum mlx5_ib_devx_async_cmd_fd_methods { 150 MLX5_IB_METHOD_DEVX_ASYNC_CMD_FD_ALLOC = (1U << UVERBS_ID_NS_SHIFT), 151 }; 152 enum mlx5_ib_devx_async_event_fd_methods { 153 MLX5_IB_METHOD_DEVX_ASYNC_EVENT_FD_ALLOC = (1U << UVERBS_ID_NS_SHIFT), 154 }; 155 enum mlx5_ib_objects { 156 MLX5_IB_OBJECT_DEVX = (1U << UVERBS_ID_NS_SHIFT), 157 MLX5_IB_OBJECT_DEVX_OBJ, 158 MLX5_IB_OBJECT_DEVX_UMEM, 159 MLX5_IB_OBJECT_FLOW_MATCHER, 160 MLX5_IB_OBJECT_DEVX_ASYNC_CMD_FD, 161 MLX5_IB_OBJECT_DEVX_ASYNC_EVENT_FD, 162 MLX5_IB_OBJECT_VAR, 163 MLX5_IB_OBJECT_PP, 164 MLX5_IB_OBJECT_UAR, 165 }; 166 enum mlx5_ib_flow_matcher_create_attrs { 167 MLX5_IB_ATTR_FLOW_MATCHER_CREATE_HANDLE = (1U << UVERBS_ID_NS_SHIFT), 168 MLX5_IB_ATTR_FLOW_MATCHER_MATCH_MASK, 169 MLX5_IB_ATTR_FLOW_MATCHER_FLOW_TYPE, 170 MLX5_IB_ATTR_FLOW_MATCHER_MATCH_CRITERIA, 171 MLX5_IB_ATTR_FLOW_MATCHER_FLOW_FLAGS, 172 MLX5_IB_ATTR_FLOW_MATCHER_FT_TYPE, 173 }; 174 enum mlx5_ib_flow_matcher_destroy_attrs { 175 MLX5_IB_ATTR_FLOW_MATCHER_DESTROY_HANDLE = (1U << UVERBS_ID_NS_SHIFT), 176 }; 177 enum mlx5_ib_flow_matcher_methods { 178 MLX5_IB_METHOD_FLOW_MATCHER_CREATE = (1U << UVERBS_ID_NS_SHIFT), 179 MLX5_IB_METHOD_FLOW_MATCHER_DESTROY, 180 }; 181 #define MLX5_IB_DW_MATCH_PARAM 0x80 182 struct mlx5_ib_match_params { 183 __u32 match_params[MLX5_IB_DW_MATCH_PARAM]; 184 }; 185 enum mlx5_ib_flow_type { 186 MLX5_IB_FLOW_TYPE_NORMAL, 187 MLX5_IB_FLOW_TYPE_SNIFFER, 188 MLX5_IB_FLOW_TYPE_ALL_DEFAULT, 189 MLX5_IB_FLOW_TYPE_MC_DEFAULT, 190 }; 191 enum mlx5_ib_create_flow_attrs { 192 MLX5_IB_ATTR_CREATE_FLOW_HANDLE = (1U << UVERBS_ID_NS_SHIFT), 193 MLX5_IB_ATTR_CREATE_FLOW_MATCH_VALUE, 194 MLX5_IB_ATTR_CREATE_FLOW_DEST_QP, 195 MLX5_IB_ATTR_CREATE_FLOW_DEST_DEVX, 196 MLX5_IB_ATTR_CREATE_FLOW_MATCHER, 197 MLX5_IB_ATTR_CREATE_FLOW_ARR_FLOW_ACTIONS, 198 MLX5_IB_ATTR_CREATE_FLOW_TAG, 199 MLX5_IB_ATTR_CREATE_FLOW_ARR_COUNTERS_DEVX, 200 MLX5_IB_ATTR_CREATE_FLOW_ARR_COUNTERS_DEVX_OFFSET, 201 }; 202 enum mlx5_ib_destoy_flow_attrs { 203 MLX5_IB_ATTR_DESTROY_FLOW_HANDLE = (1U << UVERBS_ID_NS_SHIFT), 204 }; 205 enum mlx5_ib_flow_methods { 206 MLX5_IB_METHOD_CREATE_FLOW = (1U << UVERBS_ID_NS_SHIFT), 207 MLX5_IB_METHOD_DESTROY_FLOW, 208 }; 209 enum mlx5_ib_flow_action_methods { 210 MLX5_IB_METHOD_FLOW_ACTION_CREATE_MODIFY_HEADER = (1U << UVERBS_ID_NS_SHIFT), 211 MLX5_IB_METHOD_FLOW_ACTION_CREATE_PACKET_REFORMAT, 212 }; 213 enum mlx5_ib_create_flow_action_create_modify_header_attrs { 214 MLX5_IB_ATTR_CREATE_MODIFY_HEADER_HANDLE = (1U << UVERBS_ID_NS_SHIFT), 215 MLX5_IB_ATTR_CREATE_MODIFY_HEADER_ACTIONS_PRM, 216 MLX5_IB_ATTR_CREATE_MODIFY_HEADER_FT_TYPE, 217 }; 218 enum mlx5_ib_create_flow_action_create_packet_reformat_attrs { 219 MLX5_IB_ATTR_CREATE_PACKET_REFORMAT_HANDLE = (1U << UVERBS_ID_NS_SHIFT), 220 MLX5_IB_ATTR_CREATE_PACKET_REFORMAT_TYPE, 221 MLX5_IB_ATTR_CREATE_PACKET_REFORMAT_FT_TYPE, 222 MLX5_IB_ATTR_CREATE_PACKET_REFORMAT_DATA_BUF, 223 }; 224 #endif 225