aboutsummaryrefslogtreecommitdiffstats
path: root/include/rdma
diff options
context:
space:
mode:
Diffstat (limited to 'include/rdma')
-rw-r--r--include/rdma/ib_cm.h1
-rw-r--r--include/rdma/ib_mad.h38
-rw-r--r--include/rdma/ib_sa.h41
-rw-r--r--include/rdma/ib_user_cm.h72
-rw-r--r--include/rdma/ib_user_verbs.h21
-rw-r--r--include/rdma/ib_verbs.h1
6 files changed, 158 insertions, 16 deletions
diff --git a/include/rdma/ib_cm.h b/include/rdma/ib_cm.h
index 77fe9039209..5308683c8c4 100644
--- a/include/rdma/ib_cm.h
+++ b/include/rdma/ib_cm.h
@@ -290,6 +290,7 @@ struct ib_cm_id {
290 enum ib_cm_lap_state lap_state; /* internal CM/debug use */ 290 enum ib_cm_lap_state lap_state; /* internal CM/debug use */
291 __be32 local_id; 291 __be32 local_id;
292 __be32 remote_id; 292 __be32 remote_id;
293 u32 remote_cm_qpn; /* 1 unless redirected */
293}; 294};
294 295
295/** 296/**
diff --git a/include/rdma/ib_mad.h b/include/rdma/ib_mad.h
index fc6b1c18ffc..4172e6841e3 100644
--- a/include/rdma/ib_mad.h
+++ b/include/rdma/ib_mad.h
@@ -108,6 +108,13 @@
108#define IB_QP1_QKEY 0x80010000 108#define IB_QP1_QKEY 0x80010000
109#define IB_QP_SET_QKEY 0x80000000 109#define IB_QP_SET_QKEY 0x80000000
110 110
111enum {
112 IB_MGMT_MAD_DATA = 232,
113 IB_MGMT_RMPP_DATA = 220,
114 IB_MGMT_VENDOR_DATA = 216,
115 IB_MGMT_SA_DATA = 200
116};
117
111struct ib_mad_hdr { 118struct ib_mad_hdr {
112 u8 base_version; 119 u8 base_version;
113 u8 mgmt_class; 120 u8 mgmt_class;
@@ -149,20 +156,20 @@ struct ib_sa_hdr {
149 156
150struct ib_mad { 157struct ib_mad {
151 struct ib_mad_hdr mad_hdr; 158 struct ib_mad_hdr mad_hdr;
152 u8 data[232]; 159 u8 data[IB_MGMT_MAD_DATA];
153}; 160};
154 161
155struct ib_rmpp_mad { 162struct ib_rmpp_mad {
156 struct ib_mad_hdr mad_hdr; 163 struct ib_mad_hdr mad_hdr;
157 struct ib_rmpp_hdr rmpp_hdr; 164 struct ib_rmpp_hdr rmpp_hdr;
158 u8 data[220]; 165 u8 data[IB_MGMT_RMPP_DATA];
159}; 166};
160 167
161struct ib_sa_mad { 168struct ib_sa_mad {
162 struct ib_mad_hdr mad_hdr; 169 struct ib_mad_hdr mad_hdr;
163 struct ib_rmpp_hdr rmpp_hdr; 170 struct ib_rmpp_hdr rmpp_hdr;
164 struct ib_sa_hdr sa_hdr; 171 struct ib_sa_hdr sa_hdr;
165 u8 data[200]; 172 u8 data[IB_MGMT_SA_DATA];
166} __attribute__ ((packed)); 173} __attribute__ ((packed));
167 174
168struct ib_vendor_mad { 175struct ib_vendor_mad {
@@ -170,7 +177,28 @@ struct ib_vendor_mad {
170 struct ib_rmpp_hdr rmpp_hdr; 177 struct ib_rmpp_hdr rmpp_hdr;
171 u8 reserved; 178 u8 reserved;
172 u8 oui[3]; 179 u8 oui[3];
173 u8 data[216]; 180 u8 data[IB_MGMT_VENDOR_DATA];
181};
182
183struct ib_class_port_info
184{
185 u8 base_version;
186 u8 class_version;
187 __be16 capability_mask;
188 u8 reserved[3];
189 u8 resp_time_value;
190 u8 redirect_gid[16];
191 __be32 redirect_tcslfl;
192 __be16 redirect_lid;
193 __be16 redirect_pkey;
194 __be32 redirect_qp;
195 __be32 redirect_qkey;
196 u8 trap_gid[16];
197 __be32 trap_tcslfl;
198 __be16 trap_lid;
199 __be16 trap_pkey;
200 __be32 trap_hlqp;
201 __be32 trap_qkey;
174}; 202};
175 203
176/** 204/**
@@ -568,7 +596,7 @@ struct ib_mad_send_buf * ib_create_send_mad(struct ib_mad_agent *mad_agent,
568 u32 remote_qpn, u16 pkey_index, 596 u32 remote_qpn, u16 pkey_index,
569 struct ib_ah *ah, int rmpp_active, 597 struct ib_ah *ah, int rmpp_active,
570 int hdr_len, int data_len, 598 int hdr_len, int data_len,
571 unsigned int __nocast gfp_mask); 599 gfp_t gfp_mask);
572 600
573/** 601/**
574 * ib_free_send_mad - Returns data buffers used to send a MAD. 602 * ib_free_send_mad - Returns data buffers used to send a MAD.
diff --git a/include/rdma/ib_sa.h b/include/rdma/ib_sa.h
index c022edfc49d..f404fe21cc2 100644
--- a/include/rdma/ib_sa.h
+++ b/include/rdma/ib_sa.h
@@ -46,7 +46,36 @@ enum {
46 46
47 IB_SA_METHOD_GET_TABLE = 0x12, 47 IB_SA_METHOD_GET_TABLE = 0x12,
48 IB_SA_METHOD_GET_TABLE_RESP = 0x92, 48 IB_SA_METHOD_GET_TABLE_RESP = 0x92,
49 IB_SA_METHOD_DELETE = 0x15 49 IB_SA_METHOD_DELETE = 0x15,
50 IB_SA_METHOD_DELETE_RESP = 0x95,
51 IB_SA_METHOD_GET_MULTI = 0x14,
52 IB_SA_METHOD_GET_MULTI_RESP = 0x94,
53 IB_SA_METHOD_GET_TRACE_TBL = 0x13
54};
55
56enum {
57 IB_SA_ATTR_CLASS_PORTINFO = 0x01,
58 IB_SA_ATTR_NOTICE = 0x02,
59 IB_SA_ATTR_INFORM_INFO = 0x03,
60 IB_SA_ATTR_NODE_REC = 0x11,
61 IB_SA_ATTR_PORT_INFO_REC = 0x12,
62 IB_SA_ATTR_SL2VL_REC = 0x13,
63 IB_SA_ATTR_SWITCH_REC = 0x14,
64 IB_SA_ATTR_LINEAR_FDB_REC = 0x15,
65 IB_SA_ATTR_RANDOM_FDB_REC = 0x16,
66 IB_SA_ATTR_MCAST_FDB_REC = 0x17,
67 IB_SA_ATTR_SM_INFO_REC = 0x18,
68 IB_SA_ATTR_LINK_REC = 0x20,
69 IB_SA_ATTR_GUID_INFO_REC = 0x30,
70 IB_SA_ATTR_SERVICE_REC = 0x31,
71 IB_SA_ATTR_PARTITION_REC = 0x33,
72 IB_SA_ATTR_PATH_REC = 0x35,
73 IB_SA_ATTR_VL_ARB_REC = 0x36,
74 IB_SA_ATTR_MC_MEMBER_REC = 0x38,
75 IB_SA_ATTR_TRACE_REC = 0x39,
76 IB_SA_ATTR_MULTI_PATH_REC = 0x3a,
77 IB_SA_ATTR_SERVICE_ASSOC_REC = 0x3b,
78 IB_SA_ATTR_INFORM_INFO_REC = 0xf3
50}; 79};
51 80
52enum ib_sa_selector { 81enum ib_sa_selector {
@@ -256,7 +285,7 @@ void ib_sa_cancel_query(int id, struct ib_sa_query *query);
256int ib_sa_path_rec_get(struct ib_device *device, u8 port_num, 285int ib_sa_path_rec_get(struct ib_device *device, u8 port_num,
257 struct ib_sa_path_rec *rec, 286 struct ib_sa_path_rec *rec,
258 ib_sa_comp_mask comp_mask, 287 ib_sa_comp_mask comp_mask,
259 int timeout_ms, unsigned int __nocast gfp_mask, 288 int timeout_ms, gfp_t gfp_mask,
260 void (*callback)(int status, 289 void (*callback)(int status,
261 struct ib_sa_path_rec *resp, 290 struct ib_sa_path_rec *resp,
262 void *context), 291 void *context),
@@ -267,7 +296,7 @@ int ib_sa_mcmember_rec_query(struct ib_device *device, u8 port_num,
267 u8 method, 296 u8 method,
268 struct ib_sa_mcmember_rec *rec, 297 struct ib_sa_mcmember_rec *rec,
269 ib_sa_comp_mask comp_mask, 298 ib_sa_comp_mask comp_mask,
270 int timeout_ms, unsigned int __nocast gfp_mask, 299 int timeout_ms, gfp_t gfp_mask,
271 void (*callback)(int status, 300 void (*callback)(int status,
272 struct ib_sa_mcmember_rec *resp, 301 struct ib_sa_mcmember_rec *resp,
273 void *context), 302 void *context),
@@ -278,7 +307,7 @@ int ib_sa_service_rec_query(struct ib_device *device, u8 port_num,
278 u8 method, 307 u8 method,
279 struct ib_sa_service_rec *rec, 308 struct ib_sa_service_rec *rec,
280 ib_sa_comp_mask comp_mask, 309 ib_sa_comp_mask comp_mask,
281 int timeout_ms, unsigned int __nocast gfp_mask, 310 int timeout_ms, gfp_t gfp_mask,
282 void (*callback)(int status, 311 void (*callback)(int status,
283 struct ib_sa_service_rec *resp, 312 struct ib_sa_service_rec *resp,
284 void *context), 313 void *context),
@@ -313,7 +342,7 @@ static inline int
313ib_sa_mcmember_rec_set(struct ib_device *device, u8 port_num, 342ib_sa_mcmember_rec_set(struct ib_device *device, u8 port_num,
314 struct ib_sa_mcmember_rec *rec, 343 struct ib_sa_mcmember_rec *rec,
315 ib_sa_comp_mask comp_mask, 344 ib_sa_comp_mask comp_mask,
316 int timeout_ms, unsigned int __nocast gfp_mask, 345 int timeout_ms, gfp_t gfp_mask,
317 void (*callback)(int status, 346 void (*callback)(int status,
318 struct ib_sa_mcmember_rec *resp, 347 struct ib_sa_mcmember_rec *resp,
319 void *context), 348 void *context),
@@ -355,7 +384,7 @@ static inline int
355ib_sa_mcmember_rec_delete(struct ib_device *device, u8 port_num, 384ib_sa_mcmember_rec_delete(struct ib_device *device, u8 port_num,
356 struct ib_sa_mcmember_rec *rec, 385 struct ib_sa_mcmember_rec *rec,
357 ib_sa_comp_mask comp_mask, 386 ib_sa_comp_mask comp_mask,
358 int timeout_ms, unsigned int __nocast gfp_mask, 387 int timeout_ms, gfp_t gfp_mask,
359 void (*callback)(int status, 388 void (*callback)(int status,
360 struct ib_sa_mcmember_rec *resp, 389 struct ib_sa_mcmember_rec *resp,
361 void *context), 390 void *context),
diff --git a/include/rdma/ib_user_cm.h b/include/rdma/ib_user_cm.h
index 72182d16778..e4d1654276a 100644
--- a/include/rdma/ib_user_cm.h
+++ b/include/rdma/ib_user_cm.h
@@ -1,5 +1,6 @@
1/* 1/*
2 * Copyright (c) 2005 Topspin Communications. All rights reserved. 2 * Copyright (c) 2005 Topspin Communications. All rights reserved.
3 * Copyright (c) 2005 Intel Corporation. All rights reserved.
3 * 4 *
4 * This software is available to you under a choice of one of two 5 * This software is available to you under a choice of one of two
5 * licenses. You may choose to be licensed under the terms of the GNU 6 * licenses. You may choose to be licensed under the terms of the GNU
@@ -37,7 +38,7 @@
37 38
38#include <linux/types.h> 39#include <linux/types.h>
39 40
40#define IB_USER_CM_ABI_VERSION 1 41#define IB_USER_CM_ABI_VERSION 2
41 42
42enum { 43enum {
43 IB_USER_CM_CMD_CREATE_ID, 44 IB_USER_CM_CMD_CREATE_ID,
@@ -60,6 +61,7 @@ enum {
60 IB_USER_CM_CMD_SEND_SIDR_REP, 61 IB_USER_CM_CMD_SEND_SIDR_REP,
61 62
62 IB_USER_CM_CMD_EVENT, 63 IB_USER_CM_CMD_EVENT,
64 IB_USER_CM_CMD_INIT_QP_ATTR,
63}; 65};
64/* 66/*
65 * command ABI structures. 67 * command ABI structures.
@@ -71,6 +73,7 @@ struct ib_ucm_cmd_hdr {
71}; 73};
72 74
73struct ib_ucm_create_id { 75struct ib_ucm_create_id {
76 __u64 uid;
74 __u64 response; 77 __u64 response;
75}; 78};
76 79
@@ -79,9 +82,14 @@ struct ib_ucm_create_id_resp {
79}; 82};
80 83
81struct ib_ucm_destroy_id { 84struct ib_ucm_destroy_id {
85 __u64 response;
82 __u32 id; 86 __u32 id;
83}; 87};
84 88
89struct ib_ucm_destroy_id_resp {
90 __u32 events_reported;
91};
92
85struct ib_ucm_attr_id { 93struct ib_ucm_attr_id {
86 __u64 response; 94 __u64 response;
87 __u32 id; 95 __u32 id;
@@ -94,6 +102,64 @@ struct ib_ucm_attr_id_resp {
94 __be32 remote_id; 102 __be32 remote_id;
95}; 103};
96 104
105struct ib_ucm_init_qp_attr {
106 __u64 response;
107 __u32 id;
108 __u32 qp_state;
109};
110
111struct ib_ucm_ah_attr {
112 __u8 grh_dgid[16];
113 __u32 grh_flow_label;
114 __u16 dlid;
115 __u16 reserved;
116 __u8 grh_sgid_index;
117 __u8 grh_hop_limit;
118 __u8 grh_traffic_class;
119 __u8 sl;
120 __u8 src_path_bits;
121 __u8 static_rate;
122 __u8 is_global;
123 __u8 port_num;
124};
125
126struct ib_ucm_init_qp_attr_resp {
127 __u32 qp_attr_mask;
128 __u32 qp_state;
129 __u32 cur_qp_state;
130 __u32 path_mtu;
131 __u32 path_mig_state;
132 __u32 qkey;
133 __u32 rq_psn;
134 __u32 sq_psn;
135 __u32 dest_qp_num;
136 __u32 qp_access_flags;
137
138 struct ib_ucm_ah_attr ah_attr;
139 struct ib_ucm_ah_attr alt_ah_attr;
140
141 /* ib_qp_cap */
142 __u32 max_send_wr;
143 __u32 max_recv_wr;
144 __u32 max_send_sge;
145 __u32 max_recv_sge;
146 __u32 max_inline_data;
147
148 __u16 pkey_index;
149 __u16 alt_pkey_index;
150 __u8 en_sqd_async_notify;
151 __u8 sq_draining;
152 __u8 max_rd_atomic;
153 __u8 max_dest_rd_atomic;
154 __u8 min_rnr_timer;
155 __u8 port_num;
156 __u8 timeout;
157 __u8 retry_cnt;
158 __u8 rnr_retry;
159 __u8 alt_port_num;
160 __u8 alt_timeout;
161};
162
97struct ib_ucm_listen { 163struct ib_ucm_listen {
98 __be64 service_id; 164 __be64 service_id;
99 __be64 service_mask; 165 __be64 service_mask;
@@ -157,6 +223,7 @@ struct ib_ucm_req {
157}; 223};
158 224
159struct ib_ucm_rep { 225struct ib_ucm_rep {
226 __u64 uid;
160 __u64 data; 227 __u64 data;
161 __u32 id; 228 __u32 id;
162 __u32 qpn; 229 __u32 qpn;
@@ -232,7 +299,6 @@ struct ib_ucm_event_get {
232}; 299};
233 300
234struct ib_ucm_req_event_resp { 301struct ib_ucm_req_event_resp {
235 __u32 listen_id;
236 /* device */ 302 /* device */
237 /* port */ 303 /* port */
238 struct ib_ucm_path_rec primary_path; 304 struct ib_ucm_path_rec primary_path;
@@ -287,7 +353,6 @@ struct ib_ucm_apr_event_resp {
287}; 353};
288 354
289struct ib_ucm_sidr_req_event_resp { 355struct ib_ucm_sidr_req_event_resp {
290 __u32 listen_id;
291 /* device */ 356 /* device */
292 /* port */ 357 /* port */
293 __u16 pkey; 358 __u16 pkey;
@@ -307,6 +372,7 @@ struct ib_ucm_sidr_rep_event_resp {
307#define IB_UCM_PRES_ALTERNATE 0x08 372#define IB_UCM_PRES_ALTERNATE 0x08
308 373
309struct ib_ucm_event_resp { 374struct ib_ucm_event_resp {
375 __u64 uid;
310 __u32 id; 376 __u32 id;
311 __u32 event; 377 __u32 event;
312 __u32 present; 378 __u32 present;
diff --git a/include/rdma/ib_user_verbs.h b/include/rdma/ib_user_verbs.h
index 7ebb01c8f99..fd85725391a 100644
--- a/include/rdma/ib_user_verbs.h
+++ b/include/rdma/ib_user_verbs.h
@@ -42,7 +42,7 @@
42 * Increment this value if any changes that break userspace ABI 42 * Increment this value if any changes that break userspace ABI
43 * compatibility are made. 43 * compatibility are made.
44 */ 44 */
45#define IB_USER_VERBS_ABI_VERSION 1 45#define IB_USER_VERBS_ABI_VERSION 2
46 46
47enum { 47enum {
48 IB_USER_VERBS_CMD_QUERY_PARAMS, 48 IB_USER_VERBS_CMD_QUERY_PARAMS,
@@ -292,7 +292,14 @@ struct ib_uverbs_create_cq_resp {
292}; 292};
293 293
294struct ib_uverbs_destroy_cq { 294struct ib_uverbs_destroy_cq {
295 __u64 response;
295 __u32 cq_handle; 296 __u32 cq_handle;
297 __u32 reserved;
298};
299
300struct ib_uverbs_destroy_cq_resp {
301 __u32 comp_events_reported;
302 __u32 async_events_reported;
296}; 303};
297 304
298struct ib_uverbs_create_qp { 305struct ib_uverbs_create_qp {
@@ -372,7 +379,13 @@ struct ib_uverbs_modify_qp_resp {
372}; 379};
373 380
374struct ib_uverbs_destroy_qp { 381struct ib_uverbs_destroy_qp {
382 __u64 response;
375 __u32 qp_handle; 383 __u32 qp_handle;
384 __u32 reserved;
385};
386
387struct ib_uverbs_destroy_qp_resp {
388 __u32 events_reported;
376}; 389};
377 390
378struct ib_uverbs_attach_mcast { 391struct ib_uverbs_attach_mcast {
@@ -416,7 +429,13 @@ struct ib_uverbs_modify_srq {
416}; 429};
417 430
418struct ib_uverbs_destroy_srq { 431struct ib_uverbs_destroy_srq {
432 __u64 response;
419 __u32 srq_handle; 433 __u32 srq_handle;
434 __u32 reserved;
435};
436
437struct ib_uverbs_destroy_srq_resp {
438 __u32 events_reported;
420}; 439};
421 440
422#endif /* IB_USER_VERBS_H */ 441#endif /* IB_USER_VERBS_H */
diff --git a/include/rdma/ib_verbs.h b/include/rdma/ib_verbs.h
index e16cf94870f..e6f4c9e55df 100644
--- a/include/rdma/ib_verbs.h
+++ b/include/rdma/ib_verbs.h
@@ -665,7 +665,6 @@ struct ib_ucontext {
665 struct list_head qp_list; 665 struct list_head qp_list;
666 struct list_head srq_list; 666 struct list_head srq_list;
667 struct list_head ah_list; 667 struct list_head ah_list;
668 spinlock_t lock;
669}; 668};
670 669
671struct ib_uobject { 670struct ib_uobject {