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 #ifndef _SYS_IB_CLIENTS_OF_SOL_UVERBS_SOL_UVERBS_QP_H
27*c39526b7SPramod Gunjikar #define	_SYS_IB_CLIENTS_OF_SOL_UVERBS_SOL_UVERBS_QP_H
28*c39526b7SPramod Gunjikar 
29*c39526b7SPramod Gunjikar #ifdef __cplusplus
30*c39526b7SPramod Gunjikar extern "C" {
31*c39526b7SPramod Gunjikar #endif
32*c39526b7SPramod Gunjikar 
33*c39526b7SPramod Gunjikar /*
34*c39526b7SPramod Gunjikar  * NAME: sol_uverbs_qp.h
35*c39526b7SPramod Gunjikar  *
36*c39526b7SPramod Gunjikar  * DESC: OFED User Verbs Kernel Queue Pair structures and definitions
37*c39526b7SPramod Gunjikar  *
38*c39526b7SPramod Gunjikar  */
39*c39526b7SPramod Gunjikar 
40*c39526b7SPramod Gunjikar /*
41*c39526b7SPramod Gunjikar  * Definitions
42*c39526b7SPramod Gunjikar  */
43*c39526b7SPramod Gunjikar #define	IBT_TO_OFA_QP_STATE(_state)  ((_state) < IBT_STATE_SQDRAIN ?   \
44*c39526b7SPramod Gunjikar 						(_state) : IBT_STATE_SQD)
45*c39526b7SPramod Gunjikar 
46*c39526b7SPramod Gunjikar /*
47*c39526b7SPramod Gunjikar  * Structures
48*c39526b7SPramod Gunjikar  */
49*c39526b7SPramod Gunjikar 
50*c39526b7SPramod Gunjikar /*
51*c39526b7SPramod Gunjikar  * Functions - See sol_uverbs_qp.c for descriptions
52*c39526b7SPramod Gunjikar  */
53*c39526b7SPramod Gunjikar int sol_uverbs_create_qp(uverbs_uctxt_uobj_t *uctxt, char *buf, int in_len,
54*c39526b7SPramod Gunjikar 								int out_len);
55*c39526b7SPramod Gunjikar 
56*c39526b7SPramod Gunjikar int sol_uverbs_destroy_qp(uverbs_uctxt_uobj_t *uctxt, char *buf, int in_len,
57*c39526b7SPramod Gunjikar 								int out_len);
58*c39526b7SPramod Gunjikar 
59*c39526b7SPramod Gunjikar int sol_uverbs_modify_qp(uverbs_uctxt_uobj_t *uctxt, char *buf, int in_len,
60*c39526b7SPramod Gunjikar 								int out_len);
61*c39526b7SPramod Gunjikar 
62*c39526b7SPramod Gunjikar int sol_uverbs_query_qp(uverbs_uctxt_uobj_t *uctxt, char *buf, int in_len,
63*c39526b7SPramod Gunjikar 								int out_len);
64*c39526b7SPramod Gunjikar 
65*c39526b7SPramod Gunjikar int sol_uverbs_create_srq(uverbs_uctxt_uobj_t *uctxt, char *buf, int in_len,
66*c39526b7SPramod Gunjikar 								int out_len);
67*c39526b7SPramod Gunjikar 
68*c39526b7SPramod Gunjikar int sol_uverbs_modify_srq(uverbs_uctxt_uobj_t *uctxt, char *buf, int in_len,
69*c39526b7SPramod Gunjikar 								int out_len);
70*c39526b7SPramod Gunjikar 
71*c39526b7SPramod Gunjikar int sol_uverbs_query_srq(uverbs_uctxt_uobj_t *uctxt, char *buf, int in_len,
72*c39526b7SPramod Gunjikar 								int out_len);
73*c39526b7SPramod Gunjikar 
74*c39526b7SPramod Gunjikar int sol_uverbs_destroy_srq(uverbs_uctxt_uobj_t *uctxt, char *buf, int in_len,
75*c39526b7SPramod Gunjikar 								int out_len);
76*c39526b7SPramod Gunjikar 
77*c39526b7SPramod Gunjikar int sol_uverbs_attach_mcast(uverbs_uctxt_uobj_t *uctxt, char *buf, int in_len,
78*c39526b7SPramod Gunjikar 								int out_len);
79*c39526b7SPramod Gunjikar 
80*c39526b7SPramod Gunjikar int sol_uverbs_detach_mcast(uverbs_uctxt_uobj_t *uctxt, char *buf, int in_len,
81*c39526b7SPramod Gunjikar 								int out_len);
82*c39526b7SPramod Gunjikar 
83*c39526b7SPramod Gunjikar void uverbs_detach_uqp_mcast_entries(uverbs_uqp_uobj_t *uqp);
84*c39526b7SPramod Gunjikar 
85*c39526b7SPramod Gunjikar #ifdef __cplusplus
86*c39526b7SPramod Gunjikar }
87*c39526b7SPramod Gunjikar #endif
88*c39526b7SPramod Gunjikar #endif /* _SYS_IB_CLIENTS_OF_SOL_UVERBS_SOL_UVERBS_QP_H */
89