1 /*
2  * CDDL HEADER START
3  *
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.
7  *
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.
12  *
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]
18  *
19  * CDDL HEADER END
20  */
21 
22 /*
23  * Copyright (c) 2002-2003, Network Appliance, Inc. All rights reserved.
24  */
25 
26 /*
27  * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
28  * Use is subject to license terms.
29  */
30 
31 /*
32  *
33  * HEADER: dapl_ep_util.h
34  *
35  * PURPOSE: Utility defs & routines for the EP data structure
36  *
37  */
38 
39 #ifndef _DAPL_EP_UTIL_H_
40 #define	_DAPL_EP_UTIL_H_
41 
42 #ifdef __cplusplus
43 extern "C" {
44 #endif
45 
46 #include "dapl.h"
47 #include "dapl_adapter_util.h"
48 
49 /* function prototypes */
50 extern DAPL_EP *
51 dapl_ep_alloc(
52 	IN DAPL_IA		*ia,
53 	IN const DAT_EP_ATTR	*ep_attr,
54 	IN DAT_BOOLEAN		srq_attached);
55 
56 extern void
57 dapl_ep_dealloc(
58 	IN DAPL_EP		*ep_ptr);
59 
60 extern DAT_RETURN
61 dapl_ep_check_recv_completion_flags(
62 	DAT_COMPLETION_FLAGS	flags);
63 
64 extern DAT_RETURN
65 dapl_ep_check_request_completion_flags(
66 	DAT_COMPLETION_FLAGS	flags);
67 
68 extern DAT_RETURN
69 dapl_ep_check_qos(
70 	DAT_QOS	qos);
71 
72 extern DAT_RETURN
73 dapl_ep_post_send_req(
74 	IN	DAT_EP_HANDLE		ep_handle,
75 	IN	DAT_COUNT		num_segments,
76 	IN	DAT_LMR_TRIPLET		*local_iov,
77 	IN	DAT_DTO_COOKIE		user_cookie,
78 	IN	const DAT_RMR_TRIPLET	*remote_iov,
79 	IN	DAT_COMPLETION_FLAGS	completion_flags,
80 	IN	DAPL_DTO_TYPE		dto_type,
81 	IN	ib_send_op_type_t	op_type);
82 
83 void dapls_ep_timeout(unsigned long arg);
84 
85 DAT_RETURN_SUBTYPE
86 dapls_ep_state_subtype(
87 	IN  DAPL_EP	*ep_ptr);
88 
89 extern DAT_RETURN
90 dapl_ep_create_common(
91 	IN	DAT_IA_HANDLE ia_handle,
92 	IN	DAT_PZ_HANDLE pz_handle,
93 	IN	DAT_EVD_HANDLE recv_evd_handle,
94 	IN	DAT_EVD_HANDLE request_evd_handle,
95 	IN	DAT_EVD_HANDLE connect_evd_handle,
96 	IN	DAT_SRQ_HANDLE srq_handle,
97 	IN	const DAT_EP_ATTR *ep_attr,
98 	OUT	DAT_EP_HANDLE *ep_handle);
99 
100 #ifdef __cplusplus
101 }
102 #endif
103 
104 #endif /* _DAPL_EP_UTIL_H_ */
105