1*9e39c5baSBill Taylor /*
2*9e39c5baSBill Taylor  * CDDL HEADER START
3*9e39c5baSBill Taylor  *
4*9e39c5baSBill Taylor  * The contents of this file are subject to the terms of the
5*9e39c5baSBill Taylor  * Common Development and Distribution License (the "License").
6*9e39c5baSBill Taylor  * You may not use this file except in compliance with the License.
7*9e39c5baSBill Taylor  *
8*9e39c5baSBill Taylor  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9*9e39c5baSBill Taylor  * or http://www.opensolaris.org/os/licensing.
10*9e39c5baSBill Taylor  * See the License for the specific language governing permissions
11*9e39c5baSBill Taylor  * and limitations under the License.
12*9e39c5baSBill Taylor  *
13*9e39c5baSBill Taylor  * When distributing Covered Code, include this CDDL HEADER in each
14*9e39c5baSBill Taylor  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15*9e39c5baSBill Taylor  * If applicable, add the following below this CDDL HEADER, with the
16*9e39c5baSBill Taylor  * fields enclosed by brackets "[]" replaced with your own identifying
17*9e39c5baSBill Taylor  * information: Portions Copyright [yyyy] [name of copyright owner]
18*9e39c5baSBill Taylor  *
19*9e39c5baSBill Taylor  * CDDL HEADER END
20*9e39c5baSBill Taylor  */
21*9e39c5baSBill Taylor 
22*9e39c5baSBill Taylor /*
23*9e39c5baSBill Taylor  * Copyright (c) 2002-2003, Network Appliance, Inc. All rights reserved.
24*9e39c5baSBill Taylor  */
25*9e39c5baSBill Taylor 
26*9e39c5baSBill Taylor /*
27*9e39c5baSBill Taylor  * Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
28*9e39c5baSBill Taylor  * Use is subject to license terms.
29*9e39c5baSBill Taylor  */
30*9e39c5baSBill Taylor 
31*9e39c5baSBill Taylor /*
32*9e39c5baSBill Taylor  *
33*9e39c5baSBill Taylor  * HEADER: dapl_adapter_util.h
34*9e39c5baSBill Taylor  *
35*9e39c5baSBill Taylor  * PURPOSE: Utility defs & routines for the adapter data structure
36*9e39c5baSBill Taylor  *
37*9e39c5baSBill Taylor  */
38*9e39c5baSBill Taylor 
39*9e39c5baSBill Taylor #ifndef _DAPL_ADAPTER_UTIL_H_
40*9e39c5baSBill Taylor #define	_DAPL_ADAPTER_UTIL_H_
41*9e39c5baSBill Taylor 
42*9e39c5baSBill Taylor #ifdef __cplusplus
43*9e39c5baSBill Taylor extern "C" {
44*9e39c5baSBill Taylor #endif
45*9e39c5baSBill Taylor 
46*9e39c5baSBill Taylor /* Max number of cqes that can be polled from the CQ */
47*9e39c5baSBill Taylor #define	MAX_CQES_PER_POLL	8
48*9e39c5baSBill Taylor 
49*9e39c5baSBill Taylor typedef enum async_handler_type {
50*9e39c5baSBill Taylor 	DAPL_ASYNC_UNAFILIATED,
51*9e39c5baSBill Taylor 	DAPL_ASYNC_CQ_ERROR,
52*9e39c5baSBill Taylor 	DAPL_ASYNC_CQ_COMPLETION,
53*9e39c5baSBill Taylor 	DAPL_ASYNC_QP_ERROR
54*9e39c5baSBill Taylor } DAPL_ASYNC_HANDLER_TYPE;
55*9e39c5baSBill Taylor 
56*9e39c5baSBill Taylor 
57*9e39c5baSBill Taylor #ifdef	CM_BUSTED
58*9e39c5baSBill Taylor DAT_RETURN dapl_set_remote_lid(IN char *rhost_name);
59*9e39c5baSBill Taylor #endif /* CM_BUSTED */
60*9e39c5baSBill Taylor 
61*9e39c5baSBill Taylor /* SUNW */
62*9e39c5baSBill Taylor DAT_RETURN dapls_ib_enum_hcas(
63*9e39c5baSBill Taylor 	IN   DAPL_HCA	**hca_list,
64*9e39c5baSBill Taylor 	OUT  DAT_COUNT	*hca_count);
65*9e39c5baSBill Taylor 
66*9e39c5baSBill Taylor void dapls_ib_state_init(void);
67*9e39c5baSBill Taylor void dapls_ib_state_fini(void);
68*9e39c5baSBill Taylor /* SUNW */
69*9e39c5baSBill Taylor 
70*9e39c5baSBill Taylor DAT_RETURN dapls_ib_open_hca(
71*9e39c5baSBill Taylor 	IN   DAPL_HCA		*hca_ptr,
72*9e39c5baSBill Taylor 	OUT  ib_hca_handle_t	*ib_hca_handle);
73*9e39c5baSBill Taylor 
74*9e39c5baSBill Taylor DAT_RETURN dapls_ib_close_hca(
75*9e39c5baSBill Taylor 	IN  ib_hca_handle_t	ib_hca_handle);
76*9e39c5baSBill Taylor 
77*9e39c5baSBill Taylor DAT_RETURN dapls_ib_qp_alloc(
78*9e39c5baSBill Taylor 	IN  DAPL_IA			*ia_ptr,
79*9e39c5baSBill Taylor 	IN  DAPL_EP			*ep_ptr,
80*9e39c5baSBill Taylor 	IN  DAPL_EP			*ep_ctx_ptr);
81*9e39c5baSBill Taylor 
82*9e39c5baSBill Taylor DAT_RETURN dapls_ib_qp_free(
83*9e39c5baSBill Taylor 	IN  DAPL_IA			*ia_ptr,
84*9e39c5baSBill Taylor 	IN  DAPL_EP			*ep_ptr);
85*9e39c5baSBill Taylor 
86*9e39c5baSBill Taylor DAT_RETURN dapls_ib_qp_modify(
87*9e39c5baSBill Taylor 	IN  DAPL_IA			*ia_ptr,
88*9e39c5baSBill Taylor 	IN  DAPL_EP			*ep_ptr,
89*9e39c5baSBill Taylor 	IN  DAT_EP_ATTR			*ep_attr);
90*9e39c5baSBill Taylor 
91*9e39c5baSBill Taylor DAT_RETURN dapls_ib_connect(
92*9e39c5baSBill Taylor 	IN  DAT_EP_HANDLE		ep_handle,
93*9e39c5baSBill Taylor 	IN  DAT_IA_ADDRESS_PTR		remote_ia_address,
94*9e39c5baSBill Taylor 	IN  DAT_CONN_QUAL		remote_conn_qual,
95*9e39c5baSBill Taylor 	IN  DAT_COUNT			prd_size,
96*9e39c5baSBill Taylor 	IN  DAPL_PRIVATE		*prd_ptr,
97*9e39c5baSBill Taylor 	IN  DAT_TIMEOUT			timeout);
98*9e39c5baSBill Taylor 
99*9e39c5baSBill Taylor DAT_RETURN dapls_ib_disconnect(
100*9e39c5baSBill Taylor 	IN	DAPL_EP			*ep_ptr,
101*9e39c5baSBill Taylor 	IN	DAT_CLOSE_FLAGS		completion_flags);
102*9e39c5baSBill Taylor 
103*9e39c5baSBill Taylor DAT_RETURN dapls_ib_setup_conn_listener(
104*9e39c5baSBill Taylor 	IN  DAPL_IA			*ia_ptr,
105*9e39c5baSBill Taylor 	IN  DAT_UINT64			ServiceID,
106*9e39c5baSBill Taylor 	IN  DAPL_SP			*sp_ptr);
107*9e39c5baSBill Taylor 
108*9e39c5baSBill Taylor DAT_RETURN dapls_ib_remove_conn_listener(
109*9e39c5baSBill Taylor 	IN  DAPL_IA			*ia_ptr,
110*9e39c5baSBill Taylor 	IN  DAPL_SP			*sp_ptr);
111*9e39c5baSBill Taylor 
112*9e39c5baSBill Taylor DAT_RETURN dapls_ib_accept_connection(
113*9e39c5baSBill Taylor 	IN  DAT_CR_HANDLE		cr_handle,
114*9e39c5baSBill Taylor 	IN  DAT_EP_HANDLE		ep_handle,
115*9e39c5baSBill Taylor 	IN  DAPL_PRIVATE		*prd_ptr);
116*9e39c5baSBill Taylor 
117*9e39c5baSBill Taylor /* SUNW */
118*9e39c5baSBill Taylor DAT_RETURN dapls_ib_reject_connection(
119*9e39c5baSBill Taylor 	IN  ib_cm_handle_t		cm_handle,
120*9e39c5baSBill Taylor 	IN  int				reject_reason,
121*9e39c5baSBill Taylor 	IN  DAPL_SP			*sp_ptr);
122*9e39c5baSBill Taylor 
123*9e39c5baSBill Taylor DAT_RETURN dapls_ib_handoff_connection(
124*9e39c5baSBill Taylor 	IN  DAPL_CR			*cr_ptr,
125*9e39c5baSBill Taylor 	IN  DAT_CONN_QUAL		cr_handoff);
126*9e39c5baSBill Taylor 
127*9e39c5baSBill Taylor void dapls_ib_async_callback(
128*9e39c5baSBill Taylor 	IN    DAPL_EVD		  *async_evd,
129*9e39c5baSBill Taylor 	IN    ib_hca_handle_t	  hca_handle,
130*9e39c5baSBill Taylor 	IN    ib_error_record_t	  *event_ptr,
131*9e39c5baSBill Taylor 	IN    void		  *context);
132*9e39c5baSBill Taylor /* SUNW */
133*9e39c5baSBill Taylor 
134*9e39c5baSBill Taylor DAT_RETURN dapls_ib_setup_async_callback(
135*9e39c5baSBill Taylor 	IN  DAPL_IA			*ia_ptr,
136*9e39c5baSBill Taylor 	IN  DAPL_ASYNC_HANDLER_TYPE	handler_type,
137*9e39c5baSBill Taylor 	IN  unsigned int		*callback_handle,
138*9e39c5baSBill Taylor 	IN  ib_async_handler_t		callback,
139*9e39c5baSBill Taylor 	IN  void			*context);
140*9e39c5baSBill Taylor 
141*9e39c5baSBill Taylor DAT_RETURN dapls_ib_cq_alloc(
142*9e39c5baSBill Taylor 	IN  DAPL_IA			*ia_ptr,
143*9e39c5baSBill Taylor 	IN  DAPL_EVD			*evd_ptr,
144*9e39c5baSBill Taylor 	IN  DAPL_CNO			*cno_ptr,
145*9e39c5baSBill Taylor 	IN  DAT_COUNT			*cqlen);
146*9e39c5baSBill Taylor 
147*9e39c5baSBill Taylor /* SUNW */
148*9e39c5baSBill Taylor DAT_RETURN dapls_ib_cq_resize(
149*9e39c5baSBill Taylor 	IN  DAPL_EVD			*evd_ptr,
150*9e39c5baSBill Taylor 	IN  DAT_COUNT			cqlen);
151*9e39c5baSBill Taylor /* SUNW */
152*9e39c5baSBill Taylor 
153*9e39c5baSBill Taylor DAT_RETURN dapls_ib_cq_free(
154*9e39c5baSBill Taylor 	IN  DAPL_IA			*ia_ptr,
155*9e39c5baSBill Taylor 	IN  DAPL_EVD			*evd_ptr);
156*9e39c5baSBill Taylor 
157*9e39c5baSBill Taylor DAT_RETURN dapls_set_cq_notify(
158*9e39c5baSBill Taylor 	IN  DAPL_IA			*ia_ptr,
159*9e39c5baSBill Taylor 	IN  DAPL_EVD			*evd_ptr);
160*9e39c5baSBill Taylor 
161*9e39c5baSBill Taylor /* SUNW */
162*9e39c5baSBill Taylor DAT_RETURN dapls_set_cqN_notify(
163*9e39c5baSBill Taylor 	IN  DAPL_IA			*ia_ptr,
164*9e39c5baSBill Taylor 	IN  DAPL_EVD			*evd_ptr,
165*9e39c5baSBill Taylor 	IN  uint32_t			events_needed);
166*9e39c5baSBill Taylor /* SUNW */
167*9e39c5baSBill Taylor 
168*9e39c5baSBill Taylor DAT_RETURN dapls_ib_cqd_create(
169*9e39c5baSBill Taylor 	IN  DAPL_HCA			*hca_ptr);
170*9e39c5baSBill Taylor 
171*9e39c5baSBill Taylor DAT_RETURN dapls_ib_cqd_destroy(
172*9e39c5baSBill Taylor 	IN  DAPL_HCA			*hca_ptr);
173*9e39c5baSBill Taylor 
174*9e39c5baSBill Taylor DAT_RETURN dapls_ib_pd_alloc(
175*9e39c5baSBill Taylor 	IN  DAPL_IA 			*ia_ptr,
176*9e39c5baSBill Taylor 	IN  DAPL_PZ 			*pz);
177*9e39c5baSBill Taylor 
178*9e39c5baSBill Taylor DAT_RETURN dapls_ib_pd_free(
179*9e39c5baSBill Taylor 	IN  DAPL_PZ			*pz);
180*9e39c5baSBill Taylor 
181*9e39c5baSBill Taylor DAT_RETURN dapls_ib_mr_register(
182*9e39c5baSBill Taylor 	IN  DAPL_IA 			*ia_ptr,
183*9e39c5baSBill Taylor 	IN  DAPL_LMR			*lmr,
184*9e39c5baSBill Taylor 	IN  DAT_PVOID			virt_addr,
185*9e39c5baSBill Taylor 	IN  DAT_VLEN			length,
186*9e39c5baSBill Taylor 	IN  DAT_MEM_PRIV_FLAGS		privileges);
187*9e39c5baSBill Taylor 
188*9e39c5baSBill Taylor DAT_RETURN dapls_ib_mr_register_shared(
189*9e39c5baSBill Taylor 	IN  DAPL_IA 			*ia_ptr,
190*9e39c5baSBill Taylor 	IN  DAPL_LMR			*lmr,
191*9e39c5baSBill Taylor 	IN  DAT_PVOID			virt_addr,
192*9e39c5baSBill Taylor 	IN  DAT_VLEN			length,
193*9e39c5baSBill Taylor 	IN  DAT_LMR_COOKIE		cookie,
194*9e39c5baSBill Taylor 	IN  DAT_MEM_PRIV_FLAGS		privileges);
195*9e39c5baSBill Taylor 
196*9e39c5baSBill Taylor DAT_RETURN dapls_ib_mr_deregister(
197*9e39c5baSBill Taylor 	IN  DAPL_LMR			*lmr);
198*9e39c5baSBill Taylor 
199*9e39c5baSBill Taylor DAT_RETURN dapls_ib_mr_register_lmr(
200*9e39c5baSBill Taylor 	IN  DAPL_IA 			*ia_ptr,
201*9e39c5baSBill Taylor 	IN  DAPL_LMR			*lmr,
202*9e39c5baSBill Taylor 	IN  DAT_MEM_PRIV_FLAGS		privileges);
203*9e39c5baSBill Taylor 
204*9e39c5baSBill Taylor DAT_RETURN dapls_ib_mw_alloc(
205*9e39c5baSBill Taylor 	IN  DAPL_RMR 			*rmr);
206*9e39c5baSBill Taylor 
207*9e39c5baSBill Taylor DAT_RETURN dapls_ib_mw_free(
208*9e39c5baSBill Taylor 	IN  DAPL_RMR			*rmr);
209*9e39c5baSBill Taylor 
210*9e39c5baSBill Taylor DAT_RETURN dapls_ib_mw_bind(
211*9e39c5baSBill Taylor 	IN  DAPL_RMR			*rmr,
212*9e39c5baSBill Taylor 	IN  DAT_LMR_CONTEXT		lmr_context,
213*9e39c5baSBill Taylor 	IN  DAPL_EP			*ep,
214*9e39c5baSBill Taylor 	IN  DAPL_COOKIE			*cookie,
215*9e39c5baSBill Taylor 	IN  DAT_VADDR			virtual_address,
216*9e39c5baSBill Taylor 	IN  DAT_VLEN			length,
217*9e39c5baSBill Taylor 	IN  DAT_MEM_PRIV_FLAGS		mem_priv,
218*9e39c5baSBill Taylor 	IN  DAT_COMPLETION_FLAGS	completion_flags);
219*9e39c5baSBill Taylor 
220*9e39c5baSBill Taylor DAT_RETURN dapls_ib_mw_unbind(
221*9e39c5baSBill Taylor 	IN  DAPL_RMR			*rmr,
222*9e39c5baSBill Taylor 	IN  DAT_LMR_CONTEXT		lmr_context,
223*9e39c5baSBill Taylor 	IN  DAPL_EP			*ep,
224*9e39c5baSBill Taylor 	IN  DAPL_COOKIE			*cookie,
225*9e39c5baSBill Taylor 	IN  DAT_COMPLETION_FLAGS	completion_flags);
226*9e39c5baSBill Taylor 
227*9e39c5baSBill Taylor DAT_RETURN dapls_ib_query_hca(
228*9e39c5baSBill Taylor 	IN  DAPL_HCA			*hca_ptr,
229*9e39c5baSBill Taylor 	OUT DAT_IA_ATTR			*ia_attr,
230*9e39c5baSBill Taylor 	OUT DAT_EP_ATTR			*ep_attr,
231*9e39c5baSBill Taylor 	OUT DAT_SOCK_ADDR6		*ip_addr,
232*9e39c5baSBill Taylor 	OUT DAT_SRQ_ATTR		*srq_attr);
233*9e39c5baSBill Taylor 
234*9e39c5baSBill Taylor void dapls_ib_reinit_ep(
235*9e39c5baSBill Taylor 	IN  DAPL_EP			*ep_ptr);
236*9e39c5baSBill Taylor 
237*9e39c5baSBill Taylor void dapls_ib_connected(
238*9e39c5baSBill Taylor 	IN  DAPL_EP			*ep_ptr);
239*9e39c5baSBill Taylor 
240*9e39c5baSBill Taylor void dapls_ib_disconnect_clean(
241*9e39c5baSBill Taylor 	IN  DAPL_EP			*ep_ptr,
242*9e39c5baSBill Taylor 	IN  DAT_BOOLEAN			passive,
243*9e39c5baSBill Taylor 	IN  const ib_cm_events_t	ib_cm_event);
244*9e39c5baSBill Taylor 
245*9e39c5baSBill Taylor DAT_RETURN dapls_ib_get_async_event(
246*9e39c5baSBill Taylor 	IN  ib_error_record_t		*cause_ptr,
247*9e39c5baSBill Taylor 	OUT DAT_EVENT_NUMBER		*async_event);
248*9e39c5baSBill Taylor 
249*9e39c5baSBill Taylor DAT_RETURN dapls_ib_cm_remote_addr(
250*9e39c5baSBill Taylor 	IN  DAT_HANDLE			dat_handle,
251*9e39c5baSBill Taylor 	IN  DAPL_PRIVATE		*prd_ptr,
252*9e39c5baSBill Taylor 	OUT DAT_SOCK_ADDR6		*remote_ia_address);
253*9e39c5baSBill Taylor 
254*9e39c5baSBill Taylor /* SUNW */
255*9e39c5baSBill Taylor void dapls_ib_store_premature_events(
256*9e39c5baSBill Taylor 	IN ib_qp_handle_t	qp_ptr,
257*9e39c5baSBill Taylor 	IN ib_work_completion_t	*cqe_ptr);
258*9e39c5baSBill Taylor 
259*9e39c5baSBill Taylor void dapls_ib_poll_premature_events(
260*9e39c5baSBill Taylor 	IN  DAPL_EP			*ep_ptr,
261*9e39c5baSBill Taylor 	OUT ib_work_completion_t	**cqe_ptr,
262*9e39c5baSBill Taylor 	OUT int				*nevents);
263*9e39c5baSBill Taylor 
264*9e39c5baSBill Taylor void dapls_ib_free_premature_events(
265*9e39c5baSBill Taylor 	IN  DAPL_EP	*ep_ptr,
266*9e39c5baSBill Taylor 	IN  int		free_index);
267*9e39c5baSBill Taylor 
268*9e39c5baSBill Taylor DAT_RETURN dapls_ib_event_poll(
269*9e39c5baSBill Taylor 	IN DAPL_EVD		*evd_ptr,
270*9e39c5baSBill Taylor 	IN uint64_t		timeout,
271*9e39c5baSBill Taylor 	IN uint_t		threshold,
272*9e39c5baSBill Taylor 	OUT dapl_ib_event_t	*evp_ptr,
273*9e39c5baSBill Taylor 	OUT int			*num_events);
274*9e39c5baSBill Taylor 
275*9e39c5baSBill Taylor DAT_RETURN dapls_ib_event_wakeup(
276*9e39c5baSBill Taylor 	IN DAPL_EVD		*evd_ptr);
277*9e39c5baSBill Taylor 
278*9e39c5baSBill Taylor void dapls_ib_cq_peek(
279*9e39c5baSBill Taylor 	IN DAPL_EVD	*evd_ptr,
280*9e39c5baSBill Taylor 	OUT int		*num_cqe);
281*9e39c5baSBill Taylor 
282*9e39c5baSBill Taylor DAT_RETURN dapls_ib_modify_cno(
283*9e39c5baSBill Taylor 	IN DAPL_EVD	*evd_ptr,
284*9e39c5baSBill Taylor 	IN DAPL_CNO	*cno_ptr);
285*9e39c5baSBill Taylor 
286*9e39c5baSBill Taylor DAT_RETURN dapls_ib_cno_wait(
287*9e39c5baSBill Taylor 	IN DAPL_CNO	*cno_ptr,
288*9e39c5baSBill Taylor 	IN DAT_TIMEOUT	timeout,
289*9e39c5baSBill Taylor 	IN DAPL_EVD	**evd_ptr_p);
290*9e39c5baSBill Taylor 
291*9e39c5baSBill Taylor DAT_RETURN dapls_ib_cno_alloc(
292*9e39c5baSBill Taylor 	IN DAPL_IA	*ia_ptr,
293*9e39c5baSBill Taylor 	IN DAPL_CNO	*cno_ptr);
294*9e39c5baSBill Taylor 
295*9e39c5baSBill Taylor DAT_RETURN dapls_ib_cno_free(
296*9e39c5baSBill Taylor 	IN DAPL_CNO	*cno_ptr);
297*9e39c5baSBill Taylor 
298*9e39c5baSBill Taylor DAT_RETURN dapls_ib_post_recv(
299*9e39c5baSBill Taylor 	IN  DAPL_EP			*ep_ptr,
300*9e39c5baSBill Taylor 	IN  DAPL_COOKIE			*dto_cookie,
301*9e39c5baSBill Taylor 	IN  DAT_COUNT			num_segments,
302*9e39c5baSBill Taylor 	IN  DAT_LMR_TRIPLET		*local_iov,
303*9e39c5baSBill Taylor 	IN  DAT_COMPLETION_FLAGS	completion_flags);
304*9e39c5baSBill Taylor 
305*9e39c5baSBill Taylor DAT_RETURN dapls_ib_post_recv_one(
306*9e39c5baSBill Taylor 	IN  DAPL_EP			*ep_ptr,
307*9e39c5baSBill Taylor 	IN  DAPL_COOKIE			*dto_cookie,
308*9e39c5baSBill Taylor 	IN  DAT_LMR_TRIPLET		*local_iov);
309*9e39c5baSBill Taylor 
310*9e39c5baSBill Taylor DAT_RETURN dapls_ib_post_srq(
311*9e39c5baSBill Taylor 	IN  DAPL_SRQ			*srq_ptr,
312*9e39c5baSBill Taylor 	IN  DAPL_COOKIE			*dto_cookie,
313*9e39c5baSBill Taylor 	IN  DAT_COUNT			num_segments,
314*9e39c5baSBill Taylor 	IN  DAT_LMR_TRIPLET		*local_iov);
315*9e39c5baSBill Taylor 
316*9e39c5baSBill Taylor DAT_RETURN dapls_ib_post_send(
317*9e39c5baSBill Taylor 	IN  DAPL_EP			*ep_ptr,
318*9e39c5baSBill Taylor 	IN  ib_send_op_type_t		op_type,
319*9e39c5baSBill Taylor 	IN  DAPL_COOKIE			*dto_cookie,
320*9e39c5baSBill Taylor 	IN  DAT_COUNT			num_segments,
321*9e39c5baSBill Taylor 	IN  DAT_LMR_TRIPLET		*local_iov,
322*9e39c5baSBill Taylor 	IN  const DAT_RMR_TRIPLET	*remote_iov,
323*9e39c5baSBill Taylor 	IN  DAT_COMPLETION_FLAGS	completion_flags);
324*9e39c5baSBill Taylor 
325*9e39c5baSBill Taylor DAT_RETURN dapls_ib_post_send_one(
326*9e39c5baSBill Taylor 	IN  DAPL_EP			*ep_ptr,
327*9e39c5baSBill Taylor 	IN  ib_send_op_type_t		op_type,
328*9e39c5baSBill Taylor 	IN  DAPL_COOKIE			*dto_cookie,
329*9e39c5baSBill Taylor 	IN  DAT_LMR_TRIPLET		*local_iov,
330*9e39c5baSBill Taylor 	IN  const DAT_RMR_TRIPLET	*remote_iov);
331*9e39c5baSBill Taylor 
332*9e39c5baSBill Taylor DAT_RETURN dapls_ib_lmr_sync_rdma_common(
333*9e39c5baSBill Taylor 	IN DAT_IA_HANDLE ia_handle,
334*9e39c5baSBill Taylor 	IN const DAT_LMR_TRIPLET *local_segments,
335*9e39c5baSBill Taylor 	IN DAT_VLEN num_segments,
336*9e39c5baSBill Taylor 	IN uint32_t op_type);
337*9e39c5baSBill Taylor 
338*9e39c5baSBill Taylor DAT_RETURN dapls_ib_srq_alloc(
339*9e39c5baSBill Taylor 	IN DAPL_IA *ia_handle,
340*9e39c5baSBill Taylor 	IN DAPL_SRQ *srq_handle);
341*9e39c5baSBill Taylor 
342*9e39c5baSBill Taylor void dapls_ib_srq_free(
343*9e39c5baSBill Taylor 	IN DAPL_IA *ia_handle,
344*9e39c5baSBill Taylor 	IN DAPL_SRQ *srq_handle);
345*9e39c5baSBill Taylor 
346*9e39c5baSBill Taylor DAT_RETURN dapls_ib_srq_resize(
347*9e39c5baSBill Taylor 	IN  DAPL_SRQ	*srq_ptr,
348*9e39c5baSBill Taylor 	IN  DAT_COUNT	srqlen);
349*9e39c5baSBill Taylor 
350*9e39c5baSBill Taylor DAPL_EP *dapls_ib_srq_lookup_ep(
351*9e39c5baSBill Taylor 	IN DAPL_SRQ *srq_ptr,
352*9e39c5baSBill Taylor 	IN ib_work_completion_t *cqe_ptr);
353*9e39c5baSBill Taylor 
354*9e39c5baSBill Taylor DAT_COUNT dapls_ib_max_request_iov(
355*9e39c5baSBill Taylor 	IN DAT_COUNT iovs,
356*9e39c5baSBill Taylor 	IN DAT_COUNT wqes,
357*9e39c5baSBill Taylor 	IN DAT_COUNT max_iovs,
358*9e39c5baSBill Taylor 	IN int max_inline_bytes);
359*9e39c5baSBill Taylor 
360*9e39c5baSBill Taylor /* SUNW */
361*9e39c5baSBill Taylor 
362*9e39c5baSBill Taylor 
363*9e39c5baSBill Taylor #ifdef	IBAPI
364*9e39c5baSBill Taylor #include "dapl_ibapi_dto.h"
365*9e39c5baSBill Taylor #elif VAPI
366*9e39c5baSBill Taylor #include "dapl_vapi_dto.h"
367*9e39c5baSBill Taylor #endif
368*9e39c5baSBill Taylor 
369*9e39c5baSBill Taylor #ifdef __cplusplus
370*9e39c5baSBill Taylor }
371*9e39c5baSBill Taylor #endif
372*9e39c5baSBill Taylor 
373*9e39c5baSBill Taylor #endif /* _DAPL_ADAPTER_UTIL_H_ */