2 * Copyright (c) 2005 SilverStorm Technologies. All rights reserved.
\r
3 * Copyright (c) 1996-2003 Intel Corporation. All rights reserved.
\r
5 * This software is available to you under the OpenIB.org BSD license
\r
8 * Redistribution and use in source and binary forms, with or
\r
9 * without modification, are permitted provided that the following
\r
10 * conditions are met:
\r
12 * - Redistributions of source code must retain the above
\r
13 * copyright notice, this list of conditions and the following
\r
16 * - Redistributions in binary form must reproduce the above
\r
17 * copyright notice, this list of conditions and the following
\r
18 * disclaimer in the documentation and/or other materials
\r
19 * provided with the distribution.
\r
21 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
\r
22 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
\r
23 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
\r
24 * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
\r
25 * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
\r
26 * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
\r
27 * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
\r
33 #if !defined(__IB_UAL_CM_H__)
\r
34 #define __IB_UAL_CM_H__
\r
36 #include "al_common.h"
\r
41 * Used to store user's callback and other connection information.
\r
43 typedef struct _al_listen
\r
45 /* CM info is stored as a child to AL. */
\r
46 al_obj_t obj; /* must be first */
\r
48 /* Callback information. */
\r
49 ib_pfn_cm_req_cb_t pfn_cm_req_cb;
\r
50 ib_pfn_cm_mra_cb_t pfn_cm_mra_cb;
\r
51 ib_pfn_cm_rej_cb_t pfn_cm_rej_cb;
\r
53 ib_pfn_listen_err_cb_t pfn_listen_err_cb;
\r
55 /* valid for ud qp_type only */
\r
56 const void *sidr_context;
\r
63 * Connection request information. Used only during connection
\r
66 typedef struct _conn_req_t
\r
68 /* Path information needed to transiton the QP when connecting. */
\r
69 ib_path_rec_t path_rec;
\r
70 ib_path_rec_t alt_path_rec;
\r
72 /* QP modification parameters provided by the kernel CM. */
\r
73 ib_qp_mod_t qp_mod_rtr;
\r
74 ib_qp_mod_t qp_mod_rts;
\r
75 uint32_t timeout_ms;
\r
77 /* Callback information needed only when connecting. */
\r
78 ib_pfn_cm_req_cb_t pfn_cm_req_cb;
\r
79 ib_pfn_cm_rep_cb_t pfn_cm_rep_cb;
\r
80 ib_pfn_cm_rtu_cb_t pfn_cm_rtu_cb;
\r
87 * Used to track connections.
\r
89 typedef struct _al_conn
\r
91 /* CM info is stored as a child to AL. */
\r
92 al_obj_t obj; /* must be first */
\r
94 ib_al_handle_t h_al;
\r
95 cl_list_item_t al_item;
\r
96 ib_qp_handle_t h_qp;
\r
98 /* Information needed to establish the connection. */
\r
99 conn_req_t *p_conn_req;
\r
101 /* valid for ud qp_type only */
\r
102 const void *sidr_context;
\r
104 /* Callback information needed after sending the RTU. */
\r
105 ib_pfn_cm_rej_cb_t pfn_cm_rej_cb;
\r
106 ib_pfn_cm_mra_cb_t pfn_cm_mra_cb;
\r
108 ib_pfn_cm_lap_cb_t pfn_cm_lap_cb;
\r
109 ib_pfn_cm_apr_cb_t pfn_cm_apr_cb;
\r
111 ib_pfn_cm_dreq_cb_t pfn_cm_dreq_cb;
\r
112 ib_pfn_cm_drep_cb_t pfn_cm_drep_cb;
\r
120 IN ib_cm_req_rec_t* p_cm_req_rec,
\r
121 IN ib_qp_mod_t* p_qp_rtr,
\r
122 IN ib_qp_mod_t* p_qp_rts,
\r
123 IN uint32_t timeout_ms );
\r
127 IN ib_cm_rep_rec_t* p_cm_rep_rec,
\r
128 IN ib_qp_mod_t* p_qp_rtr,
\r
129 IN ib_qp_mod_t* p_qp_rts );
\r
133 IN ib_cm_rtu_rec_t* p_cm_rtu_rec );
\r
137 IN ib_cm_rej_rec_t* p_cm_rej_rec );
\r
141 IN ib_cm_mra_rec_t* p_cm_mra_rec );
\r
145 IN ib_cm_lap_rec_t* p_cm_lap_rec );
\r
149 IN ib_cm_apr_rec_t* p_cm_apr_rec );
\r
153 IN ib_cm_dreq_rec_t* p_cm_dreq_rec );
\r
157 IN ib_cm_drep_rec_t* p_cm_drep_rec );
\r
161 IN ib_listen_err_rec_t *p_listen_err_rec );
\r
164 #endif /* __IB_UAL_CM_H__ */
\r