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_VERBS_H 8 #define IB_USER_IOCTL_VERBS_H 9 #include <linux/types.h> 10 #include <rdma/ib_user_verbs.h> 11 #ifndef RDMA_UAPI_PTR 12 #define RDMA_UAPI_PTR(_type,_name) __aligned_u64 _name 13 #endif 14 #define IB_UVERBS_ACCESS_OPTIONAL_FIRST (1 << 20) 15 #define IB_UVERBS_ACCESS_OPTIONAL_LAST (1 << 29) 16 enum ib_uverbs_core_support { 17 IB_UVERBS_CORE_SUPPORT_OPTIONAL_MR_ACCESS = 1 << 0, 18 }; 19 enum ib_uverbs_access_flags { 20 IB_UVERBS_ACCESS_LOCAL_WRITE = 1 << 0, 21 IB_UVERBS_ACCESS_REMOTE_WRITE = 1 << 1, 22 IB_UVERBS_ACCESS_REMOTE_READ = 1 << 2, 23 IB_UVERBS_ACCESS_REMOTE_ATOMIC = 1 << 3, 24 IB_UVERBS_ACCESS_MW_BIND = 1 << 4, 25 IB_UVERBS_ACCESS_ZERO_BASED = 1 << 5, 26 IB_UVERBS_ACCESS_ON_DEMAND = 1 << 6, 27 IB_UVERBS_ACCESS_HUGETLB = 1 << 7, 28 IB_UVERBS_ACCESS_FLUSH_GLOBAL = 1 << 8, 29 IB_UVERBS_ACCESS_FLUSH_PERSISTENT = 1 << 9, 30 IB_UVERBS_ACCESS_RELAXED_ORDERING = IB_UVERBS_ACCESS_OPTIONAL_FIRST, 31 IB_UVERBS_ACCESS_OPTIONAL_RANGE = ((IB_UVERBS_ACCESS_OPTIONAL_LAST << 1) - 1) & ~(IB_UVERBS_ACCESS_OPTIONAL_FIRST - 1) 32 }; 33 enum ib_uverbs_srq_type { 34 IB_UVERBS_SRQT_BASIC, 35 IB_UVERBS_SRQT_XRC, 36 IB_UVERBS_SRQT_TM, 37 }; 38 enum ib_uverbs_wq_type { 39 IB_UVERBS_WQT_RQ, 40 }; 41 enum ib_uverbs_wq_flags { 42 IB_UVERBS_WQ_FLAGS_CVLAN_STRIPPING = 1 << 0, 43 IB_UVERBS_WQ_FLAGS_SCATTER_FCS = 1 << 1, 44 IB_UVERBS_WQ_FLAGS_DELAY_DROP = 1 << 2, 45 IB_UVERBS_WQ_FLAGS_PCI_WRITE_END_PADDING = 1 << 3, 46 }; 47 enum ib_uverbs_qp_type { 48 IB_UVERBS_QPT_RC = 2, 49 IB_UVERBS_QPT_UC, 50 IB_UVERBS_QPT_UD, 51 IB_UVERBS_QPT_RAW_PACKET = 8, 52 IB_UVERBS_QPT_XRC_INI, 53 IB_UVERBS_QPT_XRC_TGT, 54 IB_UVERBS_QPT_DRIVER = 0xFF, 55 }; 56 enum ib_uverbs_qp_create_flags { 57 IB_UVERBS_QP_CREATE_BLOCK_MULTICAST_LOOPBACK = 1 << 1, 58 IB_UVERBS_QP_CREATE_SCATTER_FCS = 1 << 8, 59 IB_UVERBS_QP_CREATE_CVLAN_STRIPPING = 1 << 9, 60 IB_UVERBS_QP_CREATE_PCI_WRITE_END_PADDING = 1 << 11, 61 IB_UVERBS_QP_CREATE_SQ_SIG_ALL = 1 << 12, 62 }; 63 enum ib_uverbs_query_port_cap_flags { 64 IB_UVERBS_PCF_SM = 1 << 1, 65 IB_UVERBS_PCF_NOTICE_SUP = 1 << 2, 66 IB_UVERBS_PCF_TRAP_SUP = 1 << 3, 67 IB_UVERBS_PCF_OPT_IPD_SUP = 1 << 4, 68 IB_UVERBS_PCF_AUTO_MIGR_SUP = 1 << 5, 69 IB_UVERBS_PCF_SL_MAP_SUP = 1 << 6, 70 IB_UVERBS_PCF_MKEY_NVRAM = 1 << 7, 71 IB_UVERBS_PCF_PKEY_NVRAM = 1 << 8, 72 IB_UVERBS_PCF_LED_INFO_SUP = 1 << 9, 73 IB_UVERBS_PCF_SM_DISABLED = 1 << 10, 74 IB_UVERBS_PCF_SYS_IMAGE_GUID_SUP = 1 << 11, 75 IB_UVERBS_PCF_PKEY_SW_EXT_PORT_TRAP_SUP = 1 << 12, 76 IB_UVERBS_PCF_EXTENDED_SPEEDS_SUP = 1 << 14, 77 IB_UVERBS_PCF_CM_SUP = 1 << 16, 78 IB_UVERBS_PCF_SNMP_TUNNEL_SUP = 1 << 17, 79 IB_UVERBS_PCF_REINIT_SUP = 1 << 18, 80 IB_UVERBS_PCF_DEVICE_MGMT_SUP = 1 << 19, 81 IB_UVERBS_PCF_VENDOR_CLASS_SUP = 1 << 20, 82 IB_UVERBS_PCF_DR_NOTICE_SUP = 1 << 21, 83 IB_UVERBS_PCF_CAP_MASK_NOTICE_SUP = 1 << 22, 84 IB_UVERBS_PCF_BOOT_MGMT_SUP = 1 << 23, 85 IB_UVERBS_PCF_LINK_LATENCY_SUP = 1 << 24, 86 IB_UVERBS_PCF_CLIENT_REG_SUP = 1 << 25, 87 IB_UVERBS_PCF_LINK_SPEED_WIDTH_TABLE_SUP = 1 << 27, 88 IB_UVERBS_PCF_VENDOR_SPECIFIC_MADS_TABLE_SUP = 1 << 28, 89 IB_UVERBS_PCF_MCAST_PKEY_TRAP_SUPPRESSION_SUP = 1 << 29, 90 IB_UVERBS_PCF_MCAST_FDB_TOP_SUP = 1 << 30, 91 IB_UVERBS_PCF_HIERARCHY_INFO_SUP = 1ULL << 31, 92 IB_UVERBS_PCF_IP_BASED_GIDS = 1 << 26, 93 }; 94 enum ib_uverbs_query_port_flags { 95 IB_UVERBS_QPF_GRH_REQUIRED = 1 << 0, 96 }; 97 enum ib_uverbs_flow_action_esp_keymat { 98 IB_UVERBS_FLOW_ACTION_ESP_KEYMAT_AES_GCM, 99 }; 100 enum ib_uverbs_flow_action_esp_keymat_aes_gcm_iv_algo { 101 IB_UVERBS_FLOW_ACTION_IV_ALGO_SEQ, 102 }; 103 struct ib_uverbs_flow_action_esp_keymat_aes_gcm { 104 __aligned_u64 iv; 105 __u32 iv_algo; 106 __u32 salt; 107 __u32 icv_len; 108 __u32 key_len; 109 __u32 aes_key[256 / 32]; 110 }; 111 enum ib_uverbs_flow_action_esp_replay { 112 IB_UVERBS_FLOW_ACTION_ESP_REPLAY_NONE, 113 IB_UVERBS_FLOW_ACTION_ESP_REPLAY_BMP, 114 }; 115 struct ib_uverbs_flow_action_esp_replay_bmp { 116 __u32 size; 117 }; 118 enum ib_uverbs_flow_action_esp_flags { 119 IB_UVERBS_FLOW_ACTION_ESP_FLAGS_INLINE_CRYPTO = 0UL << 0, 120 IB_UVERBS_FLOW_ACTION_ESP_FLAGS_FULL_OFFLOAD = 1UL << 0, 121 IB_UVERBS_FLOW_ACTION_ESP_FLAGS_TUNNEL = 0UL << 1, 122 IB_UVERBS_FLOW_ACTION_ESP_FLAGS_TRANSPORT = 1UL << 1, 123 IB_UVERBS_FLOW_ACTION_ESP_FLAGS_DECRYPT = 0UL << 2, 124 IB_UVERBS_FLOW_ACTION_ESP_FLAGS_ENCRYPT = 1UL << 2, 125 IB_UVERBS_FLOW_ACTION_ESP_FLAGS_ESN_NEW_WINDOW = 1UL << 3, 126 }; 127 struct ib_uverbs_flow_action_esp_encap { 128 RDMA_UAPI_PTR(void *, val_ptr); 129 RDMA_UAPI_PTR(struct ib_uverbs_flow_action_esp_encap *, next_ptr); 130 __u16 len; 131 __u16 type; 132 }; 133 struct ib_uverbs_flow_action_esp { 134 __u32 spi; 135 __u32 seq; 136 __u32 tfc_pad; 137 __u32 flags; 138 __aligned_u64 hard_limit_pkts; 139 }; 140 enum ib_uverbs_read_counters_flags { 141 IB_UVERBS_READ_COUNTERS_PREFER_CACHED = 1 << 0, 142 }; 143 enum ib_uverbs_advise_mr_advice { 144 IB_UVERBS_ADVISE_MR_ADVICE_PREFETCH, 145 IB_UVERBS_ADVISE_MR_ADVICE_PREFETCH_WRITE, 146 IB_UVERBS_ADVISE_MR_ADVICE_PREFETCH_NO_FAULT, 147 }; 148 enum ib_uverbs_advise_mr_flag { 149 IB_UVERBS_ADVISE_MR_FLAG_FLUSH = 1 << 0, 150 }; 151 struct ib_uverbs_query_port_resp_ex { 152 struct ib_uverbs_query_port_resp legacy_resp; 153 __u16 port_cap_flags2; 154 __u8 reserved[2]; 155 __u32 active_speed_ex; 156 }; 157 struct ib_uverbs_qp_cap { 158 __u32 max_send_wr; 159 __u32 max_recv_wr; 160 __u32 max_send_sge; 161 __u32 max_recv_sge; 162 __u32 max_inline_data; 163 }; 164 enum rdma_driver_id { 165 RDMA_DRIVER_UNKNOWN, 166 RDMA_DRIVER_MLX5, 167 RDMA_DRIVER_MLX4, 168 RDMA_DRIVER_CXGB3, 169 RDMA_DRIVER_CXGB4, 170 RDMA_DRIVER_MTHCA, 171 RDMA_DRIVER_BNXT_RE, 172 RDMA_DRIVER_OCRDMA, 173 RDMA_DRIVER_NES, 174 RDMA_DRIVER_I40IW, 175 RDMA_DRIVER_IRDMA = RDMA_DRIVER_I40IW, 176 RDMA_DRIVER_VMW_PVRDMA, 177 RDMA_DRIVER_QEDR, 178 RDMA_DRIVER_HNS, 179 RDMA_DRIVER_USNIC, 180 RDMA_DRIVER_RXE, 181 RDMA_DRIVER_HFI1, 182 RDMA_DRIVER_QIB, 183 RDMA_DRIVER_EFA, 184 RDMA_DRIVER_SIW, 185 RDMA_DRIVER_ERDMA, 186 RDMA_DRIVER_MANA, 187 }; 188 enum ib_uverbs_gid_type { 189 IB_UVERBS_GID_TYPE_IB, 190 IB_UVERBS_GID_TYPE_ROCE_V1, 191 IB_UVERBS_GID_TYPE_ROCE_V2, 192 }; 193 struct ib_uverbs_gid_entry { 194 __aligned_u64 gid[2]; 195 __u32 gid_index; 196 __u32 port_num; 197 __u32 gid_type; 198 __u32 netdev_ifindex; 199 }; 200 #endif 201