1 /* 1 /* 2 * Copyright (c) 2018, Mellanox Technologies i 2 * Copyright (c) 2018, Mellanox Technologies inc. All rights reserved. 3 * 3 * 4 * This software is available to you under a c 4 * This software is available to you under a choice of one of two 5 * licenses. You may choose to be licensed un 5 * licenses. You may choose to be licensed under the terms of the GNU 6 * General Public License (GPL) Version 2, ava 6 * General Public License (GPL) Version 2, available from the file 7 * COPYING in the main directory of this sourc 7 * COPYING in the main directory of this source tree, or the 8 * OpenIB.org BSD license below: 8 * OpenIB.org BSD license below: 9 * 9 * 10 * Redistribution and use in source and bi 10 * Redistribution and use in source and binary forms, with or 11 * without modification, are permitted pro 11 * without modification, are permitted provided that the following 12 * conditions are met: 12 * conditions are met: 13 * 13 * 14 * - Redistributions of source code must 14 * - Redistributions of source code must retain the above 15 * copyright notice, this list of condi 15 * copyright notice, this list of conditions and the following 16 * disclaimer. 16 * disclaimer. 17 * 17 * 18 * - Redistributions in binary form must 18 * - Redistributions in binary form must reproduce the above 19 * copyright notice, this list of condi 19 * copyright notice, this list of conditions and the following 20 * disclaimer in the documentation and/ 20 * disclaimer in the documentation and/or other materials 21 * provided with the distribution. 21 * provided with the distribution. 22 * 22 * 23 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT W 23 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 24 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMIT 24 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 25 * MERCHANTABILITY, FITNESS FOR A PARTICULAR P 25 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 26 * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTH 26 * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS 27 * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER L 27 * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN 28 * ACTION OF CONTRACT, TORT OR OTHERWISE, ARIS 28 * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 29 * CONNECTION WITH THE SOFTWARE OR THE USE OR 29 * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 30 * SOFTWARE. 30 * SOFTWARE. 31 */ 31 */ 32 32 33 #ifndef MLX5_USER_IOCTL_CMDS_H 33 #ifndef MLX5_USER_IOCTL_CMDS_H 34 #define MLX5_USER_IOCTL_CMDS_H 34 #define MLX5_USER_IOCTL_CMDS_H 35 35 36 #include <linux/types.h> 36 #include <linux/types.h> 37 #include <rdma/ib_user_ioctl_cmds.h> 37 #include <rdma/ib_user_ioctl_cmds.h> 38 38 39 enum mlx5_ib_create_flow_action_attrs { 39 enum mlx5_ib_create_flow_action_attrs { 40 /* This attribute belong to the driver 40 /* This attribute belong to the driver namespace */ 41 MLX5_IB_ATTR_CREATE_FLOW_ACTION_FLAGS 41 MLX5_IB_ATTR_CREATE_FLOW_ACTION_FLAGS = (1U << UVERBS_ID_NS_SHIFT), 42 }; 42 }; 43 43 44 enum mlx5_ib_dm_methods { 44 enum mlx5_ib_dm_methods { 45 MLX5_IB_METHOD_DM_MAP_OP_ADDR = (1U < 45 MLX5_IB_METHOD_DM_MAP_OP_ADDR = (1U << UVERBS_ID_NS_SHIFT), 46 MLX5_IB_METHOD_DM_QUERY, 46 MLX5_IB_METHOD_DM_QUERY, 47 }; 47 }; 48 48 49 enum mlx5_ib_dm_map_op_addr_attrs { 49 enum mlx5_ib_dm_map_op_addr_attrs { 50 MLX5_IB_ATTR_DM_MAP_OP_ADDR_REQ_HANDLE 50 MLX5_IB_ATTR_DM_MAP_OP_ADDR_REQ_HANDLE = (1U << UVERBS_ID_NS_SHIFT), 51 MLX5_IB_ATTR_DM_MAP_OP_ADDR_REQ_OP, 51 MLX5_IB_ATTR_DM_MAP_OP_ADDR_REQ_OP, 52 MLX5_IB_ATTR_DM_MAP_OP_ADDR_RESP_START 52 MLX5_IB_ATTR_DM_MAP_OP_ADDR_RESP_START_OFFSET, 53 MLX5_IB_ATTR_DM_MAP_OP_ADDR_RESP_PAGE_ 53 MLX5_IB_ATTR_DM_MAP_OP_ADDR_RESP_PAGE_INDEX, 54 }; 54 }; 55 55 56 enum mlx5_ib_query_dm_attrs { 56 enum mlx5_ib_query_dm_attrs { 57 MLX5_IB_ATTR_QUERY_DM_REQ_HANDLE = (1U 57 MLX5_IB_ATTR_QUERY_DM_REQ_HANDLE = (1U << UVERBS_ID_NS_SHIFT), 58 MLX5_IB_ATTR_QUERY_DM_RESP_START_OFFSE 58 MLX5_IB_ATTR_QUERY_DM_RESP_START_OFFSET, 59 MLX5_IB_ATTR_QUERY_DM_RESP_PAGE_INDEX, 59 MLX5_IB_ATTR_QUERY_DM_RESP_PAGE_INDEX, 60 MLX5_IB_ATTR_QUERY_DM_RESP_LENGTH, 60 MLX5_IB_ATTR_QUERY_DM_RESP_LENGTH, 61 }; 61 }; 62 62 63 enum mlx5_ib_alloc_dm_attrs { 63 enum mlx5_ib_alloc_dm_attrs { 64 MLX5_IB_ATTR_ALLOC_DM_RESP_START_OFFSE 64 MLX5_IB_ATTR_ALLOC_DM_RESP_START_OFFSET = (1U << UVERBS_ID_NS_SHIFT), 65 MLX5_IB_ATTR_ALLOC_DM_RESP_PAGE_INDEX, 65 MLX5_IB_ATTR_ALLOC_DM_RESP_PAGE_INDEX, 66 MLX5_IB_ATTR_ALLOC_DM_REQ_TYPE, 66 MLX5_IB_ATTR_ALLOC_DM_REQ_TYPE, 67 }; 67 }; 68 68 69 enum mlx5_ib_devx_methods { 69 enum mlx5_ib_devx_methods { 70 MLX5_IB_METHOD_DEVX_OTHER = (1U << UV 70 MLX5_IB_METHOD_DEVX_OTHER = (1U << UVERBS_ID_NS_SHIFT), 71 MLX5_IB_METHOD_DEVX_QUERY_UAR, 71 MLX5_IB_METHOD_DEVX_QUERY_UAR, 72 MLX5_IB_METHOD_DEVX_QUERY_EQN, 72 MLX5_IB_METHOD_DEVX_QUERY_EQN, 73 MLX5_IB_METHOD_DEVX_SUBSCRIBE_EVENT, 73 MLX5_IB_METHOD_DEVX_SUBSCRIBE_EVENT, 74 }; 74 }; 75 75 76 enum mlx5_ib_devx_other_attrs { 76 enum mlx5_ib_devx_other_attrs { 77 MLX5_IB_ATTR_DEVX_OTHER_CMD_IN = (1U < 77 MLX5_IB_ATTR_DEVX_OTHER_CMD_IN = (1U << UVERBS_ID_NS_SHIFT), 78 MLX5_IB_ATTR_DEVX_OTHER_CMD_OUT, 78 MLX5_IB_ATTR_DEVX_OTHER_CMD_OUT, 79 }; 79 }; 80 80 81 enum mlx5_ib_devx_obj_create_attrs { 81 enum mlx5_ib_devx_obj_create_attrs { 82 MLX5_IB_ATTR_DEVX_OBJ_CREATE_HANDLE = 82 MLX5_IB_ATTR_DEVX_OBJ_CREATE_HANDLE = (1U << UVERBS_ID_NS_SHIFT), 83 MLX5_IB_ATTR_DEVX_OBJ_CREATE_CMD_IN, 83 MLX5_IB_ATTR_DEVX_OBJ_CREATE_CMD_IN, 84 MLX5_IB_ATTR_DEVX_OBJ_CREATE_CMD_OUT, 84 MLX5_IB_ATTR_DEVX_OBJ_CREATE_CMD_OUT, 85 }; 85 }; 86 86 87 enum mlx5_ib_devx_query_uar_attrs { 87 enum mlx5_ib_devx_query_uar_attrs { 88 MLX5_IB_ATTR_DEVX_QUERY_UAR_USER_IDX = 88 MLX5_IB_ATTR_DEVX_QUERY_UAR_USER_IDX = (1U << UVERBS_ID_NS_SHIFT), 89 MLX5_IB_ATTR_DEVX_QUERY_UAR_DEV_IDX, 89 MLX5_IB_ATTR_DEVX_QUERY_UAR_DEV_IDX, 90 }; 90 }; 91 91 92 enum mlx5_ib_devx_obj_destroy_attrs { 92 enum mlx5_ib_devx_obj_destroy_attrs { 93 MLX5_IB_ATTR_DEVX_OBJ_DESTROY_HANDLE = 93 MLX5_IB_ATTR_DEVX_OBJ_DESTROY_HANDLE = (1U << UVERBS_ID_NS_SHIFT), 94 }; 94 }; 95 95 96 enum mlx5_ib_devx_obj_modify_attrs { 96 enum mlx5_ib_devx_obj_modify_attrs { 97 MLX5_IB_ATTR_DEVX_OBJ_MODIFY_HANDLE = 97 MLX5_IB_ATTR_DEVX_OBJ_MODIFY_HANDLE = (1U << UVERBS_ID_NS_SHIFT), 98 MLX5_IB_ATTR_DEVX_OBJ_MODIFY_CMD_IN, 98 MLX5_IB_ATTR_DEVX_OBJ_MODIFY_CMD_IN, 99 MLX5_IB_ATTR_DEVX_OBJ_MODIFY_CMD_OUT, 99 MLX5_IB_ATTR_DEVX_OBJ_MODIFY_CMD_OUT, 100 }; 100 }; 101 101 102 enum mlx5_ib_devx_obj_query_attrs { 102 enum mlx5_ib_devx_obj_query_attrs { 103 MLX5_IB_ATTR_DEVX_OBJ_QUERY_HANDLE = ( 103 MLX5_IB_ATTR_DEVX_OBJ_QUERY_HANDLE = (1U << UVERBS_ID_NS_SHIFT), 104 MLX5_IB_ATTR_DEVX_OBJ_QUERY_CMD_IN, 104 MLX5_IB_ATTR_DEVX_OBJ_QUERY_CMD_IN, 105 MLX5_IB_ATTR_DEVX_OBJ_QUERY_CMD_OUT, 105 MLX5_IB_ATTR_DEVX_OBJ_QUERY_CMD_OUT, 106 }; 106 }; 107 107 108 enum mlx5_ib_devx_obj_query_async_attrs { 108 enum mlx5_ib_devx_obj_query_async_attrs { 109 MLX5_IB_ATTR_DEVX_OBJ_QUERY_ASYNC_HAND 109 MLX5_IB_ATTR_DEVX_OBJ_QUERY_ASYNC_HANDLE = (1U << UVERBS_ID_NS_SHIFT), 110 MLX5_IB_ATTR_DEVX_OBJ_QUERY_ASYNC_CMD_ 110 MLX5_IB_ATTR_DEVX_OBJ_QUERY_ASYNC_CMD_IN, 111 MLX5_IB_ATTR_DEVX_OBJ_QUERY_ASYNC_FD, 111 MLX5_IB_ATTR_DEVX_OBJ_QUERY_ASYNC_FD, 112 MLX5_IB_ATTR_DEVX_OBJ_QUERY_ASYNC_WR_I 112 MLX5_IB_ATTR_DEVX_OBJ_QUERY_ASYNC_WR_ID, 113 MLX5_IB_ATTR_DEVX_OBJ_QUERY_ASYNC_OUT_ 113 MLX5_IB_ATTR_DEVX_OBJ_QUERY_ASYNC_OUT_LEN, 114 }; 114 }; 115 115 116 enum mlx5_ib_devx_subscribe_event_attrs { 116 enum mlx5_ib_devx_subscribe_event_attrs { 117 MLX5_IB_ATTR_DEVX_SUBSCRIBE_EVENT_FD_H 117 MLX5_IB_ATTR_DEVX_SUBSCRIBE_EVENT_FD_HANDLE = (1U << UVERBS_ID_NS_SHIFT), 118 MLX5_IB_ATTR_DEVX_SUBSCRIBE_EVENT_OBJ_ 118 MLX5_IB_ATTR_DEVX_SUBSCRIBE_EVENT_OBJ_HANDLE, 119 MLX5_IB_ATTR_DEVX_SUBSCRIBE_EVENT_TYPE 119 MLX5_IB_ATTR_DEVX_SUBSCRIBE_EVENT_TYPE_NUM_LIST, 120 MLX5_IB_ATTR_DEVX_SUBSCRIBE_EVENT_FD_N 120 MLX5_IB_ATTR_DEVX_SUBSCRIBE_EVENT_FD_NUM, 121 MLX5_IB_ATTR_DEVX_SUBSCRIBE_EVENT_COOK 121 MLX5_IB_ATTR_DEVX_SUBSCRIBE_EVENT_COOKIE, 122 }; 122 }; 123 123 124 enum mlx5_ib_devx_query_eqn_attrs { 124 enum mlx5_ib_devx_query_eqn_attrs { 125 MLX5_IB_ATTR_DEVX_QUERY_EQN_USER_VEC = 125 MLX5_IB_ATTR_DEVX_QUERY_EQN_USER_VEC = (1U << UVERBS_ID_NS_SHIFT), 126 MLX5_IB_ATTR_DEVX_QUERY_EQN_DEV_EQN, 126 MLX5_IB_ATTR_DEVX_QUERY_EQN_DEV_EQN, 127 }; 127 }; 128 128 129 enum mlx5_ib_devx_obj_methods { 129 enum mlx5_ib_devx_obj_methods { 130 MLX5_IB_METHOD_DEVX_OBJ_CREATE = (1U < 130 MLX5_IB_METHOD_DEVX_OBJ_CREATE = (1U << UVERBS_ID_NS_SHIFT), 131 MLX5_IB_METHOD_DEVX_OBJ_DESTROY, 131 MLX5_IB_METHOD_DEVX_OBJ_DESTROY, 132 MLX5_IB_METHOD_DEVX_OBJ_MODIFY, 132 MLX5_IB_METHOD_DEVX_OBJ_MODIFY, 133 MLX5_IB_METHOD_DEVX_OBJ_QUERY, 133 MLX5_IB_METHOD_DEVX_OBJ_QUERY, 134 MLX5_IB_METHOD_DEVX_OBJ_ASYNC_QUERY, 134 MLX5_IB_METHOD_DEVX_OBJ_ASYNC_QUERY, 135 }; 135 }; 136 136 137 enum mlx5_ib_var_alloc_attrs { 137 enum mlx5_ib_var_alloc_attrs { 138 MLX5_IB_ATTR_VAR_OBJ_ALLOC_HANDLE = (1 138 MLX5_IB_ATTR_VAR_OBJ_ALLOC_HANDLE = (1U << UVERBS_ID_NS_SHIFT), 139 MLX5_IB_ATTR_VAR_OBJ_ALLOC_MMAP_OFFSET 139 MLX5_IB_ATTR_VAR_OBJ_ALLOC_MMAP_OFFSET, 140 MLX5_IB_ATTR_VAR_OBJ_ALLOC_MMAP_LENGTH 140 MLX5_IB_ATTR_VAR_OBJ_ALLOC_MMAP_LENGTH, 141 MLX5_IB_ATTR_VAR_OBJ_ALLOC_PAGE_ID, 141 MLX5_IB_ATTR_VAR_OBJ_ALLOC_PAGE_ID, 142 }; 142 }; 143 143 144 enum mlx5_ib_var_obj_destroy_attrs { 144 enum mlx5_ib_var_obj_destroy_attrs { 145 MLX5_IB_ATTR_VAR_OBJ_DESTROY_HANDLE = 145 MLX5_IB_ATTR_VAR_OBJ_DESTROY_HANDLE = (1U << UVERBS_ID_NS_SHIFT), 146 }; 146 }; 147 147 148 enum mlx5_ib_var_obj_methods { 148 enum mlx5_ib_var_obj_methods { 149 MLX5_IB_METHOD_VAR_OBJ_ALLOC = (1U << 149 MLX5_IB_METHOD_VAR_OBJ_ALLOC = (1U << UVERBS_ID_NS_SHIFT), 150 MLX5_IB_METHOD_VAR_OBJ_DESTROY, 150 MLX5_IB_METHOD_VAR_OBJ_DESTROY, 151 }; 151 }; 152 152 153 enum mlx5_ib_uar_alloc_attrs { 153 enum mlx5_ib_uar_alloc_attrs { 154 MLX5_IB_ATTR_UAR_OBJ_ALLOC_HANDLE = (1 154 MLX5_IB_ATTR_UAR_OBJ_ALLOC_HANDLE = (1U << UVERBS_ID_NS_SHIFT), 155 MLX5_IB_ATTR_UAR_OBJ_ALLOC_TYPE, 155 MLX5_IB_ATTR_UAR_OBJ_ALLOC_TYPE, 156 MLX5_IB_ATTR_UAR_OBJ_ALLOC_MMAP_OFFSET 156 MLX5_IB_ATTR_UAR_OBJ_ALLOC_MMAP_OFFSET, 157 MLX5_IB_ATTR_UAR_OBJ_ALLOC_MMAP_LENGTH 157 MLX5_IB_ATTR_UAR_OBJ_ALLOC_MMAP_LENGTH, 158 MLX5_IB_ATTR_UAR_OBJ_ALLOC_PAGE_ID, 158 MLX5_IB_ATTR_UAR_OBJ_ALLOC_PAGE_ID, 159 }; 159 }; 160 160 161 enum mlx5_ib_uar_obj_destroy_attrs { 161 enum mlx5_ib_uar_obj_destroy_attrs { 162 MLX5_IB_ATTR_UAR_OBJ_DESTROY_HANDLE = 162 MLX5_IB_ATTR_UAR_OBJ_DESTROY_HANDLE = (1U << UVERBS_ID_NS_SHIFT), 163 }; 163 }; 164 164 165 enum mlx5_ib_uar_obj_methods { 165 enum mlx5_ib_uar_obj_methods { 166 MLX5_IB_METHOD_UAR_OBJ_ALLOC = (1U << 166 MLX5_IB_METHOD_UAR_OBJ_ALLOC = (1U << UVERBS_ID_NS_SHIFT), 167 MLX5_IB_METHOD_UAR_OBJ_DESTROY, 167 MLX5_IB_METHOD_UAR_OBJ_DESTROY, 168 }; 168 }; 169 169 170 enum mlx5_ib_devx_umem_reg_attrs { 170 enum mlx5_ib_devx_umem_reg_attrs { 171 MLX5_IB_ATTR_DEVX_UMEM_REG_HANDLE = (1 171 MLX5_IB_ATTR_DEVX_UMEM_REG_HANDLE = (1U << UVERBS_ID_NS_SHIFT), 172 MLX5_IB_ATTR_DEVX_UMEM_REG_ADDR, 172 MLX5_IB_ATTR_DEVX_UMEM_REG_ADDR, 173 MLX5_IB_ATTR_DEVX_UMEM_REG_LEN, 173 MLX5_IB_ATTR_DEVX_UMEM_REG_LEN, 174 MLX5_IB_ATTR_DEVX_UMEM_REG_ACCESS, 174 MLX5_IB_ATTR_DEVX_UMEM_REG_ACCESS, 175 MLX5_IB_ATTR_DEVX_UMEM_REG_OUT_ID, 175 MLX5_IB_ATTR_DEVX_UMEM_REG_OUT_ID, 176 MLX5_IB_ATTR_DEVX_UMEM_REG_PGSZ_BITMAP 176 MLX5_IB_ATTR_DEVX_UMEM_REG_PGSZ_BITMAP, 177 MLX5_IB_ATTR_DEVX_UMEM_REG_DMABUF_FD, 177 MLX5_IB_ATTR_DEVX_UMEM_REG_DMABUF_FD, 178 }; 178 }; 179 179 180 enum mlx5_ib_devx_umem_dereg_attrs { 180 enum mlx5_ib_devx_umem_dereg_attrs { 181 MLX5_IB_ATTR_DEVX_UMEM_DEREG_HANDLE = 181 MLX5_IB_ATTR_DEVX_UMEM_DEREG_HANDLE = (1U << UVERBS_ID_NS_SHIFT), 182 }; 182 }; 183 183 184 enum mlx5_ib_pp_obj_methods { 184 enum mlx5_ib_pp_obj_methods { 185 MLX5_IB_METHOD_PP_OBJ_ALLOC = (1U << U 185 MLX5_IB_METHOD_PP_OBJ_ALLOC = (1U << UVERBS_ID_NS_SHIFT), 186 MLX5_IB_METHOD_PP_OBJ_DESTROY, 186 MLX5_IB_METHOD_PP_OBJ_DESTROY, 187 }; 187 }; 188 188 189 enum mlx5_ib_pp_alloc_attrs { 189 enum mlx5_ib_pp_alloc_attrs { 190 MLX5_IB_ATTR_PP_OBJ_ALLOC_HANDLE = (1U 190 MLX5_IB_ATTR_PP_OBJ_ALLOC_HANDLE = (1U << UVERBS_ID_NS_SHIFT), 191 MLX5_IB_ATTR_PP_OBJ_ALLOC_CTX, 191 MLX5_IB_ATTR_PP_OBJ_ALLOC_CTX, 192 MLX5_IB_ATTR_PP_OBJ_ALLOC_FLAGS, 192 MLX5_IB_ATTR_PP_OBJ_ALLOC_FLAGS, 193 MLX5_IB_ATTR_PP_OBJ_ALLOC_INDEX, 193 MLX5_IB_ATTR_PP_OBJ_ALLOC_INDEX, 194 }; 194 }; 195 195 196 enum mlx5_ib_pp_obj_destroy_attrs { 196 enum mlx5_ib_pp_obj_destroy_attrs { 197 MLX5_IB_ATTR_PP_OBJ_DESTROY_HANDLE = ( 197 MLX5_IB_ATTR_PP_OBJ_DESTROY_HANDLE = (1U << UVERBS_ID_NS_SHIFT), 198 }; 198 }; 199 199 200 enum mlx5_ib_devx_umem_methods { 200 enum mlx5_ib_devx_umem_methods { 201 MLX5_IB_METHOD_DEVX_UMEM_REG = (1U << 201 MLX5_IB_METHOD_DEVX_UMEM_REG = (1U << UVERBS_ID_NS_SHIFT), 202 MLX5_IB_METHOD_DEVX_UMEM_DEREG, 202 MLX5_IB_METHOD_DEVX_UMEM_DEREG, 203 }; 203 }; 204 204 205 enum mlx5_ib_devx_async_cmd_fd_alloc_attrs { 205 enum mlx5_ib_devx_async_cmd_fd_alloc_attrs { 206 MLX5_IB_ATTR_DEVX_ASYNC_CMD_FD_ALLOC_H 206 MLX5_IB_ATTR_DEVX_ASYNC_CMD_FD_ALLOC_HANDLE = (1U << UVERBS_ID_NS_SHIFT), 207 }; 207 }; 208 208 209 enum mlx5_ib_devx_async_event_fd_alloc_attrs { 209 enum mlx5_ib_devx_async_event_fd_alloc_attrs { 210 MLX5_IB_ATTR_DEVX_ASYNC_EVENT_FD_ALLOC 210 MLX5_IB_ATTR_DEVX_ASYNC_EVENT_FD_ALLOC_HANDLE = (1U << UVERBS_ID_NS_SHIFT), 211 MLX5_IB_ATTR_DEVX_ASYNC_EVENT_FD_ALLOC 211 MLX5_IB_ATTR_DEVX_ASYNC_EVENT_FD_ALLOC_FLAGS, 212 }; 212 }; 213 213 214 enum mlx5_ib_devx_async_cmd_fd_methods { 214 enum mlx5_ib_devx_async_cmd_fd_methods { 215 MLX5_IB_METHOD_DEVX_ASYNC_CMD_FD_ALLOC 215 MLX5_IB_METHOD_DEVX_ASYNC_CMD_FD_ALLOC = (1U << UVERBS_ID_NS_SHIFT), 216 }; 216 }; 217 217 218 enum mlx5_ib_devx_async_event_fd_methods { 218 enum mlx5_ib_devx_async_event_fd_methods { 219 MLX5_IB_METHOD_DEVX_ASYNC_EVENT_FD_ALL 219 MLX5_IB_METHOD_DEVX_ASYNC_EVENT_FD_ALLOC = (1U << UVERBS_ID_NS_SHIFT), 220 }; 220 }; 221 221 222 enum mlx5_ib_objects { 222 enum mlx5_ib_objects { 223 MLX5_IB_OBJECT_DEVX = (1U << UVERBS_ID 223 MLX5_IB_OBJECT_DEVX = (1U << UVERBS_ID_NS_SHIFT), 224 MLX5_IB_OBJECT_DEVX_OBJ, 224 MLX5_IB_OBJECT_DEVX_OBJ, 225 MLX5_IB_OBJECT_DEVX_UMEM, 225 MLX5_IB_OBJECT_DEVX_UMEM, 226 MLX5_IB_OBJECT_FLOW_MATCHER, 226 MLX5_IB_OBJECT_FLOW_MATCHER, 227 MLX5_IB_OBJECT_DEVX_ASYNC_CMD_FD, 227 MLX5_IB_OBJECT_DEVX_ASYNC_CMD_FD, 228 MLX5_IB_OBJECT_DEVX_ASYNC_EVENT_FD, 228 MLX5_IB_OBJECT_DEVX_ASYNC_EVENT_FD, 229 MLX5_IB_OBJECT_VAR, 229 MLX5_IB_OBJECT_VAR, 230 MLX5_IB_OBJECT_PP, 230 MLX5_IB_OBJECT_PP, 231 MLX5_IB_OBJECT_UAR, 231 MLX5_IB_OBJECT_UAR, 232 MLX5_IB_OBJECT_STEERING_ANCHOR, 232 MLX5_IB_OBJECT_STEERING_ANCHOR, 233 }; 233 }; 234 234 235 enum mlx5_ib_flow_matcher_create_attrs { 235 enum mlx5_ib_flow_matcher_create_attrs { 236 MLX5_IB_ATTR_FLOW_MATCHER_CREATE_HANDL 236 MLX5_IB_ATTR_FLOW_MATCHER_CREATE_HANDLE = (1U << UVERBS_ID_NS_SHIFT), 237 MLX5_IB_ATTR_FLOW_MATCHER_MATCH_MASK, 237 MLX5_IB_ATTR_FLOW_MATCHER_MATCH_MASK, 238 MLX5_IB_ATTR_FLOW_MATCHER_FLOW_TYPE, 238 MLX5_IB_ATTR_FLOW_MATCHER_FLOW_TYPE, 239 MLX5_IB_ATTR_FLOW_MATCHER_MATCH_CRITER 239 MLX5_IB_ATTR_FLOW_MATCHER_MATCH_CRITERIA, 240 MLX5_IB_ATTR_FLOW_MATCHER_FLOW_FLAGS, 240 MLX5_IB_ATTR_FLOW_MATCHER_FLOW_FLAGS, 241 MLX5_IB_ATTR_FLOW_MATCHER_FT_TYPE, 241 MLX5_IB_ATTR_FLOW_MATCHER_FT_TYPE, 242 }; 242 }; 243 243 244 enum mlx5_ib_flow_matcher_destroy_attrs { 244 enum mlx5_ib_flow_matcher_destroy_attrs { 245 MLX5_IB_ATTR_FLOW_MATCHER_DESTROY_HAND 245 MLX5_IB_ATTR_FLOW_MATCHER_DESTROY_HANDLE = (1U << UVERBS_ID_NS_SHIFT), 246 }; 246 }; 247 247 248 enum mlx5_ib_flow_matcher_methods { 248 enum mlx5_ib_flow_matcher_methods { 249 MLX5_IB_METHOD_FLOW_MATCHER_CREATE = ( 249 MLX5_IB_METHOD_FLOW_MATCHER_CREATE = (1U << UVERBS_ID_NS_SHIFT), 250 MLX5_IB_METHOD_FLOW_MATCHER_DESTROY, 250 MLX5_IB_METHOD_FLOW_MATCHER_DESTROY, 251 }; 251 }; 252 252 253 enum mlx5_ib_flow_steering_anchor_create_attrs 253 enum mlx5_ib_flow_steering_anchor_create_attrs { 254 MLX5_IB_ATTR_STEERING_ANCHOR_CREATE_HA 254 MLX5_IB_ATTR_STEERING_ANCHOR_CREATE_HANDLE = (1U << UVERBS_ID_NS_SHIFT), 255 MLX5_IB_ATTR_STEERING_ANCHOR_FT_TYPE, 255 MLX5_IB_ATTR_STEERING_ANCHOR_FT_TYPE, 256 MLX5_IB_ATTR_STEERING_ANCHOR_PRIORITY, 256 MLX5_IB_ATTR_STEERING_ANCHOR_PRIORITY, 257 MLX5_IB_ATTR_STEERING_ANCHOR_FT_ID, 257 MLX5_IB_ATTR_STEERING_ANCHOR_FT_ID, 258 }; 258 }; 259 259 260 enum mlx5_ib_flow_steering_anchor_destroy_attr 260 enum mlx5_ib_flow_steering_anchor_destroy_attrs { 261 MLX5_IB_ATTR_STEERING_ANCHOR_DESTROY_H 261 MLX5_IB_ATTR_STEERING_ANCHOR_DESTROY_HANDLE = (1U << UVERBS_ID_NS_SHIFT), 262 }; 262 }; 263 263 264 enum mlx5_ib_steering_anchor_methods { 264 enum mlx5_ib_steering_anchor_methods { 265 MLX5_IB_METHOD_STEERING_ANCHOR_CREATE 265 MLX5_IB_METHOD_STEERING_ANCHOR_CREATE = (1U << UVERBS_ID_NS_SHIFT), 266 MLX5_IB_METHOD_STEERING_ANCHOR_DESTROY 266 MLX5_IB_METHOD_STEERING_ANCHOR_DESTROY, 267 }; 267 }; 268 268 269 enum mlx5_ib_device_query_context_attrs { 269 enum mlx5_ib_device_query_context_attrs { 270 MLX5_IB_ATTR_QUERY_CONTEXT_RESP_UCTX = 270 MLX5_IB_ATTR_QUERY_CONTEXT_RESP_UCTX = (1U << UVERBS_ID_NS_SHIFT), 271 }; 271 }; 272 272 273 enum mlx5_ib_create_cq_attrs { 273 enum mlx5_ib_create_cq_attrs { 274 MLX5_IB_ATTR_CREATE_CQ_UAR_INDEX = UVE 274 MLX5_IB_ATTR_CREATE_CQ_UAR_INDEX = UVERBS_ID_DRIVER_NS_WITH_UHW, 275 }; 275 }; 276 276 277 enum mlx5_ib_reg_dmabuf_mr_attrs { 277 enum mlx5_ib_reg_dmabuf_mr_attrs { 278 MLX5_IB_ATTR_REG_DMABUF_MR_ACCESS_FLAG 278 MLX5_IB_ATTR_REG_DMABUF_MR_ACCESS_FLAGS = (1U << UVERBS_ID_NS_SHIFT), 279 }; 279 }; 280 280 281 #define MLX5_IB_DW_MATCH_PARAM 0xA0 281 #define MLX5_IB_DW_MATCH_PARAM 0xA0 282 282 283 struct mlx5_ib_match_params { 283 struct mlx5_ib_match_params { 284 __u32 match_params[MLX5_IB_DW_MATCH_ 284 __u32 match_params[MLX5_IB_DW_MATCH_PARAM]; 285 }; 285 }; 286 286 287 enum mlx5_ib_flow_type { 287 enum mlx5_ib_flow_type { 288 MLX5_IB_FLOW_TYPE_NORMAL, 288 MLX5_IB_FLOW_TYPE_NORMAL, 289 MLX5_IB_FLOW_TYPE_SNIFFER, 289 MLX5_IB_FLOW_TYPE_SNIFFER, 290 MLX5_IB_FLOW_TYPE_ALL_DEFAULT, 290 MLX5_IB_FLOW_TYPE_ALL_DEFAULT, 291 MLX5_IB_FLOW_TYPE_MC_DEFAULT, 291 MLX5_IB_FLOW_TYPE_MC_DEFAULT, 292 }; 292 }; 293 293 294 enum mlx5_ib_create_flow_flags { 294 enum mlx5_ib_create_flow_flags { 295 MLX5_IB_ATTR_CREATE_FLOW_FLAGS_DEFAULT 295 MLX5_IB_ATTR_CREATE_FLOW_FLAGS_DEFAULT_MISS = 1 << 0, 296 MLX5_IB_ATTR_CREATE_FLOW_FLAGS_DROP = 296 MLX5_IB_ATTR_CREATE_FLOW_FLAGS_DROP = 1 << 1, 297 }; 297 }; 298 298 299 enum mlx5_ib_create_flow_attrs { 299 enum mlx5_ib_create_flow_attrs { 300 MLX5_IB_ATTR_CREATE_FLOW_HANDLE = (1U 300 MLX5_IB_ATTR_CREATE_FLOW_HANDLE = (1U << UVERBS_ID_NS_SHIFT), 301 MLX5_IB_ATTR_CREATE_FLOW_MATCH_VALUE, 301 MLX5_IB_ATTR_CREATE_FLOW_MATCH_VALUE, 302 MLX5_IB_ATTR_CREATE_FLOW_DEST_QP, 302 MLX5_IB_ATTR_CREATE_FLOW_DEST_QP, 303 MLX5_IB_ATTR_CREATE_FLOW_DEST_DEVX, 303 MLX5_IB_ATTR_CREATE_FLOW_DEST_DEVX, 304 MLX5_IB_ATTR_CREATE_FLOW_MATCHER, 304 MLX5_IB_ATTR_CREATE_FLOW_MATCHER, 305 MLX5_IB_ATTR_CREATE_FLOW_ARR_FLOW_ACTI 305 MLX5_IB_ATTR_CREATE_FLOW_ARR_FLOW_ACTIONS, 306 MLX5_IB_ATTR_CREATE_FLOW_TAG, 306 MLX5_IB_ATTR_CREATE_FLOW_TAG, 307 MLX5_IB_ATTR_CREATE_FLOW_ARR_COUNTERS_ 307 MLX5_IB_ATTR_CREATE_FLOW_ARR_COUNTERS_DEVX, 308 MLX5_IB_ATTR_CREATE_FLOW_ARR_COUNTERS_ 308 MLX5_IB_ATTR_CREATE_FLOW_ARR_COUNTERS_DEVX_OFFSET, 309 MLX5_IB_ATTR_CREATE_FLOW_FLAGS, 309 MLX5_IB_ATTR_CREATE_FLOW_FLAGS, 310 }; 310 }; 311 311 312 enum mlx5_ib_destroy_flow_attrs { 312 enum mlx5_ib_destroy_flow_attrs { 313 MLX5_IB_ATTR_DESTROY_FLOW_HANDLE = (1U 313 MLX5_IB_ATTR_DESTROY_FLOW_HANDLE = (1U << UVERBS_ID_NS_SHIFT), 314 }; 314 }; 315 315 316 enum mlx5_ib_flow_methods { 316 enum mlx5_ib_flow_methods { 317 MLX5_IB_METHOD_CREATE_FLOW = (1U << UV 317 MLX5_IB_METHOD_CREATE_FLOW = (1U << UVERBS_ID_NS_SHIFT), 318 MLX5_IB_METHOD_DESTROY_FLOW, 318 MLX5_IB_METHOD_DESTROY_FLOW, 319 }; 319 }; 320 320 321 enum mlx5_ib_flow_action_methods { 321 enum mlx5_ib_flow_action_methods { 322 MLX5_IB_METHOD_FLOW_ACTION_CREATE_MODI 322 MLX5_IB_METHOD_FLOW_ACTION_CREATE_MODIFY_HEADER = (1U << UVERBS_ID_NS_SHIFT), 323 MLX5_IB_METHOD_FLOW_ACTION_CREATE_PACK 323 MLX5_IB_METHOD_FLOW_ACTION_CREATE_PACKET_REFORMAT, 324 }; 324 }; 325 325 326 enum mlx5_ib_create_flow_action_create_modify_ 326 enum mlx5_ib_create_flow_action_create_modify_header_attrs { 327 MLX5_IB_ATTR_CREATE_MODIFY_HEADER_HAND 327 MLX5_IB_ATTR_CREATE_MODIFY_HEADER_HANDLE = (1U << UVERBS_ID_NS_SHIFT), 328 MLX5_IB_ATTR_CREATE_MODIFY_HEADER_ACTI 328 MLX5_IB_ATTR_CREATE_MODIFY_HEADER_ACTIONS_PRM, 329 MLX5_IB_ATTR_CREATE_MODIFY_HEADER_FT_T 329 MLX5_IB_ATTR_CREATE_MODIFY_HEADER_FT_TYPE, 330 }; 330 }; 331 331 332 enum mlx5_ib_create_flow_action_create_packet_ 332 enum mlx5_ib_create_flow_action_create_packet_reformat_attrs { 333 MLX5_IB_ATTR_CREATE_PACKET_REFORMAT_HA 333 MLX5_IB_ATTR_CREATE_PACKET_REFORMAT_HANDLE = (1U << UVERBS_ID_NS_SHIFT), 334 MLX5_IB_ATTR_CREATE_PACKET_REFORMAT_TY 334 MLX5_IB_ATTR_CREATE_PACKET_REFORMAT_TYPE, 335 MLX5_IB_ATTR_CREATE_PACKET_REFORMAT_FT 335 MLX5_IB_ATTR_CREATE_PACKET_REFORMAT_FT_TYPE, 336 MLX5_IB_ATTR_CREATE_PACKET_REFORMAT_DA 336 MLX5_IB_ATTR_CREATE_PACKET_REFORMAT_DATA_BUF, 337 }; 337 }; 338 338 339 enum mlx5_ib_query_pd_attrs { 339 enum mlx5_ib_query_pd_attrs { 340 MLX5_IB_ATTR_QUERY_PD_HANDLE = (1U << 340 MLX5_IB_ATTR_QUERY_PD_HANDLE = (1U << UVERBS_ID_NS_SHIFT), 341 MLX5_IB_ATTR_QUERY_PD_RESP_PDN, 341 MLX5_IB_ATTR_QUERY_PD_RESP_PDN, 342 }; 342 }; 343 343 344 enum mlx5_ib_pd_methods { 344 enum mlx5_ib_pd_methods { 345 MLX5_IB_METHOD_PD_QUERY = (1U << UVERB 345 MLX5_IB_METHOD_PD_QUERY = (1U << UVERBS_ID_NS_SHIFT), 346 346 347 }; 347 }; 348 348 349 enum mlx5_ib_device_methods { 349 enum mlx5_ib_device_methods { 350 MLX5_IB_METHOD_QUERY_PORT = (1U << UVE 350 MLX5_IB_METHOD_QUERY_PORT = (1U << UVERBS_ID_NS_SHIFT), 351 MLX5_IB_METHOD_GET_DATA_DIRECT_SYSFS_P 351 MLX5_IB_METHOD_GET_DATA_DIRECT_SYSFS_PATH, 352 }; 352 }; 353 353 354 enum mlx5_ib_query_port_attrs { 354 enum mlx5_ib_query_port_attrs { 355 MLX5_IB_ATTR_QUERY_PORT_PORT_NUM = (1U 355 MLX5_IB_ATTR_QUERY_PORT_PORT_NUM = (1U << UVERBS_ID_NS_SHIFT), 356 MLX5_IB_ATTR_QUERY_PORT, 356 MLX5_IB_ATTR_QUERY_PORT, 357 }; 357 }; 358 358 359 enum mlx5_ib_get_data_direct_sysfs_path_attrs 359 enum mlx5_ib_get_data_direct_sysfs_path_attrs { 360 MLX5_IB_ATTR_GET_DATA_DIRECT_SYSFS_PAT 360 MLX5_IB_ATTR_GET_DATA_DIRECT_SYSFS_PATH = (1U << UVERBS_ID_NS_SHIFT), 361 }; 361 }; 362 362 363 #endif 363 #endif 364 364
Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.