• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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 IB_USER_CM_H
20 #define IB_USER_CM_H
21 #include <linux/types.h>
22 #include <rdma/ib_user_sa.h>
23 #define IB_USER_CM_ABI_VERSION 5
24 enum {
25   IB_USER_CM_CMD_CREATE_ID,
26   IB_USER_CM_CMD_DESTROY_ID,
27   IB_USER_CM_CMD_ATTR_ID,
28   IB_USER_CM_CMD_LISTEN,
29   IB_USER_CM_CMD_NOTIFY,
30   IB_USER_CM_CMD_SEND_REQ,
31   IB_USER_CM_CMD_SEND_REP,
32   IB_USER_CM_CMD_SEND_RTU,
33   IB_USER_CM_CMD_SEND_DREQ,
34   IB_USER_CM_CMD_SEND_DREP,
35   IB_USER_CM_CMD_SEND_REJ,
36   IB_USER_CM_CMD_SEND_MRA,
37   IB_USER_CM_CMD_SEND_LAP,
38   IB_USER_CM_CMD_SEND_APR,
39   IB_USER_CM_CMD_SEND_SIDR_REQ,
40   IB_USER_CM_CMD_SEND_SIDR_REP,
41   IB_USER_CM_CMD_EVENT,
42   IB_USER_CM_CMD_INIT_QP_ATTR,
43 };
44 struct ib_ucm_cmd_hdr {
45   __u32 cmd;
46   __u16 in;
47   __u16 out;
48 };
49 struct ib_ucm_create_id {
50   __aligned_u64 uid;
51   __aligned_u64 response;
52 };
53 struct ib_ucm_create_id_resp {
54   __u32 id;
55 };
56 struct ib_ucm_destroy_id {
57   __aligned_u64 response;
58   __u32 id;
59   __u32 reserved;
60 };
61 struct ib_ucm_destroy_id_resp {
62   __u32 events_reported;
63 };
64 struct ib_ucm_attr_id {
65   __aligned_u64 response;
66   __u32 id;
67   __u32 reserved;
68 };
69 struct ib_ucm_attr_id_resp {
70   __be64 service_id;
71   __be64 service_mask;
72   __be32 local_id;
73   __be32 remote_id;
74 };
75 struct ib_ucm_init_qp_attr {
76   __aligned_u64 response;
77   __u32 id;
78   __u32 qp_state;
79 };
80 struct ib_ucm_listen {
81   __be64 service_id;
82   __be64 service_mask;
83   __u32 id;
84   __u32 reserved;
85 };
86 struct ib_ucm_notify {
87   __u32 id;
88   __u32 event;
89 };
90 struct ib_ucm_private_data {
91   __aligned_u64 data;
92   __u32 id;
93   __u8 len;
94   __u8 reserved[3];
95 };
96 struct ib_ucm_req {
97   __u32 id;
98   __u32 qpn;
99   __u32 qp_type;
100   __u32 psn;
101   __be64 sid;
102   __aligned_u64 data;
103   __aligned_u64 primary_path;
104   __aligned_u64 alternate_path;
105   __u8 len;
106   __u8 peer_to_peer;
107   __u8 responder_resources;
108   __u8 initiator_depth;
109   __u8 remote_cm_response_timeout;
110   __u8 flow_control;
111   __u8 local_cm_response_timeout;
112   __u8 retry_count;
113   __u8 rnr_retry_count;
114   __u8 max_cm_retries;
115   __u8 srq;
116   __u8 reserved[5];
117 };
118 struct ib_ucm_rep {
119   __aligned_u64 uid;
120   __aligned_u64 data;
121   __u32 id;
122   __u32 qpn;
123   __u32 psn;
124   __u8 len;
125   __u8 responder_resources;
126   __u8 initiator_depth;
127   __u8 target_ack_delay;
128   __u8 failover_accepted;
129   __u8 flow_control;
130   __u8 rnr_retry_count;
131   __u8 srq;
132   __u8 reserved[4];
133 };
134 struct ib_ucm_info {
135   __u32 id;
136   __u32 status;
137   __aligned_u64 info;
138   __aligned_u64 data;
139   __u8 info_len;
140   __u8 data_len;
141   __u8 reserved[6];
142 };
143 struct ib_ucm_mra {
144   __aligned_u64 data;
145   __u32 id;
146   __u8 len;
147   __u8 timeout;
148   __u8 reserved[2];
149 };
150 struct ib_ucm_lap {
151   __aligned_u64 path;
152   __aligned_u64 data;
153   __u32 id;
154   __u8 len;
155   __u8 reserved[3];
156 };
157 struct ib_ucm_sidr_req {
158   __u32 id;
159   __u32 timeout;
160   __be64 sid;
161   __aligned_u64 data;
162   __aligned_u64 path;
163   __u16 reserved_pkey;
164   __u8 len;
165   __u8 max_cm_retries;
166   __u8 reserved[4];
167 };
168 struct ib_ucm_sidr_rep {
169   __u32 id;
170   __u32 qpn;
171   __u32 qkey;
172   __u32 status;
173   __aligned_u64 info;
174   __aligned_u64 data;
175   __u8 info_len;
176   __u8 data_len;
177   __u8 reserved[6];
178 };
179 struct ib_ucm_event_get {
180   __aligned_u64 response;
181   __aligned_u64 data;
182   __aligned_u64 info;
183   __u8 data_len;
184   __u8 info_len;
185   __u8 reserved[6];
186 };
187 struct ib_ucm_req_event_resp {
188   struct ib_user_path_rec primary_path;
189   struct ib_user_path_rec alternate_path;
190   __be64 remote_ca_guid;
191   __u32 remote_qkey;
192   __u32 remote_qpn;
193   __u32 qp_type;
194   __u32 starting_psn;
195   __u8 responder_resources;
196   __u8 initiator_depth;
197   __u8 local_cm_response_timeout;
198   __u8 flow_control;
199   __u8 remote_cm_response_timeout;
200   __u8 retry_count;
201   __u8 rnr_retry_count;
202   __u8 srq;
203   __u8 port;
204   __u8 reserved[7];
205 };
206 struct ib_ucm_rep_event_resp {
207   __be64 remote_ca_guid;
208   __u32 remote_qkey;
209   __u32 remote_qpn;
210   __u32 starting_psn;
211   __u8 responder_resources;
212   __u8 initiator_depth;
213   __u8 target_ack_delay;
214   __u8 failover_accepted;
215   __u8 flow_control;
216   __u8 rnr_retry_count;
217   __u8 srq;
218   __u8 reserved[5];
219 };
220 struct ib_ucm_rej_event_resp {
221   __u32 reason;
222 };
223 struct ib_ucm_mra_event_resp {
224   __u8 timeout;
225   __u8 reserved[3];
226 };
227 struct ib_ucm_lap_event_resp {
228   struct ib_user_path_rec path;
229 };
230 struct ib_ucm_apr_event_resp {
231   __u32 status;
232 };
233 struct ib_ucm_sidr_req_event_resp {
234   __u16 pkey;
235   __u8 port;
236   __u8 reserved;
237 };
238 struct ib_ucm_sidr_rep_event_resp {
239   __u32 status;
240   __u32 qkey;
241   __u32 qpn;
242 };
243 #define IB_UCM_PRES_DATA 0x01
244 #define IB_UCM_PRES_INFO 0x02
245 #define IB_UCM_PRES_PRIMARY 0x04
246 #define IB_UCM_PRES_ALTERNATE 0x08
247 struct ib_ucm_event_resp {
248   __aligned_u64 uid;
249   __u32 id;
250   __u32 event;
251   __u32 present;
252   __u32 reserved;
253   union {
254     struct ib_ucm_req_event_resp req_resp;
255     struct ib_ucm_rep_event_resp rep_resp;
256     struct ib_ucm_rej_event_resp rej_resp;
257     struct ib_ucm_mra_event_resp mra_resp;
258     struct ib_ucm_lap_event_resp lap_resp;
259     struct ib_ucm_apr_event_resp apr_resp;
260     struct ib_ucm_sidr_req_event_resp sidr_req_resp;
261     struct ib_ucm_sidr_rep_event_resp sidr_rep_resp;
262     __u32 send_status;
263   } u;
264 };
265 #endif
266