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