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 2009 Sun Microsystems, Inc. All rights reserved. 24*9e39c5baSBill Taylor * Use is subject to license terms. 25*9e39c5baSBill Taylor */ 26*9e39c5baSBill Taylor 27*9e39c5baSBill Taylor #ifndef _SYS_IB_ADAPTERS_HERMON_QP_H 28*9e39c5baSBill Taylor #define _SYS_IB_ADAPTERS_HERMON_QP_H 29*9e39c5baSBill Taylor 30*9e39c5baSBill Taylor /* 31*9e39c5baSBill Taylor * hermon_qp.h 32*9e39c5baSBill Taylor * Contains all of the prototypes, #defines, and structures necessary 33*9e39c5baSBill Taylor * for all of the Queue Pair Processing routines. 34*9e39c5baSBill Taylor * Specifically it contains the various flags, structures used for managing 35*9e39c5baSBill Taylor * Hermon queue pairs, and prototypes for many of the functions consumed by 36*9e39c5baSBill Taylor * other parts of the Hermon driver (including those routines directly 37*9e39c5baSBill Taylor * exposed through the IBTF CI interface). 38*9e39c5baSBill Taylor * 39*9e39c5baSBill Taylor * Most of the values defined below establish default values which, 40*9e39c5baSBill Taylor * where indicated, can be controlled via their related patchable values, 41*9e39c5baSBill Taylor * if 'hermon_alt_config_enable' is set. 42*9e39c5baSBill Taylor */ 43*9e39c5baSBill Taylor 44*9e39c5baSBill Taylor #include <sys/types.h> 45*9e39c5baSBill Taylor #include <sys/conf.h> 46*9e39c5baSBill Taylor #include <sys/ddi.h> 47*9e39c5baSBill Taylor #include <sys/sunddi.h> 48*9e39c5baSBill Taylor 49*9e39c5baSBill Taylor #ifdef __cplusplus 50*9e39c5baSBill Taylor extern "C" { 51*9e39c5baSBill Taylor #endif 52*9e39c5baSBill Taylor 53*9e39c5baSBill Taylor /* 54*9e39c5baSBill Taylor * The following defines the default number of Queue Pairs. This value is 55*9e39c5baSBill Taylor * controlled via the "hermon_log_num_qp" configuration variables. 56*9e39c5baSBill Taylor * We also have a define for the minimum size of a QP. QPs allocated 57*9e39c5baSBill Taylor * with size 0, 1, 2, or 3 will always get back a QP of size 4. 58*9e39c5baSBill Taylor */ 59*9e39c5baSBill Taylor #define HERMON_NUM_QP_SHIFT 0x10 60*9e39c5baSBill Taylor #define HERMON_NUM_QPS (1 << HERMON_NUM_QP_SHIFT) /* 65,536 */ 61*9e39c5baSBill Taylor #define HERMON_QP_MIN_SIZE 0xf 62*9e39c5baSBill Taylor 63*9e39c5baSBill Taylor /* 64*9e39c5baSBill Taylor * The following defines the default number of Hermon RDMA Remote read 65*9e39c5baSBill Taylor * database (RDB) entries per QP. This value is controllable through the 66*9e39c5baSBill Taylor * "hermon_log_num_rdb_per_qp" configuration variable. 67*9e39c5baSBill Taylor */ 68*9e39c5baSBill Taylor #define HERMON_LOG_NUM_RDB_PER_QP 0x4 69*9e39c5baSBill Taylor 70*9e39c5baSBill Taylor /* 71*9e39c5baSBill Taylor * This defines the maximum number of SGLs per WQE. This value is 72*9e39c5baSBill Taylor * controllable through the "hermon_wqe_max_sgl" configuration variable 73*9e39c5baSBill Taylor * (but should not be set larger than this value). 74*9e39c5baSBill Taylor */ 75*9e39c5baSBill Taylor #define HERMON_NUM_SGL_PER_WQE 0x10 76*9e39c5baSBill Taylor 77*9e39c5baSBill Taylor /* 78*9e39c5baSBill Taylor * Maximum QP number mask (QP number is 24 bits). 79*9e39c5baSBill Taylor * We reserve the most significant bit to indicate an "XRC" QP 80*9e39c5baSBill Taylor * as recommended by the PRM. All XRC QPs will have this bit set. 81*9e39c5baSBill Taylor */ 82*9e39c5baSBill Taylor #define HERMON_QP_MAXNUMBER_MSK 0x7FFFFF 83*9e39c5baSBill Taylor #define HERMON_QP_XRC 0x800000 84*9e39c5baSBill Taylor 85*9e39c5baSBill Taylor /* 86*9e39c5baSBill Taylor * This define and the following macro are used to find a schedule queue for 87*9e39c5baSBill Taylor * a new QP based on its queue pair number. Note: This is a rather simple 88*9e39c5baSBill Taylor * method that we use today. We simply choose from the schedule queue based 89*9e39c5baSBill Taylor * on the 4 least significant bits of the QP number. 90*9e39c5baSBill Taylor */ 91*9e39c5baSBill Taylor 92*9e39c5baSBill Taylor /* 93*9e39c5baSBill Taylor * The following defines are used to indicate whether a QP is special or 94*9e39c5baSBill Taylor * not (and what type it is). They are used in the "qp_is_special" field 95*9e39c5baSBill Taylor * below in qp_state. If "qp_is_special" == 0 then an ordinary data qp. 96*9e39c5baSBill Taylor */ 97*9e39c5baSBill Taylor 98*9e39c5baSBill Taylor /* 99*9e39c5baSBill Taylor * The sl is selected based on the qpnum as it was for Tavor/Arbel, except for 100*9e39c5baSBill Taylor * QP0, which is defined as being 0xF 101*9e39c5baSBill Taylor */ 102*9e39c5baSBill Taylor 103*9e39c5baSBill Taylor #define HERMON_QP_SMI 0x1 104*9e39c5baSBill Taylor #define HERMON_QP_GSI 0x2 105*9e39c5baSBill Taylor 106*9e39c5baSBill Taylor #define HERMON_DEF_SCHED_POLICY 0x03 107*9e39c5baSBill Taylor #define HERMON_DEF_SCHED_SELECTION 0x0F 108*9e39c5baSBill Taylor 109*9e39c5baSBill Taylor #define HERMON_QP_SCHEDQ_GET(port, sl, issmi) \ 110*9e39c5baSBill Taylor (HERMON_DEF_SCHED_POLICY \ 111*9e39c5baSBill Taylor | (issmi == HERMON_QP_SMI ? (HERMON_DEF_SCHED_SELECTION << 2) : \ 112*9e39c5baSBill Taylor ((issmi == HERMON_QP_GSI ? 0 : (sl & 0XF)) << 2)) \ 113*9e39c5baSBill Taylor | ((port & 0x01) << 6) \ 114*9e39c5baSBill Taylor | ((issmi == HERMON_QP_SMI ? 0 : 1) << 7)) 115*9e39c5baSBill Taylor 116*9e39c5baSBill Taylor 117*9e39c5baSBill Taylor /* 118*9e39c5baSBill Taylor * This define determines the frequency with which the AckReq bit will be 119*9e39c5baSBill Taylor * set in outgoing RC packets. By default it is set to five (5) or 2^5 = 32. 120*9e39c5baSBill Taylor * So AckReq will be set once every 32 packets sent. This value is 121*9e39c5baSBill Taylor * controllable through the "hermon_qp_ackreq_freq" configuration variable. 122*9e39c5baSBill Taylor */ 123*9e39c5baSBill Taylor #define HERMON_QP_ACKREQ_FREQ 0x5 124*9e39c5baSBill Taylor 125*9e39c5baSBill Taylor /* 126*9e39c5baSBill Taylor * Define the maximum message size (log 2). Note: This value corresponds 127*9e39c5baSBill Taylor * to the maximum allowable message sized as defined by the IBA spec. 128*9e39c5baSBill Taylor */ 129*9e39c5baSBill Taylor #define HERMON_QP_LOG_MAX_MSGSZ 0x1F 130*9e39c5baSBill Taylor 131*9e39c5baSBill Taylor /* 132*9e39c5baSBill Taylor * This macro is used to determine if the hermon QP type (qp_serv) is the 133*9e39c5baSBill Taylor * same as the caller passed in IBT type (qp_trans). This is used in QP modify 134*9e39c5baSBill Taylor * to ensure the types match. 135*9e39c5baSBill Taylor */ 136*9e39c5baSBill Taylor #define HERMON_QP_TYPE_VALID(qp_trans, qp_serv) \ 137*9e39c5baSBill Taylor ((qp_trans == IBT_UD_SRV && qp_serv == HERMON_QP_UD) || \ 138*9e39c5baSBill Taylor (qp_trans == IBT_RC_SRV && qp_serv == HERMON_QP_RC) || \ 139*9e39c5baSBill Taylor (qp_trans == IBT_UC_SRV && qp_serv == HERMON_QP_UC)) 140*9e39c5baSBill Taylor 141*9e39c5baSBill Taylor /* 142*9e39c5baSBill Taylor * The following enumerated type is used to capture all the various types 143*9e39c5baSBill Taylor * of Hermon work queue types. It is specifically used as an argument to the 144*9e39c5baSBill Taylor * to the hermon_qp_sgl_to_logwqesz() routine to determine the amount of 145*9e39c5baSBill Taylor * overhead (in WQE header size) consumed by each of the types. This 146*9e39c5baSBill Taylor * information is used to round the WQE size to the next largest power-of-2 147*9e39c5baSBill Taylor * (and to determine the number of SGLs that are supported for the given WQE 148*9e39c5baSBill Taylor * type). There is also a define below used to specify the minimum size for a 149*9e39c5baSBill Taylor * WQE. The minimum size is set to 64 bytes (a single cacheline). 150*9e39c5baSBill Taylor */ 151*9e39c5baSBill Taylor 152*9e39c5baSBill Taylor typedef enum { 153*9e39c5baSBill Taylor HERMON_QP_WQ_TYPE_SENDQ_UD, 154*9e39c5baSBill Taylor HERMON_QP_WQ_TYPE_SENDQ_CONN, 155*9e39c5baSBill Taylor HERMON_QP_WQ_TYPE_RECVQ, 156*9e39c5baSBill Taylor HERMON_QP_WQ_TYPE_SENDMLX_QP0, 157*9e39c5baSBill Taylor HERMON_QP_WQ_TYPE_SENDMLX_QP1 158*9e39c5baSBill Taylor } hermon_qp_wq_type_t; 159*9e39c5baSBill Taylor #define HERMON_QP_WQE_MLX_SND_HDRS 0x40 160*9e39c5baSBill Taylor #define HERMON_QP_WQE_MLX_RCV_HDRS 0x00 161*9e39c5baSBill Taylor #define HERMON_QP_WQE_MLX_SRQ_HDRS 0x10 162*9e39c5baSBill Taylor #define HERMON_QP_WQE_MLX_QP0_HDRS 0x40 163*9e39c5baSBill Taylor #define HERMON_QP_WQE_MLX_QP1_HDRS 0x70 164*9e39c5baSBill Taylor #define HERMON_QP_WQE_LOG_MINIMUM 0x6 165*9e39c5baSBill Taylor 166*9e39c5baSBill Taylor 167*9e39c5baSBill Taylor /* 168*9e39c5baSBill Taylor * The hermon_qp_info_t structure is used internally by the Hermon driver to 169*9e39c5baSBill Taylor * pass information to and from the hermon_qp_alloc() and 170*9e39c5baSBill Taylor * hermon_special_qp_alloc() routines. It contains placeholders for all of the 171*9e39c5baSBill Taylor * potential inputs and outputs that either routine can take. 172*9e39c5baSBill Taylor */ 173*9e39c5baSBill Taylor typedef struct hermon_qp_info_s { 174*9e39c5baSBill Taylor ibt_qp_alloc_attr_t *qpi_attrp; 175*9e39c5baSBill Taylor uint_t qpi_type; 176*9e39c5baSBill Taylor uint_t qpi_port; 177*9e39c5baSBill Taylor ibtl_qp_hdl_t qpi_ibt_qphdl; 178*9e39c5baSBill Taylor ibt_chan_sizes_t *qpi_queueszp; 179*9e39c5baSBill Taylor ib_qpn_t *qpi_qpn; 180*9e39c5baSBill Taylor hermon_qphdl_t qpi_qphdl; 181*9e39c5baSBill Taylor } hermon_qp_info_t; 182*9e39c5baSBill Taylor 183*9e39c5baSBill Taylor /* 184*9e39c5baSBill Taylor * The QPN entry which is stored in the AVL tree 185*9e39c5baSBill Taylor */ 186*9e39c5baSBill Taylor typedef struct hermon_qpn_entry_s { 187*9e39c5baSBill Taylor avl_node_t qpn_avlnode; 188*9e39c5baSBill Taylor uint_t qpn_refcnt; 189*9e39c5baSBill Taylor uint_t qpn_counter; 190*9e39c5baSBill Taylor uint_t qpn_indx; 191*9e39c5baSBill Taylor hermon_rsrc_t *qpn_qpc; 192*9e39c5baSBill Taylor } hermon_qpn_entry_t; 193*9e39c5baSBill Taylor #define HERMON_QPN_NOFLAG 0x0 194*9e39c5baSBill Taylor #define HERMON_QPN_RELEASE 0x1 195*9e39c5baSBill Taylor #define HERMON_QPN_FREE_ONLY 0x2 196*9e39c5baSBill Taylor 197*9e39c5baSBill Taylor #define HERMON_QP_OH_SIZE 0x0800 198*9e39c5baSBill Taylor /* 199*9e39c5baSBill Taylor * 2KB, fixed per Mnox PRM 0.35c & conversation w/Mnox technical Sep 5, 2007 200*9e39c5baSBill Taylor */ 201*9e39c5baSBill Taylor 202*9e39c5baSBill Taylor /* 203*9e39c5baSBill Taylor * The hermon_sw_qp_s structure is also referred to using the "hermon_qphdl_t" 204*9e39c5baSBill Taylor * typedef (see hermon_typedef.h). It encodes all the information necessary 205*9e39c5baSBill Taylor * to track the various resources needed to allocate, query, modify, and 206*9e39c5baSBill Taylor * (later) free both normal QP and special QP. 207*9e39c5baSBill Taylor * 208*9e39c5baSBill Taylor * Specifically, it has a lock to ensure single threaded access to the QP. 209*9e39c5baSBill Taylor * It has QP state, type, and number, pointers to the PD, MR, and CQ handles 210*9e39c5baSBill Taylor * associated with the QP, and pointers to the buffer where the work queues 211*9e39c5baSBill Taylor * come from. 212*9e39c5baSBill Taylor * 213*9e39c5baSBill Taylor * It has two pointers (one per work queue) to the workQ headers for the WRID 214*9e39c5baSBill Taylor * list, as well as pointers to the last WQE on each chain (used when 215*9e39c5baSBill Taylor * connecting a new chain of WQEs to a previously executing chain - see 216*9e39c5baSBill Taylor * hermon_wr.c). It's also got the real WQE size, real number of SGL per WQE, 217*9e39c5baSBill Taylor * and the size of each of the work queues (in number of WQEs). 218*9e39c5baSBill Taylor * 219*9e39c5baSBill Taylor * Additionally, it has pointers to the resources associated with the QP, 220*9e39c5baSBill Taylor * including the obligatory backpointer to the resource for the QP handle 221*9e39c5baSBill Taylor * itself. But it also has some flags, like "qp_forward_sqd_event" and 222*9e39c5baSBill Taylor * "qp_sqd_still_draining" (which are used to indicate whether a Send Queue 223*9e39c5baSBill Taylor * Drained Event should be forwarded to the IBTF) or "qp_is_special", 224*9e39c5baSBill Taylor * "qp_portnum", and "qp_pkeyindx" (which are used by special QP to store 225*9e39c5baSBill Taylor * necessary information about the type of the QP, which port it's connected 226*9e39c5baSBill Taylor * to, and what its current PKey index is set to). 227*9e39c5baSBill Taylor */ 228*9e39c5baSBill Taylor struct hermon_sw_qp_s { 229*9e39c5baSBill Taylor kmutex_t qp_lock; 230*9e39c5baSBill Taylor uint_t qp_state; 231*9e39c5baSBill Taylor uint32_t qp_qpnum; 232*9e39c5baSBill Taylor hermon_pdhdl_t qp_pdhdl; 233*9e39c5baSBill Taylor uint_t qp_serv_type; 234*9e39c5baSBill Taylor uint_t qp_sl; /* service level */ 235*9e39c5baSBill Taylor hermon_mrhdl_t qp_mrhdl; 236*9e39c5baSBill Taylor uint_t qp_sq_sigtype; 237*9e39c5baSBill Taylor uint_t qp_is_special; 238*9e39c5baSBill Taylor uint_t qp_is_umap; 239*9e39c5baSBill Taylor uint32_t qp_uarpg; 240*9e39c5baSBill Taylor devmap_cookie_t qp_umap_dhp; 241*9e39c5baSBill Taylor uint_t qp_portnum; /* port 0/1 for HCA */ 242*9e39c5baSBill Taylor uint_t qp_portnum_alt; /* port 0/1 for HCA */ 243*9e39c5baSBill Taylor uint_t qp_pkeyindx; 244*9e39c5baSBill Taylor uint_t qp_no_prefetch; 245*9e39c5baSBill Taylor /* prefetch == 0, none == 1, for headroom */ 246*9e39c5baSBill Taylor uint_t qp_rlky; /* using reserved lkey */ 247*9e39c5baSBill Taylor 248*9e39c5baSBill Taylor /* Send Work Queue */ 249*9e39c5baSBill Taylor kmutex_t qp_sq_lock; 250*9e39c5baSBill Taylor hermon_cqhdl_t qp_sq_cqhdl; 251*9e39c5baSBill Taylor hermon_workq_avl_t qp_sq_wqavl; 252*9e39c5baSBill Taylor hermon_workq_hdr_t *qp_sq_wqhdr; 253*9e39c5baSBill Taylor uint32_t *qp_sq_buf; 254*9e39c5baSBill Taylor uint32_t qp_sq_bufsz; 255*9e39c5baSBill Taylor uint32_t qp_sq_logqsz; /* used to check owner valid */ 256*9e39c5baSBill Taylor uint32_t qp_sq_log_wqesz; 257*9e39c5baSBill Taylor uint32_t qp_sq_headroom; /* #bytes needed for headroom */ 258*9e39c5baSBill Taylor uint32_t qp_sq_hdrmwqes; /* # wqes needed for headroom */ 259*9e39c5baSBill Taylor uint32_t qp_sq_baseaddr; 260*9e39c5baSBill Taylor uint32_t qp_sq_sgl; 261*9e39c5baSBill Taylor uint_t qp_uses_lso; 262*9e39c5baSBill Taylor uint32_t qp_ring; 263*9e39c5baSBill Taylor 264*9e39c5baSBill Taylor /* Receive Work Queue - not used when SRQ is used */ 265*9e39c5baSBill Taylor kmutex_t qp_rq_lock; 266*9e39c5baSBill Taylor hermon_cqhdl_t qp_rq_cqhdl; 267*9e39c5baSBill Taylor hermon_workq_avl_t qp_rq_wqavl; /* needed for srq */ 268*9e39c5baSBill Taylor hermon_workq_hdr_t *qp_rq_wqhdr; 269*9e39c5baSBill Taylor uint32_t *qp_rq_buf; 270*9e39c5baSBill Taylor uint32_t qp_rq_bufsz; 271*9e39c5baSBill Taylor uint32_t qp_rq_logqsz; /* used to check owner valid */ 272*9e39c5baSBill Taylor uint32_t qp_rq_log_wqesz; 273*9e39c5baSBill Taylor uint32_t qp_rq_wqecntr; 274*9e39c5baSBill Taylor uint32_t qp_rq_baseaddr; 275*9e39c5baSBill Taylor uint32_t qp_rq_sgl; 276*9e39c5baSBill Taylor 277*9e39c5baSBill Taylor /* DoorBell Record information */ 278*9e39c5baSBill Taylor ddi_acc_handle_t qp_rq_dbr_acchdl; 279*9e39c5baSBill Taylor hermon_dbr_t *qp_rq_vdbr; 280*9e39c5baSBill Taylor uint64_t qp_rq_pdbr; 281*9e39c5baSBill Taylor uint64_t qp_rdbr_mapoffset; /* user mode access */ 282*9e39c5baSBill Taylor 283*9e39c5baSBill Taylor uint64_t qp_desc_off; 284*9e39c5baSBill Taylor 285*9e39c5baSBill Taylor hermon_rsrc_t *qp_qpcrsrcp; 286*9e39c5baSBill Taylor hermon_rsrc_t *qp_rsrcp; 287*9e39c5baSBill Taylor void *qp_hdlrarg; 288*9e39c5baSBill Taylor uint_t qp_forward_sqd_event; 289*9e39c5baSBill Taylor uint_t qp_sqd_still_draining; 290*9e39c5baSBill Taylor 291*9e39c5baSBill Taylor /* Shared Receive Queue */ 292*9e39c5baSBill Taylor hermon_srqhdl_t qp_srqhdl; 293*9e39c5baSBill Taylor uint_t qp_srq_en; 294*9e39c5baSBill Taylor 295*9e39c5baSBill Taylor /* Refcnt of QP belongs to an MCG */ 296*9e39c5baSBill Taylor uint_t qp_mcg_refcnt; 297*9e39c5baSBill Taylor 298*9e39c5baSBill Taylor /* save the mtu from init2rtr for future use */ 299*9e39c5baSBill Taylor uint_t qp_save_mtu; 300*9e39c5baSBill Taylor hermon_qpn_entry_t *qp_qpn_hdl; 301*9e39c5baSBill Taylor 302*9e39c5baSBill Taylor struct hermon_qalloc_info_s qp_wqinfo; 303*9e39c5baSBill Taylor 304*9e39c5baSBill Taylor struct hermon_hw_qpc_s qpc; 305*9e39c5baSBill Taylor }; 306*9e39c5baSBill Taylor _NOTE(READ_ONLY_DATA(hermon_sw_qp_s::qp_qpnum 307*9e39c5baSBill Taylor hermon_sw_qp_s::qp_sq_buf 308*9e39c5baSBill Taylor hermon_sw_qp_s::qp_sq_log_wqesz 309*9e39c5baSBill Taylor hermon_sw_qp_s::qp_sq_bufsz 310*9e39c5baSBill Taylor hermon_sw_qp_s::qp_sq_sgl 311*9e39c5baSBill Taylor hermon_sw_qp_s::qp_rq_buf 312*9e39c5baSBill Taylor hermon_sw_qp_s::qp_rq_log_wqesz 313*9e39c5baSBill Taylor hermon_sw_qp_s::qp_rq_bufsz 314*9e39c5baSBill Taylor hermon_sw_qp_s::qp_rq_sgl 315*9e39c5baSBill Taylor hermon_sw_qp_s::qp_desc_off 316*9e39c5baSBill Taylor hermon_sw_qp_s::qp_mrhdl 317*9e39c5baSBill Taylor hermon_sw_qp_s::qp_wqinfo 318*9e39c5baSBill Taylor hermon_sw_qp_s::qp_qpcrsrcp 319*9e39c5baSBill Taylor hermon_sw_qp_s::qp_rsrcp 320*9e39c5baSBill Taylor hermon_sw_qp_s::qp_hdlrarg 321*9e39c5baSBill Taylor hermon_sw_qp_s::qp_pdhdl 322*9e39c5baSBill Taylor hermon_sw_qp_s::qp_sq_cqhdl 323*9e39c5baSBill Taylor hermon_sw_qp_s::qp_rq_cqhdl 324*9e39c5baSBill Taylor hermon_sw_qp_s::qp_sq_sigtype 325*9e39c5baSBill Taylor hermon_sw_qp_s::qp_serv_type 326*9e39c5baSBill Taylor hermon_sw_qp_s::qp_is_special 327*9e39c5baSBill Taylor hermon_sw_qp_s::qp_is_umap 328*9e39c5baSBill Taylor hermon_sw_qp_s::qp_uarpg 329*9e39c5baSBill Taylor hermon_sw_qp_s::qp_sq_wqhdr 330*9e39c5baSBill Taylor hermon_sw_qp_s::qp_rq_wqhdr 331*9e39c5baSBill Taylor hermon_sw_qp_s::qp_qpn_hdl)) 332*9e39c5baSBill Taylor _NOTE(MUTEX_PROTECTS_DATA(hermon_sw_qp_s::qp_lock, 333*9e39c5baSBill Taylor hermon_sw_qp_s::qp_state 334*9e39c5baSBill Taylor hermon_sw_qp_s::qpc 335*9e39c5baSBill Taylor hermon_sw_qp_s::qp_forward_sqd_event 336*9e39c5baSBill Taylor hermon_sw_qp_s::qp_sqd_still_draining 337*9e39c5baSBill Taylor hermon_sw_qp_s::qp_mcg_refcnt 338*9e39c5baSBill Taylor hermon_sw_qp_s::qp_save_mtu 339*9e39c5baSBill Taylor hermon_sw_qp_s::qp_umap_dhp)) 340*9e39c5baSBill Taylor _NOTE(SCHEME_PROTECTS_DATA("safe sharing", 341*9e39c5baSBill Taylor hermon_sw_qp_s::qp_pkeyindx 342*9e39c5baSBill Taylor hermon_sw_qp_s::qp_portnum)) 343*9e39c5baSBill Taylor 344*9e39c5baSBill Taylor 345*9e39c5baSBill Taylor /* Defined in hermon_qp.c */ 346*9e39c5baSBill Taylor int hermon_qp_alloc(hermon_state_t *state, hermon_qp_info_t *qpinfo, 347*9e39c5baSBill Taylor uint_t sleepflag); 348*9e39c5baSBill Taylor int hermon_special_qp_alloc(hermon_state_t *state, hermon_qp_info_t *qpinfo, 349*9e39c5baSBill Taylor uint_t sleepflag); 350*9e39c5baSBill Taylor int hermon_qp_free(hermon_state_t *state, hermon_qphdl_t *qphdl, 351*9e39c5baSBill Taylor ibc_free_qp_flags_t free_qp_flags, ibc_qpn_hdl_t *qpnh, uint_t sleepflag); 352*9e39c5baSBill Taylor int hermon_qp_query(hermon_state_t *state, hermon_qphdl_t qphdl, 353*9e39c5baSBill Taylor ibt_qp_query_attr_t *attr_p); 354*9e39c5baSBill Taylor hermon_qphdl_t hermon_qphdl_from_qpnum(hermon_state_t *state, uint_t qpnum); 355*9e39c5baSBill Taylor void hermon_qp_release_qpn(hermon_state_t *state, hermon_qpn_entry_t *entry, 356*9e39c5baSBill Taylor int flags); 357*9e39c5baSBill Taylor void hermon_qpn_avl_init(hermon_state_t *state); 358*9e39c5baSBill Taylor void hermon_qpn_avl_fini(hermon_state_t *state); 359*9e39c5baSBill Taylor 360*9e39c5baSBill Taylor /* Defined in hermon_qpmod.c */ 361*9e39c5baSBill Taylor int hermon_qp_modify(hermon_state_t *state, hermon_qphdl_t qp, 362*9e39c5baSBill Taylor ibt_cep_modify_flags_t flags, ibt_qp_info_t *info_p, 363*9e39c5baSBill Taylor ibt_queue_sizes_t *actual_sz); 364*9e39c5baSBill Taylor int hermon_qp_to_reset(hermon_state_t *state, hermon_qphdl_t qp); 365*9e39c5baSBill Taylor 366*9e39c5baSBill Taylor #ifdef __cplusplus 367*9e39c5baSBill Taylor } 368*9e39c5baSBill Taylor #endif 369*9e39c5baSBill Taylor 370*9e39c5baSBill Taylor #endif /* _SYS_IB_ADAPTERS_HERMON_QP_H */ 371