Pull rdma updates from Jason Gunthorpe: "A quiet cycle after the larger 5.8 effort. Substantially cleanup and driver work with a few smaller features this time. - Driver updates for hfi1, rxe, mlx5, hns, qedr, usnic, bnxt_re - Removal of dead or redundant code across the drivers - RAW resource tracker dumps to include a device specific data blob for device objects to aide device debugging - Further advance the IOCTL interface, remove the ability to turn it off. Add QUERY_CONTEXT, QUERY_MR, and QUERY_PD commands - Remove stubs related to devices with no pkey table - A shared CQ scheme to allow multiple ULPs to share the CQ rings of a device to give higher performance - Several more static checker, syzkaller and rare crashers fixed" * tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma: (121 commits) RDMA/mlx5: Fix flow destination setting for RDMA TX flow table RDMA/rxe: Remove pkey table RDMA/umem: Add a schedule point in ib_umem_get() RDMA/hns: Fix the unneeded process when getting a general type of CQE error RDMA/hns: Fix error during modify qp RTS2RTS RDMA/hns: Delete unnecessary memset when allocating VF resource RDMA/hns: Remove redundant parameters in set_rc_wqe() RDMA/hns: Remove support for HIP08_A RDMA/hns: Refactor hns_roce_v2_set_hem() RDMA/hns: Remove redundant hardware opcode definitions RDMA/netlink: Remove CAP_NET_RAW check when dump a raw QP RDMA/include: Replace license text with SPDX tags RDMA/rtrs: remove WQ_MEM_RECLAIM for rtrs_wq RDMA/rtrs-clt: add an additional random 8 seconds before reconnecting RDMA/cma: Execute rdma_cm destruction from a handler properly RDMA/cma: Remove unneeded locking for req paths RDMA/cma: Using the standard locking pattern when delivering the removal event RDMA/cma: Simplify DEVICE_REMOVAL for internal_id RDMA/efa: Add EFA 0xefa1 PCI ID RDMA/efa: User/kernel compatibility handshake mechanism ...
Showing the changes to include/uapi (6 of 166 files). Show all
Unified · Split
| @@ -1,6 +1,6 @@ | |||
| 1 | /* SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) OR BSD-2-Clause) */ | 1 | /* SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) OR BSD-2-Clause) */ |
| 2 | /* | 2 | /* |
| 3 | * Copyright 2018-2019 Amazon.com, Inc. or its affiliates. All rights reserved. | 3 | * Copyright 2018-2020 Amazon.com, Inc. or its affiliates. All rights reserved. |
| 4 | */ | 4 | */ |
| 5 | 5 | ||
| 6 | #ifndef EFA_ABI_USER_H | 6 | #ifndef EFA_ABI_USER_H |
| @@ -20,6 +20,16 @@ · 13 unmodified lines | |||
| 20 | * hex bit offset of the field. | 20 | * hex bit offset of the field. |
| 21 | */ | 21 | */ |
| 22 | 22 | ||
| 23 | enum { | ||
| 24 | EFA_ALLOC_UCONTEXT_CMD_COMP_TX_BATCH = 1 << 0, | ||
| 25 | EFA_ALLOC_UCONTEXT_CMD_COMP_MIN_SQ_WR = 1 << 1, | ||
| 26 | }; | ||
| 27 | |||
| 28 | struct efa_ibv_alloc_ucontext_cmd { | ||
| 29 | __u32 comp_mask; | ||
| 30 | __u8 reserved_20[4]; | ||
| 31 | }; | ||
| 32 | |||
| 23 | enum efa_ibv_user_cmds_supp_udata { | 33 | enum efa_ibv_user_cmds_supp_udata { |
| 24 | EFA_USER_CMDS_SUPP_UDATA_QUERY_DEVICE = 1 << 0, | 34 | EFA_USER_CMDS_SUPP_UDATA_QUERY_DEVICE = 1 << 0, |
| 25 | EFA_USER_CMDS_SUPP_UDATA_CREATE_AH = 1 << 1, | 35 | EFA_USER_CMDS_SUPP_UDATA_CREATE_AH = 1 << 1, |
| @@ -31,6 +41,9 @@ struct efa_ibv_alloc_ucontext_resp { · 5 unmodified lines | |||
| 31 | __u16 sub_cqs_per_cq; | 41 | __u16 sub_cqs_per_cq; |
| 32 | __u16 inline_buf_size; | 42 | __u16 inline_buf_size; |
| 33 | __u32 max_llq_size; /* bytes */ | 43 | __u32 max_llq_size; /* bytes */ |
| 44 | __u16 max_tx_batch; /* units of 64 bytes */ | ||
| 45 | __u16 min_sq_wr; | ||
| 46 | __u8 reserved_a0[4]; | ||
| 34 | }; | 47 | }; |
| 35 | 48 | ||
| 36 | struct efa_ibv_alloc_pd_resp { | 49 | struct efa_ibv_alloc_pd_resp { |
| @@ -69,6 +69,7 @@ enum uverbs_methods_device { · 68 unmodified lines | |||
| 69 | UVERBS_METHOD_INFO_HANDLES, | 69 | UVERBS_METHOD_INFO_HANDLES, |
| 70 | UVERBS_METHOD_QUERY_PORT, | 70 | UVERBS_METHOD_QUERY_PORT, |
| 71 | UVERBS_METHOD_GET_CONTEXT, | 71 | UVERBS_METHOD_GET_CONTEXT, |
| 72 | UVERBS_METHOD_QUERY_CONTEXT, | ||
| 72 | }; | 73 | }; |
| 73 | 74 | ||
| 74 | enum uverbs_attrs_invoke_write_cmd_attr_ids { | 75 | enum uverbs_attrs_invoke_write_cmd_attr_ids { |
| @@ -87,6 +88,11 @@ enum uverbs_attrs_get_context_attr_ids { · 12 unmodified lines | |||
| 87 | UVERBS_ATTR_GET_CONTEXT_CORE_SUPPORT, | 88 | UVERBS_ATTR_GET_CONTEXT_CORE_SUPPORT, |
| 88 | }; | 89 | }; |
| 89 | 90 | ||
| 91 | enum uverbs_attrs_query_context_attr_ids { | ||
| 92 | UVERBS_ATTR_QUERY_CONTEXT_NUM_COMP_VECTORS, | ||
| 93 | UVERBS_ATTR_QUERY_CONTEXT_CORE_SUPPORT, | ||
| 94 | }; | ||
| 95 | |||
| 90 | enum uverbs_attrs_create_cq_cmd_attr_ids { | 96 | enum uverbs_attrs_create_cq_cmd_attr_ids { |
| 91 | UVERBS_ATTR_CREATE_CQ_HANDLE, | 97 | UVERBS_ATTR_CREATE_CQ_HANDLE, |
| 92 | UVERBS_ATTR_CREATE_CQ_CQE, | 98 | UVERBS_ATTR_CREATE_CQ_CQE, |
| @@ -242,6 +248,7 @@ enum uverbs_methods_mr { · 149 unmodified lines | |||
| 242 | UVERBS_METHOD_DM_MR_REG, | 248 | UVERBS_METHOD_DM_MR_REG, |
| 243 | UVERBS_METHOD_MR_DESTROY, | 249 | UVERBS_METHOD_MR_DESTROY, |
| 244 | UVERBS_METHOD_ADVISE_MR, | 250 | UVERBS_METHOD_ADVISE_MR, |
| 251 | UVERBS_METHOD_QUERY_MR, | ||
| 245 | }; | 252 | }; |
| 246 | 253 | ||
| 247 | enum uverbs_attrs_mr_destroy_ids { | 254 | enum uverbs_attrs_mr_destroy_ids { |
| @@ -255,6 +262,14 @@ enum uverbs_attrs_advise_mr_cmd_attr_ids { · 7 unmodified lines | |||
| 255 | UVERBS_ATTR_ADVISE_MR_SGE_LIST, | 262 | UVERBS_ATTR_ADVISE_MR_SGE_LIST, |
| 256 | }; | 263 | }; |
| 257 | 264 | ||
| 265 | enum uverbs_attrs_query_mr_cmd_attr_ids { | ||
| 266 | UVERBS_ATTR_QUERY_MR_HANDLE, | ||
| 267 | UVERBS_ATTR_QUERY_MR_RESP_LKEY, | ||
| 268 | UVERBS_ATTR_QUERY_MR_RESP_RKEY, | ||
| 269 | UVERBS_ATTR_QUERY_MR_RESP_LENGTH, | ||
| 270 | UVERBS_ATTR_QUERY_MR_RESP_IOVA, | ||
| 271 | }; | ||
| 272 | |||
| 258 | enum uverbs_attrs_create_counters_cmd_attr_ids { | 273 | enum uverbs_attrs_create_counters_cmd_attr_ids { |
| 259 | UVERBS_ATTR_CREATE_COUNTERS_HANDLE, | 274 | UVERBS_ATTR_CREATE_COUNTERS_HANDLE, |
| 260 | }; | 275 | }; |
| @@ -228,6 +228,10 @@ enum mlx5_ib_flow_matcher_methods { · 227 unmodified lines | |||
| 228 | MLX5_IB_METHOD_FLOW_MATCHER_DESTROY, | 228 | MLX5_IB_METHOD_FLOW_MATCHER_DESTROY, |
| 229 | }; | 229 | }; |
| 230 | 230 | ||
| 231 | enum mlx5_ib_device_query_context_attrs { | ||
| 232 | MLX5_IB_ATTR_QUERY_CONTEXT_RESP_UCTX = (1U << UVERBS_ID_NS_SHIFT), | ||
| 233 | }; | ||
| 234 | |||
| 231 | #define MLX5_IB_DW_MATCH_PARAM 0x80 | 235 | #define MLX5_IB_DW_MATCH_PARAM 0x80 |
| 232 | 236 | ||
| 233 | struct mlx5_ib_match_params { | 237 | struct mlx5_ib_match_params { |
| @@ -259,7 +263,7 @@ enum mlx5_ib_create_flow_attrs { · 25 unmodified lines | |||
| 259 | MLX5_IB_ATTR_CREATE_FLOW_FLAGS, | 263 | MLX5_IB_ATTR_CREATE_FLOW_FLAGS, |
| 260 | }; | 264 | }; |
| 261 | 265 | ||
| 262 | enum mlx5_ib_destoy_flow_attrs { | 266 | enum mlx5_ib_destroy_flow_attrs { |
| 263 | MLX5_IB_ATTR_DESTROY_FLOW_HANDLE = (1U << UVERBS_ID_NS_SHIFT), | 267 | MLX5_IB_ATTR_DESTROY_FLOW_HANDLE = (1U << UVERBS_ID_NS_SHIFT), |
| 264 | }; | 268 | }; |
| 265 | 269 | ||
| @@ -286,4 +290,14 @@ enum mlx5_ib_create_flow_action_create_packet_reformat_attrs { · 20 unmodified lines | |||
| 286 | MLX5_IB_ATTR_CREATE_PACKET_REFORMAT_DATA_BUF, | 290 | MLX5_IB_ATTR_CREATE_PACKET_REFORMAT_DATA_BUF, |
| 287 | }; | 291 | }; |
| 288 | 292 | ||
| 293 | enum mlx5_ib_query_pd_attrs { | ||
| 294 | MLX5_IB_ATTR_QUERY_PD_HANDLE = (1U << UVERBS_ID_NS_SHIFT), | ||
| 295 | MLX5_IB_ATTR_QUERY_PD_RESP_PDN, | ||
| 296 | }; | ||
| 297 | |||
| 298 | enum mlx5_ib_pd_methods { | ||
| 299 | MLX5_IB_METHOD_PD_QUERY = (1U << UVERBS_ID_NS_SHIFT), | ||
| 300 | |||
| 301 | }; | ||
| 302 | |||
| 289 | #endif | 303 | #endif |
| @@ -39,8 +39,9 @@ · 38 unmodified lines | |||
| 39 | 39 | ||
| 40 | /* user kernel communication data structures. */ | 40 | /* user kernel communication data structures. */ |
| 41 | enum qedr_alloc_ucontext_flags { | 41 | enum qedr_alloc_ucontext_flags { |
| 42 | QEDR_ALLOC_UCTX_RESERVED = 1 << 0, | 42 | QEDR_ALLOC_UCTX_EDPM_MODE = 1 << 0, |
| 43 | QEDR_ALLOC_UCTX_DB_REC = 1 << 1 | 43 | QEDR_ALLOC_UCTX_DB_REC = 1 << 1, |
| 44 | QEDR_SUPPORT_DPM_SIZES = 1 << 2, | ||
| 44 | }; | 45 | }; |
| 45 | 46 | ||
| 46 | struct qedr_alloc_ucontext_req { | 47 | struct qedr_alloc_ucontext_req { |
| @@ -50,13 +51,14 @@ struct qedr_alloc_ucontext_req { · 3 unmodified lines | |||
| 50 | 51 | ||
| 51 | #define QEDR_LDPM_MAX_SIZE (8192) | 52 | #define QEDR_LDPM_MAX_SIZE (8192) |
| 52 | #define QEDR_EDPM_TRANS_SIZE (64) | 53 | #define QEDR_EDPM_TRANS_SIZE (64) |
| 54 | #define QEDR_EDPM_MAX_SIZE (ROCE_REQ_MAX_INLINE_DATA_SIZE) | ||
| 53 | 55 | ||
| 54 | enum qedr_rdma_dpm_type { | 56 | enum qedr_rdma_dpm_type { |
| 55 | QEDR_DPM_TYPE_NONE = 0, | 57 | QEDR_DPM_TYPE_NONE = 0, |
| 56 | QEDR_DPM_TYPE_ROCE_ENHANCED = 1 << 0, | 58 | QEDR_DPM_TYPE_ROCE_ENHANCED = 1 << 0, |
| 57 | QEDR_DPM_TYPE_ROCE_LEGACY = 1 << 1, | 59 | QEDR_DPM_TYPE_ROCE_LEGACY = 1 << 1, |
| 58 | QEDR_DPM_TYPE_IWARP_LEGACY = 1 << 2, | 60 | QEDR_DPM_TYPE_IWARP_LEGACY = 1 << 2, |
| 59 | QEDR_DPM_TYPE_RESERVED = 1 << 3, | 61 | QEDR_DPM_TYPE_ROCE_EDPM_MODE = 1 << 3, |
| 60 | QEDR_DPM_SIZES_SET = 1 << 4, | 62 | QEDR_DPM_SIZES_SET = 1 << 4, |
| 61 | }; | 63 | }; |
| 62 | 64 | ||
| @@ -77,6 +79,8 @@ struct qedr_alloc_ucontext_resp { · 14 unmodified lines | |||
| 77 | __u16 ldpm_limit_size; | 79 | __u16 ldpm_limit_size; |
| 78 | __u8 edpm_trans_size; | 80 | __u8 edpm_trans_size; |
| 79 | __u8 reserved; | 81 | __u8 reserved; |
| 82 | __u16 edpm_limit_size; | ||
| 83 | __u8 padding[6]; | ||
| 80 | }; | 84 | }; |
| 81 | 85 | ||
| 82 | struct qedr_alloc_pd_ureq { | 86 | struct qedr_alloc_pd_ureq { |
| @@ -287,6 +287,12 @@ enum rdma_nldev_command { · 286 unmodified lines | |||
| 287 | 287 | ||
| 288 | RDMA_NLDEV_CMD_STAT_DEL, | 288 | RDMA_NLDEV_CMD_STAT_DEL, |
| 289 | 289 | ||
| 290 | RDMA_NLDEV_CMD_RES_QP_GET_RAW, | ||
| 291 | |||
| 292 | RDMA_NLDEV_CMD_RES_CQ_GET_RAW, | ||
| 293 | |||
| 294 | RDMA_NLDEV_CMD_RES_MR_GET_RAW, | ||
| 295 | |||
| 290 | RDMA_NLDEV_NUM_OPS | 296 | RDMA_NLDEV_NUM_OPS |
| 291 | }; | 297 | }; |
| 292 | 298 | ||
| @@ -525,6 +531,8 @@ enum rdma_nldev_attr { · 232 unmodified lines | |||
| 525 | */ | 531 | */ |
| 526 | RDMA_NLDEV_ATTR_DEV_DIM, /* u8 */ | 532 | RDMA_NLDEV_ATTR_DEV_DIM, /* u8 */ |
| 527 | 533 | ||
| 534 | RDMA_NLDEV_ATTR_RES_RAW, /* binary */ | ||
| 535 | |||
| 528 | /* | 536 | /* |
| 529 | * Always the end | 537 | * Always the end |
| 530 | */ | 538 | */ |
| @@ -561,5 +569,6 @@ enum rdma_nl_counter_mode { · 30 unmodified lines | |||
| 561 | */ | 569 | */ |
| 562 | enum rdma_nl_counter_mask { | 570 | enum rdma_nl_counter_mask { |
| 563 | RDMA_COUNTER_MASK_QP_TYPE = 1, | 571 | RDMA_COUNTER_MASK_QP_TYPE = 1, |
| 572 | RDMA_COUNTER_MASK_PID = 1 << 1, | ||
| 564 | }; | 573 | }; |
| 565 | #endif /* _UAPI_RDMA_NETLINK_H */ | 574 | #endif /* _UAPI_RDMA_NETLINK_H */ |
| @@ -43,7 +43,7 @@ · 42 unmodified lines | |||
| 43 | 43 | ||
| 44 | /* | 44 | /* |
| 45 | * General blocks assignments | 45 | * General blocks assignments |
| 46 | * It is closed on purpose do not expose it it user space | 46 | * It is closed on purpose - do not expose it to user space |
| 47 | * #define MAD_CMD_BASE 0x00 | 47 | * #define MAD_CMD_BASE 0x00 |
| 48 | * #define HFI1_CMD_BAS 0xE0 | 48 | * #define HFI1_CMD_BAS 0xE0 |
| 49 | */ | 49 | */ |