blob: 5ba46b87bccf4ff2ec70a72c7f75d933f1867343 [file] [log] [blame]
Ben Cheng655a7c02013-10-16 16:09:24 -07001/****************************************************************************
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>
Ben Cheng655a7c02013-10-16 16:09:24 -070023#define IB_USER_CM_ABI_VERSION 5
24enum {
Tao Baod7db5942015-01-28 10:07:51 -080025 IB_USER_CM_CMD_CREATE_ID,
26 IB_USER_CM_CMD_DESTROY_ID,
Tao Baod7db5942015-01-28 10:07:51 -080027 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,
Tao Baod7db5942015-01-28 10:07:51 -080031 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,
Tao Baod7db5942015-01-28 10:07:51 -080035 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,
Tao Baod7db5942015-01-28 10:07:51 -080039 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,
Ben Cheng655a7c02013-10-16 16:09:24 -070043};
44struct ib_ucm_cmd_hdr {
Tao Baod7db5942015-01-28 10:07:51 -080045 __u32 cmd;
46 __u16 in;
Tao Baod7db5942015-01-28 10:07:51 -080047 __u16 out;
Ben Cheng655a7c02013-10-16 16:09:24 -070048};
49struct ib_ucm_create_id {
Christopher Ferris76a1d452018-06-27 14:12:29 -070050 __aligned_u64 uid;
51 __aligned_u64 response;
Ben Cheng655a7c02013-10-16 16:09:24 -070052};
53struct ib_ucm_create_id_resp {
Tao Baod7db5942015-01-28 10:07:51 -080054 __u32 id;
Ben Cheng655a7c02013-10-16 16:09:24 -070055};
56struct ib_ucm_destroy_id {
Christopher Ferris76a1d452018-06-27 14:12:29 -070057 __aligned_u64 response;
Tao Baod7db5942015-01-28 10:07:51 -080058 __u32 id;
Tao Baod7db5942015-01-28 10:07:51 -080059 __u32 reserved;
Ben Cheng655a7c02013-10-16 16:09:24 -070060};
61struct ib_ucm_destroy_id_resp {
Tao Baod7db5942015-01-28 10:07:51 -080062 __u32 events_reported;
Ben Cheng655a7c02013-10-16 16:09:24 -070063};
64struct ib_ucm_attr_id {
Christopher Ferris76a1d452018-06-27 14:12:29 -070065 __aligned_u64 response;
Tao Baod7db5942015-01-28 10:07:51 -080066 __u32 id;
Tao Baod7db5942015-01-28 10:07:51 -080067 __u32 reserved;
Ben Cheng655a7c02013-10-16 16:09:24 -070068};
69struct ib_ucm_attr_id_resp {
Tao Baod7db5942015-01-28 10:07:51 -080070 __be64 service_id;
Tao Baod7db5942015-01-28 10:07:51 -080071 __be64 service_mask;
72 __be32 local_id;
73 __be32 remote_id;
Ben Cheng655a7c02013-10-16 16:09:24 -070074};
Ben Cheng655a7c02013-10-16 16:09:24 -070075struct ib_ucm_init_qp_attr {
Christopher Ferris76a1d452018-06-27 14:12:29 -070076 __aligned_u64 response;
Tao Baod7db5942015-01-28 10:07:51 -080077 __u32 id;
78 __u32 qp_state;
Ben Cheng655a7c02013-10-16 16:09:24 -070079};
80struct ib_ucm_listen {
Tao Baod7db5942015-01-28 10:07:51 -080081 __be64 service_id;
82 __be64 service_mask;
Tao Baod7db5942015-01-28 10:07:51 -080083 __u32 id;
84 __u32 reserved;
Ben Cheng655a7c02013-10-16 16:09:24 -070085};
86struct ib_ucm_notify {
Tao Baod7db5942015-01-28 10:07:51 -080087 __u32 id;
88 __u32 event;
Ben Cheng655a7c02013-10-16 16:09:24 -070089};
90struct ib_ucm_private_data {
Christopher Ferris76a1d452018-06-27 14:12:29 -070091 __aligned_u64 data;
Tao Baod7db5942015-01-28 10:07:51 -080092 __u32 id;
93 __u8 len;
94 __u8 reserved[3];
Ben Cheng655a7c02013-10-16 16:09:24 -070095};
96struct ib_ucm_req {
Tao Baod7db5942015-01-28 10:07:51 -080097 __u32 id;
98 __u32 qpn;
Tao Baod7db5942015-01-28 10:07:51 -080099 __u32 qp_type;
100 __u32 psn;
101 __be64 sid;
Christopher Ferris76a1d452018-06-27 14:12:29 -0700102 __aligned_u64 data;
103 __aligned_u64 primary_path;
104 __aligned_u64 alternate_path;
Tao Baod7db5942015-01-28 10:07:51 -0800105 __u8 len;
106 __u8 peer_to_peer;
Tao Baod7db5942015-01-28 10:07:51 -0800107 __u8 responder_resources;
108 __u8 initiator_depth;
109 __u8 remote_cm_response_timeout;
110 __u8 flow_control;
Tao Baod7db5942015-01-28 10:07:51 -0800111 __u8 local_cm_response_timeout;
112 __u8 retry_count;
113 __u8 rnr_retry_count;
114 __u8 max_cm_retries;
Tao Baod7db5942015-01-28 10:07:51 -0800115 __u8 srq;
116 __u8 reserved[5];
Ben Cheng655a7c02013-10-16 16:09:24 -0700117};
118struct ib_ucm_rep {
Christopher Ferris76a1d452018-06-27 14:12:29 -0700119 __aligned_u64 uid;
120 __aligned_u64 data;
Tao Baod7db5942015-01-28 10:07:51 -0800121 __u32 id;
122 __u32 qpn;
Tao Baod7db5942015-01-28 10:07:51 -0800123 __u32 psn;
124 __u8 len;
125 __u8 responder_resources;
126 __u8 initiator_depth;
Tao Baod7db5942015-01-28 10:07:51 -0800127 __u8 target_ack_delay;
128 __u8 failover_accepted;
129 __u8 flow_control;
130 __u8 rnr_retry_count;
Tao Baod7db5942015-01-28 10:07:51 -0800131 __u8 srq;
132 __u8 reserved[4];
Ben Cheng655a7c02013-10-16 16:09:24 -0700133};
134struct ib_ucm_info {
Tao Baod7db5942015-01-28 10:07:51 -0800135 __u32 id;
136 __u32 status;
Christopher Ferris76a1d452018-06-27 14:12:29 -0700137 __aligned_u64 info;
138 __aligned_u64 data;
Tao Baod7db5942015-01-28 10:07:51 -0800139 __u8 info_len;
140 __u8 data_len;
141 __u8 reserved[6];
Ben Cheng655a7c02013-10-16 16:09:24 -0700142};
Ben Cheng655a7c02013-10-16 16:09:24 -0700143struct ib_ucm_mra {
Christopher Ferris76a1d452018-06-27 14:12:29 -0700144 __aligned_u64 data;
Tao Baod7db5942015-01-28 10:07:51 -0800145 __u32 id;
146 __u8 len;
Tao Baod7db5942015-01-28 10:07:51 -0800147 __u8 timeout;
148 __u8 reserved[2];
Ben Cheng655a7c02013-10-16 16:09:24 -0700149};
150struct ib_ucm_lap {
Christopher Ferris76a1d452018-06-27 14:12:29 -0700151 __aligned_u64 path;
152 __aligned_u64 data;
Tao Baod7db5942015-01-28 10:07:51 -0800153 __u32 id;
154 __u8 len;
Tao Baod7db5942015-01-28 10:07:51 -0800155 __u8 reserved[3];
Ben Cheng655a7c02013-10-16 16:09:24 -0700156};
157struct ib_ucm_sidr_req {
Tao Baod7db5942015-01-28 10:07:51 -0800158 __u32 id;
Tao Baod7db5942015-01-28 10:07:51 -0800159 __u32 timeout;
160 __be64 sid;
Christopher Ferris76a1d452018-06-27 14:12:29 -0700161 __aligned_u64 data;
162 __aligned_u64 path;
Tao Baod7db5942015-01-28 10:07:51 -0800163 __u16 reserved_pkey;
164 __u8 len;
165 __u8 max_cm_retries;
166 __u8 reserved[4];
Ben Cheng655a7c02013-10-16 16:09:24 -0700167};
168struct ib_ucm_sidr_rep {
Tao Baod7db5942015-01-28 10:07:51 -0800169 __u32 id;
170 __u32 qpn;
Tao Baod7db5942015-01-28 10:07:51 -0800171 __u32 qkey;
172 __u32 status;
Christopher Ferris76a1d452018-06-27 14:12:29 -0700173 __aligned_u64 info;
174 __aligned_u64 data;
Tao Baod7db5942015-01-28 10:07:51 -0800175 __u8 info_len;
176 __u8 data_len;
177 __u8 reserved[6];
Ben Cheng655a7c02013-10-16 16:09:24 -0700178};
Ben Cheng655a7c02013-10-16 16:09:24 -0700179struct ib_ucm_event_get {
Christopher Ferris76a1d452018-06-27 14:12:29 -0700180 __aligned_u64 response;
181 __aligned_u64 data;
182 __aligned_u64 info;
Tao Baod7db5942015-01-28 10:07:51 -0800183 __u8 data_len;
184 __u8 info_len;
185 __u8 reserved[6];
Ben Cheng655a7c02013-10-16 16:09:24 -0700186};
Ben Cheng655a7c02013-10-16 16:09:24 -0700187struct ib_ucm_req_event_resp {
Tao Baod7db5942015-01-28 10:07:51 -0800188 struct ib_user_path_rec primary_path;
189 struct ib_user_path_rec alternate_path;
190 __be64 remote_ca_guid;
Tao Baod7db5942015-01-28 10:07:51 -0800191 __u32 remote_qkey;
192 __u32 remote_qpn;
193 __u32 qp_type;
194 __u32 starting_psn;
Tao Baod7db5942015-01-28 10:07:51 -0800195 __u8 responder_resources;
196 __u8 initiator_depth;
197 __u8 local_cm_response_timeout;
198 __u8 flow_control;
Tao Baod7db5942015-01-28 10:07:51 -0800199 __u8 remote_cm_response_timeout;
200 __u8 retry_count;
201 __u8 rnr_retry_count;
202 __u8 srq;
Tao Baod7db5942015-01-28 10:07:51 -0800203 __u8 port;
204 __u8 reserved[7];
Ben Cheng655a7c02013-10-16 16:09:24 -0700205};
206struct ib_ucm_rep_event_resp {
Tao Baod7db5942015-01-28 10:07:51 -0800207 __be64 remote_ca_guid;
208 __u32 remote_qkey;
209 __u32 remote_qpn;
210 __u32 starting_psn;
Tao Baod7db5942015-01-28 10:07:51 -0800211 __u8 responder_resources;
212 __u8 initiator_depth;
213 __u8 target_ack_delay;
214 __u8 failover_accepted;
Tao Baod7db5942015-01-28 10:07:51 -0800215 __u8 flow_control;
216 __u8 rnr_retry_count;
217 __u8 srq;
218 __u8 reserved[5];
Ben Cheng655a7c02013-10-16 16:09:24 -0700219};
220struct ib_ucm_rej_event_resp {
Tao Baod7db5942015-01-28 10:07:51 -0800221 __u32 reason;
Ben Cheng655a7c02013-10-16 16:09:24 -0700222};
Ben Cheng655a7c02013-10-16 16:09:24 -0700223struct ib_ucm_mra_event_resp {
Tao Baod7db5942015-01-28 10:07:51 -0800224 __u8 timeout;
225 __u8 reserved[3];
Ben Cheng655a7c02013-10-16 16:09:24 -0700226};
Ben Cheng655a7c02013-10-16 16:09:24 -0700227struct ib_ucm_lap_event_resp {
Tao Baod7db5942015-01-28 10:07:51 -0800228 struct ib_user_path_rec path;
Ben Cheng655a7c02013-10-16 16:09:24 -0700229};
230struct ib_ucm_apr_event_resp {
Tao Baod7db5942015-01-28 10:07:51 -0800231 __u32 status;
Ben Cheng655a7c02013-10-16 16:09:24 -0700232};
233struct ib_ucm_sidr_req_event_resp {
Tao Baod7db5942015-01-28 10:07:51 -0800234 __u16 pkey;
Tao Baod7db5942015-01-28 10:07:51 -0800235 __u8 port;
236 __u8 reserved;
Ben Cheng655a7c02013-10-16 16:09:24 -0700237};
238struct ib_ucm_sidr_rep_event_resp {
Tao Baod7db5942015-01-28 10:07:51 -0800239 __u32 status;
240 __u32 qkey;
241 __u32 qpn;
Ben Cheng655a7c02013-10-16 16:09:24 -0700242};
Ben Cheng655a7c02013-10-16 16:09:24 -0700243#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
Ben Cheng655a7c02013-10-16 16:09:24 -0700247struct ib_ucm_event_resp {
Christopher Ferris76a1d452018-06-27 14:12:29 -0700248 __aligned_u64 uid;
Tao Baod7db5942015-01-28 10:07:51 -0800249 __u32 id;
250 __u32 event;
Tao Baod7db5942015-01-28 10:07:51 -0800251 __u32 present;
252 __u32 reserved;
253 union {
254 struct ib_ucm_req_event_resp req_resp;
Tao Baod7db5942015-01-28 10:07:51 -0800255 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;
Tao Baod7db5942015-01-28 10:07:51 -0800259 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;
Tao Baod7db5942015-01-28 10:07:51 -0800263 } u;
Ben Cheng655a7c02013-10-16 16:09:24 -0700264};
265#endif