rdma_user_cm.h revision 38062f954c637861348dd8078cefb73554e6f12c
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 RDMA_USER_CM_H 20#define RDMA_USER_CM_H 21#include <linux/types.h> 22#include <linux/in6.h> 23/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 24#include <rdma/ib_user_verbs.h> 25#include <rdma/ib_user_sa.h> 26#define RDMA_USER_CM_ABI_VERSION 4 27#define RDMA_MAX_PRIVATE_DATA 256 28/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 29enum { 30 RDMA_USER_CM_CMD_CREATE_ID, 31 RDMA_USER_CM_CMD_DESTROY_ID, 32 RDMA_USER_CM_CMD_BIND_IP, 33/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 34 RDMA_USER_CM_CMD_RESOLVE_IP, 35 RDMA_USER_CM_CMD_RESOLVE_ROUTE, 36 RDMA_USER_CM_CMD_QUERY_ROUTE, 37 RDMA_USER_CM_CMD_CONNECT, 38/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 39 RDMA_USER_CM_CMD_LISTEN, 40 RDMA_USER_CM_CMD_ACCEPT, 41 RDMA_USER_CM_CMD_REJECT, 42 RDMA_USER_CM_CMD_DISCONNECT, 43/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 44 RDMA_USER_CM_CMD_INIT_QP_ATTR, 45 RDMA_USER_CM_CMD_GET_EVENT, 46 RDMA_USER_CM_CMD_GET_OPTION, 47 RDMA_USER_CM_CMD_SET_OPTION, 48/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 49 RDMA_USER_CM_CMD_NOTIFY, 50 RDMA_USER_CM_CMD_JOIN_IP_MCAST, 51 RDMA_USER_CM_CMD_LEAVE_MCAST, 52 RDMA_USER_CM_CMD_MIGRATE_ID, 53/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 54 RDMA_USER_CM_CMD_QUERY, 55 RDMA_USER_CM_CMD_BIND, 56 RDMA_USER_CM_CMD_RESOLVE_ADDR, 57 RDMA_USER_CM_CMD_JOIN_MCAST 58/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 59}; 60struct rdma_ucm_cmd_hdr { 61 __u32 cmd; 62 __u16 in; 63/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 64 __u16 out; 65}; 66struct rdma_ucm_create_id { 67 __u64 uid; 68/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 69 __u64 response; 70 __u16 ps; 71 __u8 qp_type; 72 __u8 reserved[5]; 73/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 74}; 75struct rdma_ucm_create_id_resp { 76 __u32 id; 77}; 78/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 79struct rdma_ucm_destroy_id { 80 __u64 response; 81 __u32 id; 82 __u32 reserved; 83/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 84}; 85struct rdma_ucm_destroy_id_resp { 86 __u32 events_reported; 87}; 88/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 89struct rdma_ucm_bind_ip { 90 __u64 response; 91 struct sockaddr_in6 addr; 92 __u32 id; 93/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 94}; 95struct rdma_ucm_bind { 96 __u32 id; 97 __u16 addr_size; 98/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 99 __u16 reserved; 100 struct sockaddr_storage addr; 101}; 102struct rdma_ucm_resolve_ip { 103/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 104 struct sockaddr_in6 src_addr; 105 struct sockaddr_in6 dst_addr; 106 __u32 id; 107 __u32 timeout_ms; 108/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 109}; 110struct rdma_ucm_resolve_addr { 111 __u32 id; 112 __u32 timeout_ms; 113/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 114 __u16 src_size; 115 __u16 dst_size; 116 __u32 reserved; 117 struct sockaddr_storage src_addr; 118/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 119 struct sockaddr_storage dst_addr; 120}; 121struct rdma_ucm_resolve_route { 122 __u32 id; 123/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 124 __u32 timeout_ms; 125}; 126enum { 127 RDMA_USER_CM_QUERY_ADDR, 128/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 129 RDMA_USER_CM_QUERY_PATH, 130 RDMA_USER_CM_QUERY_GID 131}; 132struct rdma_ucm_query { 133/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 134 __u64 response; 135 __u32 id; 136 __u32 option; 137}; 138/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 139struct rdma_ucm_query_route_resp { 140 __u64 node_guid; 141 struct ib_user_path_rec ib_route[2]; 142 struct sockaddr_in6 src_addr; 143/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 144 struct sockaddr_in6 dst_addr; 145 __u32 num_paths; 146 __u8 port_num; 147 __u8 reserved[3]; 148/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 149}; 150struct rdma_ucm_query_addr_resp { 151 __u64 node_guid; 152 __u8 port_num; 153/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 154 __u8 reserved; 155 __u16 pkey; 156 __u16 src_size; 157 __u16 dst_size; 158/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 159 struct sockaddr_storage src_addr; 160 struct sockaddr_storage dst_addr; 161}; 162struct rdma_ucm_query_path_resp { 163/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 164 __u32 num_paths; 165 __u32 reserved; 166 struct ib_path_rec_data path_data[0]; 167}; 168/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 169struct rdma_ucm_conn_param { 170 __u32 qp_num; 171 __u32 qkey; 172 __u8 private_data[RDMA_MAX_PRIVATE_DATA]; 173/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 174 __u8 private_data_len; 175 __u8 srq; 176 __u8 responder_resources; 177 __u8 initiator_depth; 178/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 179 __u8 flow_control; 180 __u8 retry_count; 181 __u8 rnr_retry_count; 182 __u8 valid; 183/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 184}; 185struct rdma_ucm_ud_param { 186 __u32 qp_num; 187 __u32 qkey; 188/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 189 struct ib_uverbs_ah_attr ah_attr; 190 __u8 private_data[RDMA_MAX_PRIVATE_DATA]; 191 __u8 private_data_len; 192 __u8 reserved[7]; 193/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 194}; 195struct rdma_ucm_connect { 196 struct rdma_ucm_conn_param conn_param; 197 __u32 id; 198/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 199 __u32 reserved; 200}; 201struct rdma_ucm_listen { 202 __u32 id; 203/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 204 __u32 backlog; 205}; 206struct rdma_ucm_accept { 207 __u64 uid; 208/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 209 struct rdma_ucm_conn_param conn_param; 210 __u32 id; 211 __u32 reserved; 212}; 213/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 214struct rdma_ucm_reject { 215 __u32 id; 216 __u8 private_data_len; 217 __u8 reserved[3]; 218/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 219 __u8 private_data[RDMA_MAX_PRIVATE_DATA]; 220}; 221struct rdma_ucm_disconnect { 222 __u32 id; 223/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 224}; 225struct rdma_ucm_init_qp_attr { 226 __u64 response; 227 __u32 id; 228/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 229 __u32 qp_state; 230}; 231struct rdma_ucm_notify { 232 __u32 id; 233/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 234 __u32 event; 235}; 236struct rdma_ucm_join_ip_mcast { 237 __u64 response; 238/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 239 __u64 uid; 240 struct sockaddr_in6 addr; 241 __u32 id; 242}; 243/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 244struct rdma_ucm_join_mcast { 245 __u64 response; 246 __u64 uid; 247 __u32 id; 248/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 249 __u16 addr_size; 250 __u16 reserved; 251 struct sockaddr_storage addr; 252}; 253/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 254struct rdma_ucm_get_event { 255 __u64 response; 256}; 257struct rdma_ucm_event_resp { 258/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 259 __u64 uid; 260 __u32 id; 261 __u32 event; 262 __u32 status; 263/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 264 union { 265 struct rdma_ucm_conn_param conn; 266 struct rdma_ucm_ud_param ud; 267 } param; 268/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 269}; 270enum { 271 RDMA_OPTION_ID = 0, 272 RDMA_OPTION_IB = 1 273/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 274}; 275enum { 276 RDMA_OPTION_ID_TOS = 0, 277 RDMA_OPTION_ID_REUSEADDR = 1, 278/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 279 RDMA_OPTION_ID_AFONLY = 2, 280 RDMA_OPTION_IB_PATH = 1 281}; 282struct rdma_ucm_set_option { 283/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 284 __u64 optval; 285 __u32 id; 286 __u32 level; 287 __u32 optname; 288/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 289 __u32 optlen; 290}; 291struct rdma_ucm_migrate_id { 292 __u64 response; 293/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 294 __u32 id; 295 __u32 fd; 296}; 297struct rdma_ucm_migrate_resp { 298/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 299 __u32 events_reported; 300}; 301#endif 302