]> CyberLeo.Net >> Repos - FreeBSD/releng/9.2.git/blob - sys/contrib/rdma/ib_cm.h
- Copy stable/9 to releng/9.2 as part of the 9.2-RELEASE cycle.
[FreeBSD/releng/9.2.git] / sys / contrib / rdma / ib_cm.h
1 /*
2  * Copyright (c) 2004, 2005 Intel Corporation.  All rights reserved.
3  * Copyright (c) 2004 Topspin Corporation.  All rights reserved.
4  * Copyright (c) 2004 Voltaire Corporation.  All rights reserved.
5  * Copyright (c) 2005 Sun Microsystems, Inc. All rights reserved.
6  *
7  * This software is available to you under a choice of one of two
8  * licenses.  You may choose to be licensed under the terms of the GNU
9  * General Public License (GPL) Version 2, available from the file
10  * COPYING in the main directory of this source tree, or the
11  * OpenIB.org BSD license below:
12  *
13  *     Redistribution and use in source and binary forms, with or
14  *     without modification, are permitted provided that the following
15  *     conditions are met:
16  *
17  *      - Redistributions of source code must retain the above
18  *        copyright notice, this list of conditions and the following
19  *        disclaimer.
20  *
21  *      - Redistributions in binary form must reproduce the above
22  *        copyright notice, this list of conditions and the following
23  *        disclaimer in the documentation and/or other materials
24  *        provided with the distribution.
25  *
26  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
27  * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
28  * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
29  * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
30  * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
31  * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
32  * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
33  * SOFTWARE.
34  *
35  * $Id: ib_cm.h 4311 2005-12-05 18:42:01Z sean.hefty $
36  *
37  * $FreeBSD$
38  */
39
40
41 #if !defined(IB_CM_H)
42 #define IB_CM_H
43
44 #include <contrib/rdma/ib_mad.h>
45 #include <contrib/rdma/ib_sa.h>
46
47 enum ib_cm_state {
48         IB_CM_IDLE,
49         IB_CM_LISTEN,
50         IB_CM_REQ_SENT,
51         IB_CM_REQ_RCVD,
52         IB_CM_MRA_REQ_SENT,
53         IB_CM_MRA_REQ_RCVD,
54         IB_CM_REP_SENT,
55         IB_CM_REP_RCVD,
56         IB_CM_MRA_REP_SENT,
57         IB_CM_MRA_REP_RCVD,
58         IB_CM_ESTABLISHED,
59         IB_CM_DREQ_SENT,
60         IB_CM_DREQ_RCVD,
61         IB_CM_TIMEWAIT,
62         IB_CM_SIDR_REQ_SENT,
63         IB_CM_SIDR_REQ_RCVD
64 };
65
66 enum ib_cm_lap_state {
67         IB_CM_LAP_UNINIT,
68         IB_CM_LAP_IDLE,
69         IB_CM_LAP_SENT,
70         IB_CM_LAP_RCVD,
71         IB_CM_MRA_LAP_SENT,
72         IB_CM_MRA_LAP_RCVD,
73 };
74
75 enum ib_cm_event_type {
76         IB_CM_REQ_ERROR,
77         IB_CM_REQ_RECEIVED,
78         IB_CM_REP_ERROR,
79         IB_CM_REP_RECEIVED,
80         IB_CM_RTU_RECEIVED,
81         IB_CM_USER_ESTABLISHED,
82         IB_CM_DREQ_ERROR,
83         IB_CM_DREQ_RECEIVED,
84         IB_CM_DREP_RECEIVED,
85         IB_CM_TIMEWAIT_EXIT,
86         IB_CM_MRA_RECEIVED,
87         IB_CM_REJ_RECEIVED,
88         IB_CM_LAP_ERROR,
89         IB_CM_LAP_RECEIVED,
90         IB_CM_APR_RECEIVED,
91         IB_CM_SIDR_REQ_ERROR,
92         IB_CM_SIDR_REQ_RECEIVED,
93         IB_CM_SIDR_REP_RECEIVED
94 };
95
96 enum ib_cm_data_size {
97         IB_CM_REQ_PRIVATE_DATA_SIZE      = 92,
98         IB_CM_MRA_PRIVATE_DATA_SIZE      = 222,
99         IB_CM_REJ_PRIVATE_DATA_SIZE      = 148,
100         IB_CM_REP_PRIVATE_DATA_SIZE      = 196,
101         IB_CM_RTU_PRIVATE_DATA_SIZE      = 224,
102         IB_CM_DREQ_PRIVATE_DATA_SIZE     = 220,
103         IB_CM_DREP_PRIVATE_DATA_SIZE     = 224,
104         IB_CM_REJ_ARI_LENGTH             = 72,
105         IB_CM_LAP_PRIVATE_DATA_SIZE      = 168,
106         IB_CM_APR_PRIVATE_DATA_SIZE      = 148,
107         IB_CM_APR_INFO_LENGTH            = 72,
108         IB_CM_SIDR_REQ_PRIVATE_DATA_SIZE = 216,
109         IB_CM_SIDR_REP_PRIVATE_DATA_SIZE = 136,
110         IB_CM_SIDR_REP_INFO_LENGTH       = 72,
111         IB_CM_COMPARE_SIZE               = 64
112 };
113
114 struct ib_cm_id;
115
116 struct ib_cm_req_event_param {
117         struct ib_cm_id         *listen_id;
118         u8                      port;
119
120         struct ib_sa_path_rec   *primary_path;
121         struct ib_sa_path_rec   *alternate_path;
122
123         __be64                  remote_ca_guid;
124         u32                     remote_qkey;
125         u32                     remote_qpn;
126         enum ib_qp_type         qp_type;
127
128         u32                     starting_psn;
129         u8                      responder_resources;
130         u8                      initiator_depth;
131         unsigned int            local_cm_response_timeout:5;
132         unsigned int            flow_control:1;
133         unsigned int            remote_cm_response_timeout:5;
134         unsigned int            retry_count:3;
135         unsigned int            rnr_retry_count:3;
136         unsigned int            srq:1;
137 };
138
139 struct ib_cm_rep_event_param {
140         __be64                  remote_ca_guid;
141         u32                     remote_qkey;
142         u32                     remote_qpn;
143         u32                     starting_psn;
144         u8                      responder_resources;
145         u8                      initiator_depth;
146         unsigned int            target_ack_delay:5;
147         unsigned int            failover_accepted:2;
148         unsigned int            flow_control:1;
149         unsigned int            rnr_retry_count:3;
150         unsigned int            srq:1;
151 };
152
153 enum ib_cm_rej_reason {
154         IB_CM_REJ_NO_QP                         = 1,
155         IB_CM_REJ_NO_EEC                        = 2,
156         IB_CM_REJ_NO_RESOURCES                  = 3,
157         IB_CM_REJ_TIMEOUT                       = 4,
158         IB_CM_REJ_UNSUPPORTED                   = 5,
159         IB_CM_REJ_INVALID_COMM_ID               = 6,
160         IB_CM_REJ_INVALID_COMM_INSTANCE         = 7,
161         IB_CM_REJ_INVALID_SERVICE_ID            = 8,
162         IB_CM_REJ_INVALID_TRANSPORT_TYPE        = 9,
163         IB_CM_REJ_STALE_CONN                    = 10,
164         IB_CM_REJ_RDC_NOT_EXIST                 = 11,
165         IB_CM_REJ_INVALID_GID                   = 12,
166         IB_CM_REJ_INVALID_LID                   = 13,
167         IB_CM_REJ_INVALID_SL                    = 14,
168         IB_CM_REJ_INVALID_TRAFFIC_CLASS         = 15,
169         IB_CM_REJ_INVALID_HOP_LIMIT             = 16,
170         IB_CM_REJ_INVALID_PACKET_RATE           = 17,
171         IB_CM_REJ_INVALID_ALT_GID               = 18,
172         IB_CM_REJ_INVALID_ALT_LID               = 19,
173         IB_CM_REJ_INVALID_ALT_SL                = 20,
174         IB_CM_REJ_INVALID_ALT_TRAFFIC_CLASS     = 21,
175         IB_CM_REJ_INVALID_ALT_HOP_LIMIT         = 22,
176         IB_CM_REJ_INVALID_ALT_PACKET_RATE       = 23,
177         IB_CM_REJ_PORT_CM_REDIRECT              = 24,
178         IB_CM_REJ_PORT_REDIRECT                 = 25,
179         IB_CM_REJ_INVALID_MTU                   = 26,
180         IB_CM_REJ_INSUFFICIENT_RESP_RESOURCES   = 27,
181         IB_CM_REJ_CONSUMER_DEFINED              = 28,
182         IB_CM_REJ_INVALID_RNR_RETRY             = 29,
183         IB_CM_REJ_DUPLICATE_LOCAL_COMM_ID       = 30,
184         IB_CM_REJ_INVALID_CLASS_VERSION         = 31,
185         IB_CM_REJ_INVALID_FLOW_LABEL            = 32,
186         IB_CM_REJ_INVALID_ALT_FLOW_LABEL        = 33
187 };
188
189 struct ib_cm_rej_event_param {
190         enum ib_cm_rej_reason   reason;
191         void                    *ari;
192         u8                      ari_length;
193 };
194
195 struct ib_cm_mra_event_param {
196         u8      service_timeout;
197 };
198
199 struct ib_cm_lap_event_param {
200         struct ib_sa_path_rec   *alternate_path;
201 };
202
203 enum ib_cm_apr_status {
204         IB_CM_APR_SUCCESS,
205         IB_CM_APR_INVALID_COMM_ID,
206         IB_CM_APR_UNSUPPORTED,
207         IB_CM_APR_REJECT,
208         IB_CM_APR_REDIRECT,
209         IB_CM_APR_IS_CURRENT,
210         IB_CM_APR_INVALID_QPN_EECN,
211         IB_CM_APR_INVALID_LID,
212         IB_CM_APR_INVALID_GID,
213         IB_CM_APR_INVALID_FLOW_LABEL,
214         IB_CM_APR_INVALID_TCLASS,
215         IB_CM_APR_INVALID_HOP_LIMIT,
216         IB_CM_APR_INVALID_PACKET_RATE,
217         IB_CM_APR_INVALID_SL
218 };
219
220 struct ib_cm_apr_event_param {
221         enum ib_cm_apr_status   ap_status;
222         void                    *apr_info;
223         u8                      info_len;
224 };
225
226 struct ib_cm_sidr_req_event_param {
227         struct ib_cm_id         *listen_id;
228         u8                      port;
229         u16                     pkey;
230 };
231
232 enum ib_cm_sidr_status {
233         IB_SIDR_SUCCESS,
234         IB_SIDR_UNSUPPORTED,
235         IB_SIDR_REJECT,
236         IB_SIDR_NO_QP,
237         IB_SIDR_REDIRECT,
238         IB_SIDR_UNSUPPORTED_VERSION
239 };
240
241 struct ib_cm_sidr_rep_event_param {
242         enum ib_cm_sidr_status  status;
243         u32                     qkey;
244         u32                     qpn;
245         void                    *info;
246         u8                      info_len;
247 };
248
249 struct ib_cm_event {
250         enum ib_cm_event_type   event;
251         union {
252                 struct ib_cm_req_event_param    req_rcvd;
253                 struct ib_cm_rep_event_param    rep_rcvd;
254                 /* No data for RTU received events. */
255                 struct ib_cm_rej_event_param    rej_rcvd;
256                 struct ib_cm_mra_event_param    mra_rcvd;
257                 struct ib_cm_lap_event_param    lap_rcvd;
258                 struct ib_cm_apr_event_param    apr_rcvd;
259                 /* No data for DREQ/DREP received events. */
260                 struct ib_cm_sidr_req_event_param sidr_req_rcvd;
261                 struct ib_cm_sidr_rep_event_param sidr_rep_rcvd;
262                 enum ib_wc_status               send_status;
263         } param;
264
265         void                    *private_data;
266 };
267
268 /**
269  * ib_cm_handler - User-defined callback to process communication events.
270  * @cm_id: Communication identifier associated with the reported event.
271  * @event: Information about the communication event.
272  *
273  * IB_CM_REQ_RECEIVED and IB_CM_SIDR_REQ_RECEIVED communication events
274  * generated as a result of listen requests result in the allocation of a
275  * new @cm_id.  The new @cm_id is returned to the user through this callback.
276  * Clients are responsible for destroying the new @cm_id.  For peer-to-peer
277  * IB_CM_REQ_RECEIVED and all other events, the returned @cm_id corresponds
278  * to a user's existing communication identifier.
279  *
280  * Users may not call ib_destroy_cm_id while in the context of this callback;
281  * however, returning a non-zero value instructs the communication manager to
282  * destroy the @cm_id after the callback completes.
283  */
284 typedef int (*ib_cm_handler)(struct ib_cm_id *cm_id,
285                              struct ib_cm_event *event);
286
287 struct ib_cm_id {
288         ib_cm_handler           cm_handler;
289         void                    *context;
290         struct ib_device        *device;
291         __be64                  service_id;
292         __be64                  service_mask;
293         enum ib_cm_state        state;          /* internal CM/debug use */
294         enum ib_cm_lap_state    lap_state;      /* internal CM/debug use */
295         __be32                  local_id;
296         __be32                  remote_id;
297         u32                     remote_cm_qpn;  /* 1 unless redirected */
298 };
299
300 /**
301  * ib_create_cm_id - Allocate a communication identifier.
302  * @device: Device associated with the cm_id.  All related communication will
303  * be associated with the specified device.
304  * @cm_handler: Callback invoked to notify the user of CM events.
305  * @context: User specified context associated with the communication
306  *   identifier.
307  *
308  * Communication identifiers are used to track connection states, service
309  * ID resolution requests, and listen requests.
310  */
311 struct ib_cm_id *ib_create_cm_id(struct ib_device *device,
312                                  ib_cm_handler cm_handler,
313                                  void *context);
314
315 /**
316  * ib_destroy_cm_id - Destroy a connection identifier.
317  * @cm_id: Connection identifier to destroy.
318  *
319  * This call blocks until the connection identifier is destroyed.
320  */
321 void ib_destroy_cm_id(struct ib_cm_id *cm_id);
322
323 #define IB_SERVICE_ID_AGN_MASK  __constant_cpu_to_be64(0xFF00000000000000ULL)
324 #define IB_CM_ASSIGN_SERVICE_ID __constant_cpu_to_be64(0x0200000000000000ULL)
325 #define IB_CMA_SERVICE_ID       __constant_cpu_to_be64(0x0000000001000000ULL)
326 #define IB_CMA_SERVICE_ID_MASK  __constant_cpu_to_be64(0xFFFFFFFFFF000000ULL)
327 #define IB_SDP_SERVICE_ID       __constant_cpu_to_be64(0x0000000000010000ULL)
328 #define IB_SDP_SERVICE_ID_MASK  __constant_cpu_to_be64(0xFFFFFFFFFFFF0000ULL)
329
330 struct ib_cm_compare_data {
331         u8  data[IB_CM_COMPARE_SIZE];
332         u8  mask[IB_CM_COMPARE_SIZE];
333 };
334
335 /**
336  * ib_cm_listen - Initiates listening on the specified service ID for
337  *   connection and service ID resolution requests.
338  * @cm_id: Connection identifier associated with the listen request.
339  * @service_id: Service identifier matched against incoming connection
340  *   and service ID resolution requests.  The service ID should be specified
341  *   network-byte order.  If set to IB_CM_ASSIGN_SERVICE_ID, the CM will
342  *   assign a service ID to the caller.
343  * @service_mask: Mask applied to service ID used to listen across a
344  *   range of service IDs.  If set to 0, the service ID is matched
345  *   exactly.  This parameter is ignored if %service_id is set to
346  *   IB_CM_ASSIGN_SERVICE_ID.
347  * @compare_data: This parameter is optional.  It specifies data that must
348  *   appear in the private data of a connection request for the specified
349  *   listen request.
350  */
351 int ib_cm_listen(struct ib_cm_id *cm_id, __be64 service_id, __be64 service_mask,
352                  struct ib_cm_compare_data *compare_data);
353
354 struct ib_cm_req_param {
355         struct ib_sa_path_rec   *primary_path;
356         struct ib_sa_path_rec   *alternate_path;
357         __be64                  service_id;
358         u32                     qp_num;
359         enum ib_qp_type         qp_type;
360         u32                     starting_psn;
361         const void              *private_data;
362         u8                      private_data_len;
363         u8                      peer_to_peer;
364         u8                      responder_resources;
365         u8                      initiator_depth;
366         u8                      remote_cm_response_timeout;
367         u8                      flow_control;
368         u8                      local_cm_response_timeout;
369         u8                      retry_count;
370         u8                      rnr_retry_count;
371         u8                      max_cm_retries;
372         u8                      srq;
373 };
374
375 /**
376  * ib_send_cm_req - Sends a connection request to the remote node.
377  * @cm_id: Connection identifier that will be associated with the
378  *   connection request.
379  * @param: Connection request information needed to establish the
380  *   connection.
381  */
382 int ib_send_cm_req(struct ib_cm_id *cm_id,
383                    struct ib_cm_req_param *param);
384
385 struct ib_cm_rep_param {
386         u32             qp_num;
387         u32             starting_psn;
388         const void      *private_data;
389         u8              private_data_len;
390         u8              responder_resources;
391         u8              initiator_depth;
392         u8              target_ack_delay;
393         u8              failover_accepted;
394         u8              flow_control;
395         u8              rnr_retry_count;
396         u8              srq;
397 };
398
399 /**
400  * ib_send_cm_rep - Sends a connection reply in response to a connection
401  *   request.
402  * @cm_id: Connection identifier that will be associated with the
403  *   connection request.
404  * @param: Connection reply information needed to establish the
405  *   connection.
406  */
407 int ib_send_cm_rep(struct ib_cm_id *cm_id,
408                    struct ib_cm_rep_param *param);
409
410 /**
411  * ib_send_cm_rtu - Sends a connection ready to use message in response
412  *   to a connection reply message.
413  * @cm_id: Connection identifier associated with the connection request.
414  * @private_data: Optional user-defined private data sent with the
415  *   ready to use message.
416  * @private_data_len: Size of the private data buffer, in bytes.
417  */
418 int ib_send_cm_rtu(struct ib_cm_id *cm_id,
419                    const void *private_data,
420                    u8 private_data_len);
421
422 /**
423  * ib_send_cm_dreq - Sends a disconnection request for an existing
424  *   connection.
425  * @cm_id: Connection identifier associated with the connection being
426  *   released.
427  * @private_data: Optional user-defined private data sent with the
428  *   disconnection request message.
429  * @private_data_len: Size of the private data buffer, in bytes.
430  */
431 int ib_send_cm_dreq(struct ib_cm_id *cm_id,
432                     const void *private_data,
433                     u8 private_data_len);
434
435 /**
436  * ib_send_cm_drep - Sends a disconnection reply to a disconnection request.
437  * @cm_id: Connection identifier associated with the connection being
438  *   released.
439  * @private_data: Optional user-defined private data sent with the
440  *   disconnection reply message.
441  * @private_data_len: Size of the private data buffer, in bytes.
442  *
443  * If the cm_id is in the correct state, the CM will transition the connection
444  * to the timewait state, even if an error occurs sending the DREP message.
445  */
446 int ib_send_cm_drep(struct ib_cm_id *cm_id,
447                     const void *private_data,
448                     u8 private_data_len);
449
450 /**
451  * ib_cm_notify - Notifies the CM of an event reported to the consumer.
452  * @cm_id: Connection identifier to transition to established.
453  * @event: Type of event.
454  *
455  * This routine should be invoked by users to notify the CM of relevant
456  * communication events.  Events that should be reported to the CM and
457  * when to report them are:
458  *
459  * IB_EVENT_COMM_EST - Used when a message is received on a connected
460  *    QP before an RTU has been received.
461  * IB_EVENT_PATH_MIG - Notifies the CM that the connection has failed over
462  *   to the alternate path.
463  */
464 int ib_cm_notify(struct ib_cm_id *cm_id, enum ib_event_type event);
465
466 /**
467  * ib_send_cm_rej - Sends a connection rejection message to the
468  *   remote node.
469  * @cm_id: Connection identifier associated with the connection being
470  *   rejected.
471  * @reason: Reason for the connection request rejection.
472  * @ari: Optional additional rejection information.
473  * @ari_length: Size of the additional rejection information, in bytes.
474  * @private_data: Optional user-defined private data sent with the
475  *   rejection message.
476  * @private_data_len: Size of the private data buffer, in bytes.
477  */
478 int ib_send_cm_rej(struct ib_cm_id *cm_id,
479                    enum ib_cm_rej_reason reason,
480                    void *ari,
481                    u8 ari_length,
482                    const void *private_data,
483                    u8 private_data_len);
484
485 /**
486  * ib_send_cm_mra - Sends a message receipt acknowledgement to a connection
487  *   message.
488  * @cm_id: Connection identifier associated with the connection message.
489  * @service_timeout: The maximum time required for the sender to reply to
490  *   to the connection message.
491  * @private_data: Optional user-defined private data sent with the
492  *   message receipt acknowledgement.
493  * @private_data_len: Size of the private data buffer, in bytes.
494  */
495 int ib_send_cm_mra(struct ib_cm_id *cm_id,
496                    u8 service_timeout,
497                    const void *private_data,
498                    u8 private_data_len);
499
500 /**
501  * ib_send_cm_lap - Sends a load alternate path request.
502  * @cm_id: Connection identifier associated with the load alternate path
503  *   message.
504  * @alternate_path: A path record that identifies the alternate path to
505  *   load.
506  * @private_data: Optional user-defined private data sent with the
507  *   load alternate path message.
508  * @private_data_len: Size of the private data buffer, in bytes.
509  */
510 int ib_send_cm_lap(struct ib_cm_id *cm_id,
511                    struct ib_sa_path_rec *alternate_path,
512                    const void *private_data,
513                    u8 private_data_len);
514
515 /**
516  * ib_cm_init_qp_attr - Initializes the QP attributes for use in transitioning
517  *   to a specified QP state.
518  * @cm_id: Communication identifier associated with the QP attributes to
519  *   initialize.
520  * @qp_attr: On input, specifies the desired QP state.  On output, the
521  *   mandatory and desired optional attributes will be set in order to
522  *   modify the QP to the specified state.
523  * @qp_attr_mask: The QP attribute mask that may be used to transition the
524  *   QP to the specified state.
525  *
526  * Users must set the @qp_attr->qp_state to the desired QP state.  This call
527  * will set all required attributes for the given transition, along with
528  * known optional attributes.  Users may override the attributes returned from
529  * this call before calling ib_modify_qp.
530  */
531 int ib_cm_init_qp_attr(struct ib_cm_id *cm_id,
532                        struct ib_qp_attr *qp_attr,
533                        int *qp_attr_mask);
534
535 /**
536  * ib_send_cm_apr - Sends an alternate path response message in response to
537  *   a load alternate path request.
538  * @cm_id: Connection identifier associated with the alternate path response.
539  * @status: Reply status sent with the alternate path response.
540  * @info: Optional additional information sent with the alternate path
541  *   response.
542  * @info_length: Size of the additional information, in bytes.
543  * @private_data: Optional user-defined private data sent with the
544  *   alternate path response message.
545  * @private_data_len: Size of the private data buffer, in bytes.
546  */
547 int ib_send_cm_apr(struct ib_cm_id *cm_id,
548                    enum ib_cm_apr_status status,
549                    void *info,
550                    u8 info_length,
551                    const void *private_data,
552                    u8 private_data_len);
553
554 struct ib_cm_sidr_req_param {
555         struct ib_sa_path_rec   *path;
556         __be64                  service_id;
557         int                     timeout_ms;
558         const void              *private_data;
559         u8                      private_data_len;
560         u8                      max_cm_retries;
561 };
562
563 /**
564  * ib_send_cm_sidr_req - Sends a service ID resolution request to the
565  *   remote node.
566  * @cm_id: Communication identifier that will be associated with the
567  *   service ID resolution request.
568  * @param: Service ID resolution request information.
569  */
570 int ib_send_cm_sidr_req(struct ib_cm_id *cm_id,
571                         struct ib_cm_sidr_req_param *param);
572
573 struct ib_cm_sidr_rep_param {
574         u32                     qp_num;
575         u32                     qkey;
576         enum ib_cm_sidr_status  status;
577         const void              *info;
578         u8                      info_length;
579         const void              *private_data;
580         u8                      private_data_len;
581 };
582
583 /**
584  * ib_send_cm_sidr_rep - Sends a service ID resolution reply to the
585  *   remote node.
586  * @cm_id: Communication identifier associated with the received service ID
587  *   resolution request.
588  * @param: Service ID resolution reply information.
589  */
590 int ib_send_cm_sidr_rep(struct ib_cm_id *cm_id,
591                         struct ib_cm_sidr_rep_param *param);
592
593 #endif /* IB_CM_H */