1*c39526b7SPramod Gunjikar /*
2*c39526b7SPramod Gunjikar  * CDDL HEADER START
3*c39526b7SPramod Gunjikar  *
4*c39526b7SPramod Gunjikar  * The contents of this file are subject to the terms of the
5*c39526b7SPramod Gunjikar  * Common Development and Distribution License (the "License").
6*c39526b7SPramod Gunjikar  * You may not use this file except in compliance with the License.
7*c39526b7SPramod Gunjikar  *
8*c39526b7SPramod Gunjikar  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9*c39526b7SPramod Gunjikar  * or http://www.opensolaris.org/os/licensing.
10*c39526b7SPramod Gunjikar  * See the License for the specific language governing permissions
11*c39526b7SPramod Gunjikar  * and limitations under the License.
12*c39526b7SPramod Gunjikar  *
13*c39526b7SPramod Gunjikar  * When distributing Covered Code, include this CDDL HEADER in each
14*c39526b7SPramod Gunjikar  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15*c39526b7SPramod Gunjikar  * If applicable, add the following below this CDDL HEADER, with the
16*c39526b7SPramod Gunjikar  * fields enclosed by brackets "[]" replaced with your own identifying
17*c39526b7SPramod Gunjikar  * information: Portions Copyright [yyyy] [name of copyright owner]
18*c39526b7SPramod Gunjikar  *
19*c39526b7SPramod Gunjikar  * CDDL HEADER END
20*c39526b7SPramod Gunjikar  */
21*c39526b7SPramod Gunjikar 
22*c39526b7SPramod Gunjikar /*
23*c39526b7SPramod Gunjikar  * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
24*c39526b7SPramod Gunjikar  */
25*c39526b7SPramod Gunjikar 
26*c39526b7SPramod Gunjikar /*
27*c39526b7SPramod Gunjikar  * This header file contains definations for APIs which are exported by
28*c39526b7SPramod Gunjikar  * sol_uverbs for use by sol_ucma
29*c39526b7SPramod Gunjikar  */
30*c39526b7SPramod Gunjikar #ifndef	_SYS_IB_CLIENTS_OF_SOL_UVERBS_SOL_UVERBS2UCMA_H
31*c39526b7SPramod Gunjikar #define	_SYS_IB_CLIENTS_OF_SOL_UVERBS_SOL_UVERBS2UCMA_H
32*c39526b7SPramod Gunjikar 
33*c39526b7SPramod Gunjikar #ifdef __cplusplus
34*c39526b7SPramod Gunjikar extern "C" {
35*c39526b7SPramod Gunjikar #endif
36*c39526b7SPramod Gunjikar 
37*c39526b7SPramod Gunjikar #define	SOL_UCMA_UVERBS_PATH	"/ib/sol_uverbs@0:ucma"
38*c39526b7SPramod Gunjikar 
39*c39526b7SPramod Gunjikar /*
40*c39526b7SPramod Gunjikar  * This API returns the IB & iWARP client handles that sol_uverbs uses
41*c39526b7SPramod Gunjikar  * to interact with Solaris IBTF and iWARP frameworks.
42*c39526b7SPramod Gunjikar  */
43*c39526b7SPramod Gunjikar #define	SOL_UVERBS_GET_CLNT_HDL	"sol_uverbs_get_clnt_hdl"
44*c39526b7SPramod Gunjikar typedef void	(*uverbs_get_clnt_hdl_t) (void **, void **);
45*c39526b7SPramod Gunjikar 
46*c39526b7SPramod Gunjikar /*
47*c39526b7SPramod Gunjikar  * This API returns the QP handle used by Solaris IBTF / iWARP framework
48*c39526b7SPramod Gunjikar  * for an QP. The QP number is the input for this API. NULL is returned
49*c39526b7SPramod Gunjikar  * for QP not allocated by sol_uverbs.
50*c39526b7SPramod Gunjikar  */
51*c39526b7SPramod Gunjikar #define	SOL_UVERBS_QPNUM2QPHDL	"sol_uverbs_qpnum2qphdl"
52*c39526b7SPramod Gunjikar typedef void	*(*uverbs_qpnum2qphdl_t) (uint32_t);
53*c39526b7SPramod Gunjikar 
54*c39526b7SPramod Gunjikar /*
55*c39526b7SPramod Gunjikar  * This API disables user QP modifies for an QP specified by the input
56*c39526b7SPramod Gunjikar  * QP number. It returns 0 on succcess and non-0 on failure.
57*c39526b7SPramod Gunjikar  */
58*c39526b7SPramod Gunjikar #define	SOL_UVERBS_DISABLE_UQPN_MODIFY	"sol_uverbs_disable_uqpn_modify"
59*c39526b7SPramod Gunjikar typedef int	(*uverbs_disable_uqpn_mod_t)(uint32_t);
60*c39526b7SPramod Gunjikar 
61*c39526b7SPramod Gunjikar /*
62*c39526b7SPramod Gunjikar  * This API enables / disables CQ notification for all CQs assosiated
63*c39526b7SPramod Gunjikar  * with the QP. This is done to ensure that the first completion event
64*c39526b7SPramod Gunjikar  * is send to userland *after* connection is established.
65*c39526b7SPramod Gunjikar  */
66*c39526b7SPramod Gunjikar typedef enum {
67*c39526b7SPramod Gunjikar 	SOL_UVERBS2UCMA_CQ_NOTIFY_NOT_SET = 0,
68*c39526b7SPramod Gunjikar 	SOL_UVERBS2UCMA_CQ_NOTIFY_ENABLE,
69*c39526b7SPramod Gunjikar 	SOL_UVERBS2UCMA_CQ_NOTIFY_DISABLE
70*c39526b7SPramod Gunjikar } sol_uverbs_cq_ctrl_t;
71*c39526b7SPramod Gunjikar #define	SOL_UVERBS_UQPN_CQ_CTRL	"sol_uverbs_uqpn_cq_ctrl"
72*c39526b7SPramod Gunjikar typedef int	(*uverbs_uqpn_cq_ctrl_t)(uint32_t, sol_uverbs_cq_ctrl_t);
73*c39526b7SPramod Gunjikar 
74*c39526b7SPramod Gunjikar /*
75*c39526b7SPramod Gunjikar  * This API sets the QP free state. The uint32_t uqpid is passed for
76*c39526b7SPramod Gunjikar  * disabling QP free and void *qphdl is passed for enabling QP free.
77*c39526b7SPramod Gunjikar  */
78*c39526b7SPramod Gunjikar typedef enum {
79*c39526b7SPramod Gunjikar 	SOL_UVERBS2UCMA_ENABLE_QP_FREE,
80*c39526b7SPramod Gunjikar 	SOL_UVERBS2UCMA_DISABLE_QP_FREE,
81*c39526b7SPramod Gunjikar 	SOL_UVERBS2UCMA_FREE_PENDING
82*c39526b7SPramod Gunjikar } sol_uverbs_qp_free_state_t;
83*c39526b7SPramod Gunjikar #define	SOL_UVERBS_SET_QPFREE_STATE	"sol_uverbs_set_qp_free_state"
84*c39526b7SPramod Gunjikar typedef void	(*uverbs_set_qp_free_state_t)(sol_uverbs_qp_free_state_t,
85*c39526b7SPramod Gunjikar     uint32_t, void *);
86*c39526b7SPramod Gunjikar 
87*c39526b7SPramod Gunjikar /*
88*c39526b7SPramod Gunjikar  * This API flushes the QP specified by the QP num
89*c39526b7SPramod Gunjikar  */
90*c39526b7SPramod Gunjikar #define	SOL_UVERBS_FLUSH_QP		"sol_uverbs_flush_qp"
91*c39526b7SPramod Gunjikar typedef void	(*uverbs_flush_qp_t)(uint32_t);
92*c39526b7SPramod Gunjikar 
93*c39526b7SPramod Gunjikar #ifdef __cplusplus
94*c39526b7SPramod Gunjikar }
95*c39526b7SPramod Gunjikar #endif
96*c39526b7SPramod Gunjikar 
97*c39526b7SPramod Gunjikar #endif /* _SYS_IB_CLIENTS_OF_SOL_UVERBS_SOL_UVERBS2UCMA_H */
98