4 * The contents of this file are subject to the terms of the
5 * Common Development and Distribution License (the "License").
6 * You may not use this file except in compliance with the License.
8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9 * or http://www.opensolaris.org/os/licensing.
10 * See the License for the specific language governing permissions
11 * and limitations under the License.
13 * When distributing Covered Code, include this CDDL HEADER in each
14 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15 * If applicable, add the following below this CDDL HEADER, with the
16 * fields enclosed by brackets "[]" replaced with your own identifying
17 * information: Portions Copyright [yyyy] [name of copyright owner]
23 * Copyright (c) 2002-2003, Network Appliance, Inc. All rights reserved.
27 * Copyright 2003 Sun Microsystems, Inc. All rights reserved.
28 * Use is subject to license terms.
33 * HEADER: dapl_evd_util.h
35 * PURPOSE: Utility defs & routines for the EVD data structure
37 * $Id: dapl_evd_util.h,v 1.10 2003/06/13 12:21:09 sjs2 Exp $
41 #ifndef _DAPL_EVD_UTIL_H_
42 #define _DAPL_EVD_UTIL_H_
51 dapls_evd_internal_create(
54 IN DAT_COUNT min_qlen
,
55 IN DAT_EVD_FLAGS evd_flags
,
56 OUT DAPL_EVD
**evd_ptr_ptr
);
62 IN DAT_EVD_FLAGS evd_flags
,
67 IN DAPL_EVD
*evd_ptr
);
70 * Each of these functions will retrieve a free event from
71 * the specified EVD, fill in the elements of that event, and
72 * post the event back to the EVD. If there is no EVD available,
73 * an overflow event will be posted to the async EVD associated
76 * DAT_INSUFFICIENT_RESOURCES will be returned on overflow,
77 * DAT_SUCCESS otherwise.
81 dapls_evd_post_cr_arrival_event(
83 IN DAT_EVENT_NUMBER event_number
,
84 IN DAT_SP_HANDLE sp_handle
,
85 DAT_IA_ADDRESS_PTR ia_address_ptr
,
86 DAT_CONN_QUAL conn_qual
,
87 DAT_CR_HANDLE cr_handle
);
90 dapls_evd_post_connection_event(
92 IN DAT_EVENT_NUMBER event_number
,
93 IN DAT_EP_HANDLE ep_handle
,
94 IN DAT_COUNT private_data_size
,
95 IN DAT_PVOID private_data
);
98 dapls_evd_post_async_error_event(
100 IN DAT_EVENT_NUMBER event_number
,
101 IN DAT_IA_HANDLE ia_handle
);
104 dapls_evd_post_software_event(
105 IN DAPL_EVD
*evd_ptr
,
106 IN DAT_EVENT_NUMBER event_number
,
107 IN DAT_PVOID pointer
);
110 * dapl internal callbacks functions
113 /* connection verb callback */
114 extern void dapl_evd_connection_callback(
115 IN ib_cm_handle_t ib_cm_handle
,
116 IN
const ib_cm_events_t ib_cm_events
,
117 IN
const void *instant_data_p
,
118 IN
const void * context
);
120 /* dto verb callback */
121 extern void dapl_evd_dto_callback(
122 IN ib_hca_handle_t ib_hca_handle
,
123 IN ib_cq_handle_t ib_cq_handle
,
126 /* async verb callbacks */
127 extern void dapl_evd_un_async_error_callback(
128 IN ib_hca_handle_t ib_hca_handle
,
129 IN ib_error_record_t
*cause_ptr
,
132 extern void dapl_evd_cq_async_error_callback(
133 IN ib_hca_handle_t ib_hca_handle
,
134 IN ib_cq_handle_t ib_cq_handle
,
135 IN ib_error_record_t
*cause_ptr
,
138 extern void dapl_evd_qp_async_error_callback(
139 IN ib_hca_handle_t ib_hca_handle
,
140 IN ib_qp_handle_t ib_qp_handle
,
141 IN ib_error_record_t
*cause_ptr
,
144 extern void dapls_cr_callback(
145 ib_cm_handle_t ib_cm_handle
,
146 IN
const ib_cm_events_t ib_cm_event
,
147 IN
const void *instant_data_p
,
148 IN
const void *context
);
150 extern void dapls_evd_copy_cq(
151 IN DAPL_EVD
*evd_ptr
,
154 extern DAT_RETURN
dapls_evd_copy_events(
156 DAT_TIMEOUT timeout
);
158 extern void dapls_evd_post_premature_events(
161 extern DAT_RETURN
dapls_evd_cq_poll_to_event(
162 IN DAPL_EVD
*evd_ptr
,
163 OUT DAT_EVENT
*event
);
169 #endif /* _DAPL_EVD_UTIL_H_ */