dapl_ep_util.h revision 9517:b4839b0aa7a4
167754Smsmith/*
267754Smsmith * CDDL HEADER START
367754Smsmith *
467754Smsmith * The contents of this file are subject to the terms of the
567754Smsmith * Common Development and Distribution License (the "License").
667754Smsmith * You may not use this file except in compliance with the License.
7217365Sjkim *
8229989Sjkim * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
970243Smsmith * or http://www.opensolaris.org/os/licensing.
1067754Smsmith * See the License for the specific language governing permissions
11217365Sjkim * and limitations under the License.
12217365Sjkim *
13217365Sjkim * When distributing Covered Code, include this CDDL HEADER in each
14217365Sjkim * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15217365Sjkim * If applicable, add the following below this CDDL HEADER, with the
16217365Sjkim * fields enclosed by brackets "[]" replaced with your own identifying
17217365Sjkim * information: Portions Copyright [yyyy] [name of copyright owner]
18217365Sjkim *
19217365Sjkim * CDDL HEADER END
20217365Sjkim */
21217365Sjkim
22217365Sjkim/*
23217365Sjkim * Copyright (c) 2002-2003, Network Appliance, Inc. All rights reserved.
24217365Sjkim */
2567754Smsmith
26217365Sjkim/*
27217365Sjkim * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
28217365Sjkim * Use is subject to license terms.
2967754Smsmith */
30217365Sjkim
31217365Sjkim/*
32217365Sjkim *
33217365Sjkim * HEADER: dapl_ep_util.h
34217365Sjkim *
35217365Sjkim * PURPOSE: Utility defs & routines for the EP data structure
36217365Sjkim *
37217365Sjkim */
38217365Sjkim
39217365Sjkim#ifndef _DAPL_EP_UTIL_H_
40217365Sjkim#define	_DAPL_EP_UTIL_H_
41217365Sjkim
42217365Sjkim#ifdef __cplusplus
4367754Smsmithextern "C" {
4467754Smsmith#endif
4567754Smsmith
4667754Smsmith#include "dapl.h"
47193341Sjkim#include "dapl_adapter_util.h"
48193341Sjkim
49193341Sjkim/* function prototypes */
50193341Sjkimextern DAPL_EP *
51193341Sjkimdapl_ep_alloc(
5267754Smsmith	IN DAPL_IA		*ia,
5377424Smsmith	IN const DAT_EP_ATTR	*ep_attr,
5491116Smsmith	IN DAT_BOOLEAN		srq_attached);
5567754Smsmith
56151937Sjkimextern void
5767754Smsmithdapl_ep_dealloc(
58151937Sjkim	IN DAPL_EP		*ep_ptr);
59151937Sjkim
60151937Sjkimextern DAT_RETURN
61151937Sjkimdapl_ep_check_recv_completion_flags(
62151937Sjkim	DAT_COMPLETION_FLAGS	flags);
63151937Sjkim
64151937Sjkimextern DAT_RETURN
65151937Sjkimdapl_ep_check_request_completion_flags(
66151937Sjkim	DAT_COMPLETION_FLAGS	flags);
67151937Sjkim
68151937Sjkimextern DAT_RETURN
69151937Sjkimdapl_ep_check_qos(
70151937Sjkim	DAT_QOS	qos);
71151937Sjkim
72167802Sjkimextern DAT_RETURN
73167802Sjkimdapl_ep_post_send_req(
74167802Sjkim	IN	DAT_EP_HANDLE		ep_handle,
75167802Sjkim	IN	DAT_COUNT		num_segments,
76167802Sjkim	IN	DAT_LMR_TRIPLET		*local_iov,
77167802Sjkim	IN	DAT_DTO_COOKIE		user_cookie,
78151937Sjkim	IN	const DAT_RMR_TRIPLET	*remote_iov,
79167802Sjkim	IN	DAT_COMPLETION_FLAGS	completion_flags,
8067754Smsmith	IN	DAPL_DTO_TYPE		dto_type,
8167754Smsmith	IN	ib_send_op_type_t	op_type);
8267754Smsmith
8367754Smsmithvoid dapls_ep_timeout(unsigned long arg);
8467754Smsmith
8567754SmsmithDAT_RETURN_SUBTYPE
8667754Smsmithdapls_ep_state_subtype(
8767754Smsmith	IN  DAPL_EP	*ep_ptr);
8867754Smsmith
8967754Smsmithextern DAT_RETURN
9067754Smsmithdapl_ep_create_common(
9167754Smsmith	IN	DAT_IA_HANDLE ia_handle,
9267754Smsmith	IN	DAT_PZ_HANDLE pz_handle,
9367754Smsmith	IN	DAT_EVD_HANDLE recv_evd_handle,
9467754Smsmith	IN	DAT_EVD_HANDLE request_evd_handle,
9567754Smsmith	IN	DAT_EVD_HANDLE connect_evd_handle,
9667754Smsmith	IN	DAT_SRQ_HANDLE srq_handle,
9767754Smsmith	IN	const DAT_EP_ATTR *ep_attr,
9867754Smsmith	OUT	DAT_EP_HANDLE *ep_handle);
9967754Smsmith
10067754Smsmith#ifdef __cplusplus
101167802Sjkim}
10267754Smsmith#endif
10367754Smsmith
10482367Smsmith#endif /* _DAPL_EP_UTIL_H_ */
10582367Smsmith