1*0Sstevel@tonic-gate /* 2*0Sstevel@tonic-gate * CDDL HEADER START 3*0Sstevel@tonic-gate * 4*0Sstevel@tonic-gate * The contents of this file are subject to the terms of the 5*0Sstevel@tonic-gate * Common Development and Distribution License, Version 1.0 only 6*0Sstevel@tonic-gate * (the "License"). You may not use this file except in compliance 7*0Sstevel@tonic-gate * with the License. 8*0Sstevel@tonic-gate * 9*0Sstevel@tonic-gate * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 10*0Sstevel@tonic-gate * or http://www.opensolaris.org/os/licensing. 11*0Sstevel@tonic-gate * See the License for the specific language governing permissions 12*0Sstevel@tonic-gate * and limitations under the License. 13*0Sstevel@tonic-gate * 14*0Sstevel@tonic-gate * When distributing Covered Code, include this CDDL HEADER in each 15*0Sstevel@tonic-gate * file and include the License file at usr/src/OPENSOLARIS.LICENSE. 16*0Sstevel@tonic-gate * If applicable, add the following below this CDDL HEADER, with the 17*0Sstevel@tonic-gate * fields enclosed by brackets "[]" replaced with your own identifying 18*0Sstevel@tonic-gate * information: Portions Copyright [yyyy] [name of copyright owner] 19*0Sstevel@tonic-gate * 20*0Sstevel@tonic-gate * CDDL HEADER END 21*0Sstevel@tonic-gate */ 22*0Sstevel@tonic-gate /* 23*0Sstevel@tonic-gate * Copyright 2004 Sun Microsystems, Inc. All rights reserved. 24*0Sstevel@tonic-gate * Use is subject to license terms. 25*0Sstevel@tonic-gate */ 26*0Sstevel@tonic-gate 27*0Sstevel@tonic-gate #ifndef _SYS_IB_IBTL_IBTI_H 28*0Sstevel@tonic-gate #define _SYS_IB_IBTL_IBTI_H 29*0Sstevel@tonic-gate 30*0Sstevel@tonic-gate #pragma ident "%Z%%M% %I% %E% SMI" 31*0Sstevel@tonic-gate 32*0Sstevel@tonic-gate /* 33*0Sstevel@tonic-gate * ibti.h 34*0Sstevel@tonic-gate * 35*0Sstevel@tonic-gate * This file contains the IBTI prototypes and associated data structures. 36*0Sstevel@tonic-gate * It is the only header file that should be included by IBTI clients. 37*0Sstevel@tonic-gate */ 38*0Sstevel@tonic-gate #include <sys/ib/ibtl/ibti_common.h> 39*0Sstevel@tonic-gate 40*0Sstevel@tonic-gate #ifdef __cplusplus 41*0Sstevel@tonic-gate extern "C" { 42*0Sstevel@tonic-gate #endif 43*0Sstevel@tonic-gate 44*0Sstevel@tonic-gate /* 45*0Sstevel@tonic-gate * Allocate channel flags. 46*0Sstevel@tonic-gate */ 47*0Sstevel@tonic-gate typedef enum ibt_chan_alloc_flags_e { 48*0Sstevel@tonic-gate IBT_ACHAN_NO_FLAGS = 0, 49*0Sstevel@tonic-gate IBT_ACHAN_CLONE = (1 << 0), 50*0Sstevel@tonic-gate IBT_ACHAN_USER_MAP = (1 << 1), 51*0Sstevel@tonic-gate IBT_ACHAN_DEFER_ALLOC = (1 << 2), 52*0Sstevel@tonic-gate IBT_ACHAN_USES_SRQ = (1 << 3) 53*0Sstevel@tonic-gate } ibt_chan_alloc_flags_t; 54*0Sstevel@tonic-gate 55*0Sstevel@tonic-gate 56*0Sstevel@tonic-gate /* 57*0Sstevel@tonic-gate * Allocate RC channel ibt_alloc_rc_channel() argument. 58*0Sstevel@tonic-gate */ 59*0Sstevel@tonic-gate typedef struct ibt_rc_chan_alloc_args_s { 60*0Sstevel@tonic-gate ibt_attr_flags_t rc_flags; /* Signal type etc */ 61*0Sstevel@tonic-gate ibt_cep_flags_t rc_control; 62*0Sstevel@tonic-gate uint8_t rc_hca_port_num; 63*0Sstevel@tonic-gate ibt_chan_sizes_t rc_sizes; 64*0Sstevel@tonic-gate ibt_cq_hdl_t rc_scq; /* Send CQ */ 65*0Sstevel@tonic-gate ibt_cq_hdl_t rc_rcq; /* Recv CQ */ 66*0Sstevel@tonic-gate ibt_pd_hdl_t rc_pd; /* PD */ 67*0Sstevel@tonic-gate ibt_channel_hdl_t rc_clone_chan; /* Optional Clone handle */ 68*0Sstevel@tonic-gate ibt_srq_hdl_t rc_srq; /* Optional Shared Rcv Queue */ 69*0Sstevel@tonic-gate } ibt_rc_chan_alloc_args_t; 70*0Sstevel@tonic-gate 71*0Sstevel@tonic-gate /* 72*0Sstevel@tonic-gate * RC channel query attributes structure. 73*0Sstevel@tonic-gate */ 74*0Sstevel@tonic-gate typedef struct ibt_rc_chan_query_attr_s { 75*0Sstevel@tonic-gate ib_guid_t rc_hca_guid; /* Local HCA GUID */ 76*0Sstevel@tonic-gate ibt_cq_hdl_t rc_scq; /* SendCQ handle */ 77*0Sstevel@tonic-gate ibt_cq_hdl_t rc_rcq; /* RecvCQ handle */ 78*0Sstevel@tonic-gate ibt_pd_hdl_t rc_pd; /* PD Handle. */ 79*0Sstevel@tonic-gate ibt_cep_state_t rc_state; /* Channel state */ 80*0Sstevel@tonic-gate ib_mtu_t rc_path_mtu; 81*0Sstevel@tonic-gate uint8_t rc_path_retry_cnt:3; 82*0Sstevel@tonic-gate ibt_rnr_retry_cnt_t rc_path_rnr_retry_cnt; 83*0Sstevel@tonic-gate ibt_rnr_nak_time_t rc_min_rnr_nak; /* min RNR-NAK timer */ 84*0Sstevel@tonic-gate ibt_cep_path_t rc_prim_path; 85*0Sstevel@tonic-gate ibt_cep_path_t rc_alt_path; 86*0Sstevel@tonic-gate ibt_chan_sizes_t rc_chan_sizes; /* Queue/SGL sizes */ 87*0Sstevel@tonic-gate uint8_t rc_rdma_ra_out; /* max RDMA-Reads/Atomics out */ 88*0Sstevel@tonic-gate uint8_t rc_rdma_ra_in; /* max RDMA-Reads/Atomics in */ 89*0Sstevel@tonic-gate ibt_attr_flags_t rc_flags; /* SQ Signaling Type etc */ 90*0Sstevel@tonic-gate ibt_cep_flags_t rc_control; /* Control Flags */ 91*0Sstevel@tonic-gate ibt_cep_cmstate_t rc_mig_state; 92*0Sstevel@tonic-gate ib_qpn_t rc_qpn; /* Local QPN */ 93*0Sstevel@tonic-gate ib_qpn_t rc_dst_qpn; /* Destination QPN */ 94*0Sstevel@tonic-gate ibt_srq_hdl_t rc_srq; /* Optional Shared Rcv Queue */ 95*0Sstevel@tonic-gate } ibt_rc_chan_query_attr_t; 96*0Sstevel@tonic-gate 97*0Sstevel@tonic-gate /* 98*0Sstevel@tonic-gate * RC Channel Modify Attributes definition. 99*0Sstevel@tonic-gate * 100*0Sstevel@tonic-gate * It is only possible to modify a channel that has previously been 101*0Sstevel@tonic-gate * opened. The channel must either be in operational state (IBT_STATE_RTS) 102*0Sstevel@tonic-gate * or paused (IBT_STATE_SQD). If channel is in paused state, then a modify 103*0Sstevel@tonic-gate * operation will unpause the channel. 104*0Sstevel@tonic-gate * 105*0Sstevel@tonic-gate * Attributes that can be modified on an operational channel are: 106*0Sstevel@tonic-gate * 107*0Sstevel@tonic-gate * rc_sq_sz 108*0Sstevel@tonic-gate * rc_rq_sz 109*0Sstevel@tonic-gate * rc_alt_adds_vect/rc_alt_port_num 110*0Sstevel@tonic-gate * rc_control 111*0Sstevel@tonic-gate * rc_min_rnr_nak 112*0Sstevel@tonic-gate * 113*0Sstevel@tonic-gate * Attributes that can be modified on an paused channel are: 114*0Sstevel@tonic-gate * 115*0Sstevel@tonic-gate * rc_control 116*0Sstevel@tonic-gate * rc_sq_sz 117*0Sstevel@tonic-gate * rc_rq_sz 118*0Sstevel@tonic-gate * rc_prim_adds_vect 119*0Sstevel@tonic-gate * rc_prim_port_num 120*0Sstevel@tonic-gate * rc_alt_adds_vect/rc_alt_port_num 121*0Sstevel@tonic-gate * rc_path_retry_cnt 122*0Sstevel@tonic-gate * rc_path_rnr_retry_cnt 123*0Sstevel@tonic-gate * rc_min_rnr_nak 124*0Sstevel@tonic-gate * rc_rdma_ra_out 125*0Sstevel@tonic-gate * rc_rdma_ra_in 126*0Sstevel@tonic-gate * 127*0Sstevel@tonic-gate * An Attempt to Modify these attributes for an un-paused channel will result 128*0Sstevel@tonic-gate * in an error. 129*0Sstevel@tonic-gate * 130*0Sstevel@tonic-gate * See the ibt_modify_rc_channel() for details of the required corresponding 131*0Sstevel@tonic-gate * modify flags. 132*0Sstevel@tonic-gate * Not specified attributes should be set to "NULL" or "0". 133*0Sstevel@tonic-gate */ 134*0Sstevel@tonic-gate typedef struct ibt_rc_chan_modify_attr_s { 135*0Sstevel@tonic-gate ibt_cep_flags_t rc_control; /* Channel Control Flags */ 136*0Sstevel@tonic-gate uint_t rc_sq_sz; /* Set SQ Max outstanding WRs */ 137*0Sstevel@tonic-gate uint_t rc_rq_sz; /* Set RQ Max outstanding WRs */ 138*0Sstevel@tonic-gate 139*0Sstevel@tonic-gate ibt_adds_vect_t rc_prim_adds_vect; /* Primary Path Address */ 140*0Sstevel@tonic-gate ibt_adds_vect_t rc_alt_adds_vect; /* Alternate Path Address */ 141*0Sstevel@tonic-gate uint8_t rc_path_retry_cnt:3; 142*0Sstevel@tonic-gate ibt_rnr_retry_cnt_t rc_path_rnr_retry_cnt; 143*0Sstevel@tonic-gate ibt_rnr_nak_time_t rc_min_rnr_nak; /* min RNR-NAK timer */ 144*0Sstevel@tonic-gate uint8_t rc_prim_port_num; /* Port of Primary Path */ 145*0Sstevel@tonic-gate uint8_t rc_alt_port_num; /* Port of Alternate Path */ 146*0Sstevel@tonic-gate uint8_t rc_rdma_ra_out; /* Initiator Depth, Number of */ 147*0Sstevel@tonic-gate /* RDMA RD's & Atomics */ 148*0Sstevel@tonic-gate /* outstanding. */ 149*0Sstevel@tonic-gate uint8_t rc_rdma_ra_in; /* Responder resources for */ 150*0Sstevel@tonic-gate /* handling incoming RDMA rds */ 151*0Sstevel@tonic-gate /* and Atomics. */ 152*0Sstevel@tonic-gate } ibt_rc_chan_modify_attr_t; 153*0Sstevel@tonic-gate 154*0Sstevel@tonic-gate /* 155*0Sstevel@tonic-gate * UD remote destination query attributes 156*0Sstevel@tonic-gate */ 157*0Sstevel@tonic-gate typedef struct ibt_ud_dest_query_attr_s { 158*0Sstevel@tonic-gate ibt_hca_hdl_t ud_hca_hdl; /* Local HCA Handle */ 159*0Sstevel@tonic-gate ib_qpn_t ud_dst_qpn; /* Destination QPN */ 160*0Sstevel@tonic-gate ib_qkey_t ud_qkey; /* Q_Key */ 161*0Sstevel@tonic-gate ibt_adds_vect_t ud_addr_vect; /* Address Information */ 162*0Sstevel@tonic-gate ibt_pd_hdl_t ud_pd; 163*0Sstevel@tonic-gate } ibt_ud_dest_query_attr_t; 164*0Sstevel@tonic-gate 165*0Sstevel@tonic-gate 166*0Sstevel@tonic-gate /* 167*0Sstevel@tonic-gate * Allocate UD channel ibt_alloc_ud_channel() arguments; see below at 168*0Sstevel@tonic-gate * ibt_alloc_ud_channel() for a description of what's required and optional. 169*0Sstevel@tonic-gate */ 170*0Sstevel@tonic-gate typedef struct ibt_ud_chan_alloc_args_s { 171*0Sstevel@tonic-gate ibt_attr_flags_t ud_flags; /* Sig type etc */ 172*0Sstevel@tonic-gate uint8_t ud_hca_port_num; 173*0Sstevel@tonic-gate uint16_t ud_pkey_ix; /* P_Key Index */ 174*0Sstevel@tonic-gate ibt_chan_sizes_t ud_sizes; 175*0Sstevel@tonic-gate ib_qkey_t ud_qkey; /* Q_Key */ 176*0Sstevel@tonic-gate ibt_cq_hdl_t ud_scq; /* Send CQ */ 177*0Sstevel@tonic-gate ibt_cq_hdl_t ud_rcq; /* Recv CQ */ 178*0Sstevel@tonic-gate ibt_pd_hdl_t ud_pd; /* PD */ 179*0Sstevel@tonic-gate ibt_channel_hdl_t ud_clone_chan; /* Optional clone handle */ 180*0Sstevel@tonic-gate ibt_srq_hdl_t ud_srq; /* Optional Shared Rcv Queue */ 181*0Sstevel@tonic-gate } ibt_ud_chan_alloc_args_t; 182*0Sstevel@tonic-gate 183*0Sstevel@tonic-gate /* 184*0Sstevel@tonic-gate * UD channel query attributes. 185*0Sstevel@tonic-gate */ 186*0Sstevel@tonic-gate typedef struct ibt_ud_chan_query_attr_s { 187*0Sstevel@tonic-gate ib_qpn_t ud_qpn; /* QPN */ 188*0Sstevel@tonic-gate ib_guid_t ud_hca_guid; /* Local HCA GUID */ 189*0Sstevel@tonic-gate ibt_cq_hdl_t ud_scq; /* SendCQ handle. */ 190*0Sstevel@tonic-gate ibt_cq_hdl_t ud_rcq; /* RecvCQ handle. */ 191*0Sstevel@tonic-gate ibt_pd_hdl_t ud_pd; /* PD Handle. */ 192*0Sstevel@tonic-gate uint8_t ud_hca_port_num; /* Local HCA port */ 193*0Sstevel@tonic-gate ibt_cep_state_t ud_state; /* Channel state */ 194*0Sstevel@tonic-gate uint16_t ud_pkey_ix; /* P_Key Index */ 195*0Sstevel@tonic-gate ib_qkey_t ud_qkey; /* Q_Key */ 196*0Sstevel@tonic-gate ibt_chan_sizes_t ud_chan_sizes; /* Queue/SGL sizes */ 197*0Sstevel@tonic-gate ibt_attr_flags_t ud_flags; /* Signaling Type etc */ 198*0Sstevel@tonic-gate ibt_srq_hdl_t ud_srq; /* Optional Shared Rcv Queue */ 199*0Sstevel@tonic-gate } ibt_ud_chan_query_attr_t; 200*0Sstevel@tonic-gate 201*0Sstevel@tonic-gate /* 202*0Sstevel@tonic-gate * UD Channel Modify Attributes definition. 203*0Sstevel@tonic-gate * 204*0Sstevel@tonic-gate * It is only possible to modify a channel that is either in the operational 205*0Sstevel@tonic-gate * state (IBT_STATE_RTS) or paused (IBT_STATE_SQD). If channel is in paused 206*0Sstevel@tonic-gate * state, then a modify operation will unpause the channel. 207*0Sstevel@tonic-gate * 208*0Sstevel@tonic-gate * See the ibt_modify_ud_channel() for details of the required corresponding 209*0Sstevel@tonic-gate * modify flags. 210*0Sstevel@tonic-gate */ 211*0Sstevel@tonic-gate typedef struct ibt_ud_chan_modify_attr_s { 212*0Sstevel@tonic-gate uint_t ud_sq_sz; /* Set SQ Max outstanding WRs */ 213*0Sstevel@tonic-gate uint_t ud_rq_sz; /* Set RQ Max outstanding WRs */ 214*0Sstevel@tonic-gate ib_qkey_t ud_qkey; /* Set Q_Key */ 215*0Sstevel@tonic-gate } ibt_ud_chan_modify_attr_t; 216*0Sstevel@tonic-gate 217*0Sstevel@tonic-gate 218*0Sstevel@tonic-gate /* 219*0Sstevel@tonic-gate * FUNCTION PROTOTYPES 220*0Sstevel@tonic-gate */ 221*0Sstevel@tonic-gate 222*0Sstevel@tonic-gate /* 223*0Sstevel@tonic-gate * CONNECTION ESTABLISHMENT/TEAR DOWN FUNCTIONS. 224*0Sstevel@tonic-gate */ 225*0Sstevel@tonic-gate 226*0Sstevel@tonic-gate /* 227*0Sstevel@tonic-gate * ibt_alloc_rc_channel 228*0Sstevel@tonic-gate * Allocates a RC communication channels that satisfy the specified 229*0Sstevel@tonic-gate * channel attributes. 230*0Sstevel@tonic-gate * 231*0Sstevel@tonic-gate * hca_hdl Specifies the channels HCA. 232*0Sstevel@tonic-gate * 233*0Sstevel@tonic-gate * flags Channel Allocate flags. 234*0Sstevel@tonic-gate * 235*0Sstevel@tonic-gate * IBT_ACHAN_NO_FLAGS 236*0Sstevel@tonic-gate * IBT_ACHAN_CLONE Allocate a channel based on the 237*0Sstevel@tonic-gate * attributes of a previously 238*0Sstevel@tonic-gate * allocated channel. Both channels 239*0Sstevel@tonic-gate * have the same local attributes. 240*0Sstevel@tonic-gate * 241*0Sstevel@tonic-gate * args A pointer to an ibt_rc_chan_alloc_args_t struct 242*0Sstevel@tonic-gate * that specifies required channel attributes. Not 243*0Sstevel@tonic-gate * specified attributes should be set to "NULL" or "0". 244*0Sstevel@tonic-gate * 245*0Sstevel@tonic-gate * rc_chan_p The returned RC Channel handle. 246*0Sstevel@tonic-gate * 247*0Sstevel@tonic-gate * sizes NULL or a pointer to ibt_chan_sizes_s struct where 248*0Sstevel@tonic-gate * new SendQ/RecvQ, and WR SGL sizes are returned. 249*0Sstevel@tonic-gate * 250*0Sstevel@tonic-gate * 251*0Sstevel@tonic-gate * Required and optional attributes are: 252*0Sstevel@tonic-gate * 253*0Sstevel@tonic-gate * Required: 254*0Sstevel@tonic-gate * rc_flags SQ Signaling Type etc 255*0Sstevel@tonic-gate * rc_control Control Flags 256*0Sstevel@tonic-gate * rc_hca_port_num Local HCA port 257*0Sstevel@tonic-gate * rc_scq Send CQ 258*0Sstevel@tonic-gate * rc_rcq Recv CQ 259*0Sstevel@tonic-gate * rc_pd PD 260*0Sstevel@tonic-gate * rc_sizes Queue and SGL sizes. 261*0Sstevel@tonic-gate * 262*0Sstevel@tonic-gate * Optional (0 or NULL if not specified): 263*0Sstevel@tonic-gate * rc_clone_chan Clone channel handle 264*0Sstevel@tonic-gate * 265*0Sstevel@tonic-gate * 266*0Sstevel@tonic-gate * If IBT_ACHAN_CLONE is selected then the Required/Optional attributes are: 267*0Sstevel@tonic-gate * 268*0Sstevel@tonic-gate * Required: 269*0Sstevel@tonic-gate * rc_clone_chan Clone channel handle 270*0Sstevel@tonic-gate * Optional: 271*0Sstevel@tonic-gate * NONE 272*0Sstevel@tonic-gate */ 273*0Sstevel@tonic-gate ibt_status_t ibt_alloc_rc_channel(ibt_hca_hdl_t hca_hdl, 274*0Sstevel@tonic-gate ibt_chan_alloc_flags_t flags, ibt_rc_chan_alloc_args_t *args, 275*0Sstevel@tonic-gate ibt_channel_hdl_t *rc_chan_p, ibt_chan_sizes_t *sizes); 276*0Sstevel@tonic-gate 277*0Sstevel@tonic-gate /* 278*0Sstevel@tonic-gate * ibt_flush_channel 279*0Sstevel@tonic-gate * Flush the specified channel. Outstanding work requests are flushed 280*0Sstevel@tonic-gate * so that the client can do the associated clean up. After that, the 281*0Sstevel@tonic-gate * client will usually deregister the previously registered memory, 282*0Sstevel@tonic-gate * then free the channel by calling ibt_free_channel(). RC channels 283*0Sstevel@tonic-gate * that have been successfully opened will fail this call, as they 284*0Sstevel@tonic-gate * need to instead be handled by ibt_close_rc_channel(). 285*0Sstevel@tonic-gate * 286*0Sstevel@tonic-gate * chan The opaque channel handle. 287*0Sstevel@tonic-gate */ 288*0Sstevel@tonic-gate ibt_status_t ibt_flush_channel(ibt_channel_hdl_t chan); 289*0Sstevel@tonic-gate 290*0Sstevel@tonic-gate /* 291*0Sstevel@tonic-gate * ibt_free_channel 292*0Sstevel@tonic-gate * Releases the resources associated with the specified channel 293*0Sstevel@tonic-gate * 294*0Sstevel@tonic-gate * chan The opaque channel handle returned in a previous 295*0Sstevel@tonic-gate * call to ibt_alloc_{rc,ud}_channel(). 296*0Sstevel@tonic-gate */ 297*0Sstevel@tonic-gate ibt_status_t ibt_free_channel(ibt_channel_hdl_t chan); 298*0Sstevel@tonic-gate 299*0Sstevel@tonic-gate /* 300*0Sstevel@tonic-gate * ibt_query_rc_channel 301*0Sstevel@tonic-gate * Query an RC channel's attributes. Should only be called on an 302*0Sstevel@tonic-gate * opened RC channel. If called on a channel before it is opened, 303*0Sstevel@tonic-gate * some channel attributes may change when the channel is opened. 304*0Sstevel@tonic-gate * 305*0Sstevel@tonic-gate * rc_chan A previously allocated channel handle. 306*0Sstevel@tonic-gate * 307*0Sstevel@tonic-gate * chan_attrs A pointer to ibt_rc_chan_query_attr_t struct, where 308*0Sstevel@tonic-gate * RC channel's current attributes are returned. 309*0Sstevel@tonic-gate */ 310*0Sstevel@tonic-gate ibt_status_t ibt_query_rc_channel(ibt_channel_hdl_t rc_chan, 311*0Sstevel@tonic-gate ibt_rc_chan_query_attr_t *chan_attrs); 312*0Sstevel@tonic-gate 313*0Sstevel@tonic-gate /* 314*0Sstevel@tonic-gate * ibt_modify_rc_channel() 315*0Sstevel@tonic-gate * Modifies a previous opened operational or paused RC channel's 316*0Sstevel@tonic-gate * attributes. 317*0Sstevel@tonic-gate * 318*0Sstevel@tonic-gate * rc_chan A previously allocated RC channel handle. 319*0Sstevel@tonic-gate * 320*0Sstevel@tonic-gate * flags Specifies which attributes in ibt_rc_chan_modify_attr_t 321*0Sstevel@tonic-gate * are to be modified. 322*0Sstevel@tonic-gate * 323*0Sstevel@tonic-gate * attrs Attributes to be modified. 324*0Sstevel@tonic-gate * 325*0Sstevel@tonic-gate * actual_sz NULL or a pointer to ibt_queue_size_s struct to 326*0Sstevel@tonic-gate * return new queue sizes. 327*0Sstevel@tonic-gate * sq_sz Returned new SendQ size. 328*0Sstevel@tonic-gate * rq_sz Returned new RecvQ size. 329*0Sstevel@tonic-gate * 330*0Sstevel@tonic-gate * NOTE: 331*0Sstevel@tonic-gate * It is only possible to modify a channel that has previously been opened. 332*0Sstevel@tonic-gate * The channel must either be in operational state (IBT_STATE_RTS) or 333*0Sstevel@tonic-gate * paused (IBT_STATE_SQD). If channel is in paused state, then a modify 334*0Sstevel@tonic-gate * operation will will unpause the channel. 335*0Sstevel@tonic-gate * 336*0Sstevel@tonic-gate * 337*0Sstevel@tonic-gate * Paused Channel: 338*0Sstevel@tonic-gate * -------------- 339*0Sstevel@tonic-gate * If the channel is in a paused state (IBT_STATE_SQD) then the 340*0Sstevel@tonic-gate * ibt_rc_chan_modify_attr_t attributes that can be modified and the 341*0Sstevel@tonic-gate * corresponding ibt_cep_modify_flags_t flags are: 342*0Sstevel@tonic-gate * 343*0Sstevel@tonic-gate * Attribute flag Comment 344*0Sstevel@tonic-gate * --------- ---- ------- 345*0Sstevel@tonic-gate * rc_alt_adds_vect IBT_CEP_SET_ALT_PATH Modify alternate Path 346*0Sstevel@tonic-gate * address vector and 347*0Sstevel@tonic-gate * HCA port number. 348*0Sstevel@tonic-gate * 349*0Sstevel@tonic-gate * rc_prim_adds_vect IBT_CEP_SET_ADDS_VECT Modify Primary Path 350*0Sstevel@tonic-gate * Address Vector. 351*0Sstevel@tonic-gate * rc_prim_adds_vect IBT_CEP_SET_PORT Modify Primary Port. 352*0Sstevel@tonic-gate * (The cep_adds_vect 353*0Sstevel@tonic-gate * av_port_num of 354*0Sstevel@tonic-gate * ibt_cep_path_t). 355*0Sstevel@tonic-gate * rc_sq_sz IBT_CEP_SET_SQ_SIZE 356*0Sstevel@tonic-gate * rc_rq_sz IBT_CEP_SET_RQ_SIZE 357*0Sstevel@tonic-gate * rc_path_retry_cnt IBT_CEP_SET_RETRY 358*0Sstevel@tonic-gate * rc_path_rnr_retry_cnt IBT_CEP_SET_RNR_NAK_RETRY 359*0Sstevel@tonic-gate * rc_rdma_ra_out IBT_CEP_SET_RDMARA_OUT 360*0Sstevel@tonic-gate * rc_rdma_ra_in IBT_CEP_SET_RDMARA_IN 361*0Sstevel@tonic-gate * 362*0Sstevel@tonic-gate * Operational Channel: 363*0Sstevel@tonic-gate * ------------------- 364*0Sstevel@tonic-gate * If the channel is in a operational state (IBT_STATE_RTS) then the 365*0Sstevel@tonic-gate * ibt_rc_chan_modify_attr_t attributes that can be modified and the 366*0Sstevel@tonic-gate * corresponding ibt_cep_modify_flags_t flags are: 367*0Sstevel@tonic-gate * 368*0Sstevel@tonic-gate * Attribute flag Comment 369*0Sstevel@tonic-gate * --------- ---- ------- 370*0Sstevel@tonic-gate * rc_alt_adds_vect IBT_CEP_SET_ALT_PATH Modify alternate Path 371*0Sstevel@tonic-gate * address vector and 372*0Sstevel@tonic-gate * HCA port number. 373*0Sstevel@tonic-gate * rc_sq_sz IBT_CEP_SET_SQ_SIZE 374*0Sstevel@tonic-gate * rc_rq_sz IBT_CEP_SET_RQ_SIZE 375*0Sstevel@tonic-gate * 376*0Sstevel@tonic-gate * rc_control IBT_CEP_SET_RDMA_R Modify RDMA reads as 377*0Sstevel@tonic-gate * indicated by the 378*0Sstevel@tonic-gate * rc_control flags. 379*0Sstevel@tonic-gate * IBT_CEP_RDMA_RD = 0 380*0Sstevel@tonic-gate * Disable RDMA reads. 381*0Sstevel@tonic-gate * IBT_CEP_RDMA_RD = 1 382*0Sstevel@tonic-gate * Enable RDMA reads. 383*0Sstevel@tonic-gate * rc_control IBT_CEP_SET_RDMA_W Modify RDMA writes as 384*0Sstevel@tonic-gate * indicated by the 385*0Sstevel@tonic-gate * rc_control flags. 386*0Sstevel@tonic-gate * IBT_CEP_RDMA_WR = 0 387*0Sstevel@tonic-gate * Disable RDMA writes. 388*0Sstevel@tonic-gate * IBT_CEP_RDMA_WR = 1 389*0Sstevel@tonic-gate * Enable RDMA writes. 390*0Sstevel@tonic-gate */ 391*0Sstevel@tonic-gate ibt_status_t ibt_modify_rc_channel(ibt_channel_hdl_t rc_chan, 392*0Sstevel@tonic-gate ibt_cep_modify_flags_t flags, ibt_rc_chan_modify_attr_t *attrs, 393*0Sstevel@tonic-gate ibt_queue_sizes_t *actual_sz); 394*0Sstevel@tonic-gate 395*0Sstevel@tonic-gate /* 396*0Sstevel@tonic-gate * ibt_alloc_ud_channel 397*0Sstevel@tonic-gate * Allocate UD channels that satisfy the specified channel attributes. 398*0Sstevel@tonic-gate * 399*0Sstevel@tonic-gate * hca_hdl The handle of a HCA on which to allocate the channel. 400*0Sstevel@tonic-gate * 401*0Sstevel@tonic-gate * flags Channel Allocate flags. 402*0Sstevel@tonic-gate * 403*0Sstevel@tonic-gate * IBT_ACHAN_NO_FLAGS 404*0Sstevel@tonic-gate * IBT_ACHAN_CLONE Allocate a channel based on the 405*0Sstevel@tonic-gate * attributes of a previously 406*0Sstevel@tonic-gate * allocated channel. Both channels 407*0Sstevel@tonic-gate * have the same local attributes. 408*0Sstevel@tonic-gate * 409*0Sstevel@tonic-gate * args A pointer to an ibt_ud_chan_alloc_args_t struct that 410*0Sstevel@tonic-gate * specifies required channel attributes. Optional 411*0Sstevel@tonic-gate * attributes that are not specified should be set to 412*0Sstevel@tonic-gate * "NULL" or "0". 413*0Sstevel@tonic-gate * 414*0Sstevel@tonic-gate * ud_chan_p The returned UD Channel handle. 415*0Sstevel@tonic-gate * 416*0Sstevel@tonic-gate * sizes NULL or a pointer to ibt_chan_sizes_s struct where 417*0Sstevel@tonic-gate * new SendQ/RecvQ, and WR SGL sizes are returned. 418*0Sstevel@tonic-gate * 419*0Sstevel@tonic-gate * Required: 420*0Sstevel@tonic-gate * ud_flags SQ Signaling Type etc 421*0Sstevel@tonic-gate * ud_hca_port_num Local HCA port 422*0Sstevel@tonic-gate * ud_scq Send CQ 423*0Sstevel@tonic-gate * ud_rcq Recv CQ 424*0Sstevel@tonic-gate * ud_pd PD 425*0Sstevel@tonic-gate * ud_qkey Queue Key 426*0Sstevel@tonic-gate * ud_sizes Queue and SGL sizes. 427*0Sstevel@tonic-gate * 428*0Sstevel@tonic-gate * Optional (0 or NULL if not specified): 429*0Sstevel@tonic-gate * ud_clone_chan Clone channel handle 430*0Sstevel@tonic-gate * 431*0Sstevel@tonic-gate * If IBT_ACHAN_CLONE is selected then the Required/Optional attributes are: 432*0Sstevel@tonic-gate * 433*0Sstevel@tonic-gate * Required: 434*0Sstevel@tonic-gate * ud_clone_chan Clone channel handle 435*0Sstevel@tonic-gate * 436*0Sstevel@tonic-gate * Optional: 437*0Sstevel@tonic-gate * NONE 438*0Sstevel@tonic-gate */ 439*0Sstevel@tonic-gate ibt_status_t ibt_alloc_ud_channel(ibt_hca_hdl_t hca_hdl, 440*0Sstevel@tonic-gate ibt_chan_alloc_flags_t flags, ibt_ud_chan_alloc_args_t *args, 441*0Sstevel@tonic-gate ibt_channel_hdl_t *ud_chan_p, ibt_chan_sizes_t *sizes); 442*0Sstevel@tonic-gate 443*0Sstevel@tonic-gate /* 444*0Sstevel@tonic-gate * ibt_query_ud_channel 445*0Sstevel@tonic-gate * Query a UD channel's attributes. 446*0Sstevel@tonic-gate * 447*0Sstevel@tonic-gate * ud_chan A previously allocated channel handle. 448*0Sstevel@tonic-gate * 449*0Sstevel@tonic-gate * chan_attrs Channel's current attributes. 450*0Sstevel@tonic-gate */ 451*0Sstevel@tonic-gate ibt_status_t ibt_query_ud_channel(ibt_channel_hdl_t ud_chan, 452*0Sstevel@tonic-gate ibt_ud_chan_query_attr_t *ud_chan_attrs); 453*0Sstevel@tonic-gate 454*0Sstevel@tonic-gate /* 455*0Sstevel@tonic-gate * ibt_modify_ud_channel() 456*0Sstevel@tonic-gate * Modifies an UD channel's attributes, as specified by a 457*0Sstevel@tonic-gate * ibt_cep_modify_flags_t parameter to those specified in the 458*0Sstevel@tonic-gate * ibt_ud_chan_modify_attr_t structure. 459*0Sstevel@tonic-gate * 460*0Sstevel@tonic-gate * ud_chan A previously allocated UD channel handle. 461*0Sstevel@tonic-gate * 462*0Sstevel@tonic-gate * flags Specifies which attributes in ibt_ud_chan_modify_attr_t 463*0Sstevel@tonic-gate * are to be modified. 464*0Sstevel@tonic-gate * 465*0Sstevel@tonic-gate * attrs Attributes to be modified. 466*0Sstevel@tonic-gate * 467*0Sstevel@tonic-gate * actual_sz NULL or a pointer to ibt_queue_size_s struct to 468*0Sstevel@tonic-gate * return new queue sizes. 469*0Sstevel@tonic-gate * sq_sz Returned new SendQ size. 470*0Sstevel@tonic-gate * rq_sz Returned new RecvQ size. 471*0Sstevel@tonic-gate * 472*0Sstevel@tonic-gate * NOTE: 473*0Sstevel@tonic-gate * It is only possible to modify a channel that is either in the 474*0Sstevel@tonic-gate * operational state (IBT_STATE_RTS) or paused (IBT_STATE_SQD). If 475*0Sstevel@tonic-gate * channel is in paused state, then a modify operation will unpause the 476*0Sstevel@tonic-gate * channel. 477*0Sstevel@tonic-gate * 478*0Sstevel@tonic-gate * For UD channel the applicable ibt_ud_chan_modify_attr_t attributes 479*0Sstevel@tonic-gate * that can be modified and the corresponding ibt_cep_modify_flags_t 480*0Sstevel@tonic-gate * flags are: 481*0Sstevel@tonic-gate * 482*0Sstevel@tonic-gate * Attribute flag 483*0Sstevel@tonic-gate * --------- ---- 484*0Sstevel@tonic-gate * ud_sq_sz IBT_CEP_SET_SQ_SIZE 485*0Sstevel@tonic-gate * ud_rq_sz IBT_CEP_SET_RQ_SIZE 486*0Sstevel@tonic-gate * ud_qkey IBT_CEP_SET_QKEY 487*0Sstevel@tonic-gate */ 488*0Sstevel@tonic-gate ibt_status_t ibt_modify_ud_channel(ibt_channel_hdl_t ud_chan, 489*0Sstevel@tonic-gate ibt_cep_modify_flags_t flags, ibt_ud_chan_modify_attr_t *attrs, 490*0Sstevel@tonic-gate ibt_queue_sizes_t *actual_sz); 491*0Sstevel@tonic-gate 492*0Sstevel@tonic-gate /* 493*0Sstevel@tonic-gate * ibt_recover_ud_channel() 494*0Sstevel@tonic-gate * Recover an UD Channel which has transitioned to SQ Error state. The 495*0Sstevel@tonic-gate * ibt_recover_ud_channel() transitions the channel from SQ Error state 496*0Sstevel@tonic-gate * to Ready-To-Send channel state. 497*0Sstevel@tonic-gate * 498*0Sstevel@tonic-gate * If a work request posted to a UD channel's send queue completes with 499*0Sstevel@tonic-gate * an error (see ibt_wc_status_t), the channel gets transitioned to SQ 500*0Sstevel@tonic-gate * Error state. In order to reuse this channel, ibt_recover_ud_channel() 501*0Sstevel@tonic-gate * can be used to recover the channel to a usable (Ready-to-Send) state. 502*0Sstevel@tonic-gate * 503*0Sstevel@tonic-gate * ud_chan An UD channel handle which is in SQError state. 504*0Sstevel@tonic-gate */ 505*0Sstevel@tonic-gate ibt_status_t ibt_recover_ud_channel(ibt_channel_hdl_t ud_chan); 506*0Sstevel@tonic-gate 507*0Sstevel@tonic-gate 508*0Sstevel@tonic-gate /* 509*0Sstevel@tonic-gate * ibt_alloc_ud_dest 510*0Sstevel@tonic-gate * Allocate a UD destination handle. This allocates local resources 511*0Sstevel@tonic-gate * that will need subsequent modification/initialization before use 512*0Sstevel@tonic-gate * (in send work requests). Functions that can be used to do this are 513*0Sstevel@tonic-gate * ibt_modify_ud_dest (data supplied by caller), ibt_modify_reply_ud_dest 514*0Sstevel@tonic-gate * (data supplied from a successfully completed receive work request), 515*0Sstevel@tonic-gate * and ibt_request_ud_dest (data retrieved using SIDR protocol). 516*0Sstevel@tonic-gate * 517*0Sstevel@tonic-gate * hca_hdl HCA Handle. 518*0Sstevel@tonic-gate * 519*0Sstevel@tonic-gate * pd PD Handle. 520*0Sstevel@tonic-gate * 521*0Sstevel@tonic-gate * ud_dest_p The returned UD destination handle. 522*0Sstevel@tonic-gate * 523*0Sstevel@tonic-gate */ 524*0Sstevel@tonic-gate ibt_status_t ibt_alloc_ud_dest(ibt_hca_hdl_t hca_hdl, 525*0Sstevel@tonic-gate ibt_ud_dest_flags_t flags, ibt_pd_hdl_t pd, ibt_ud_dest_hdl_t *ud_dest_p); 526*0Sstevel@tonic-gate 527*0Sstevel@tonic-gate /* 528*0Sstevel@tonic-gate * ibt_modify_ud_dest 529*0Sstevel@tonic-gate * Modify a previously allocated UD destination handle from the 530*0Sstevel@tonic-gate * argument data. After the ud_dest has already been made usable, 531*0Sstevel@tonic-gate * the adds_vect argument to this function is optional (NULL). 532*0Sstevel@tonic-gate * 533*0Sstevel@tonic-gate * ud_dest A previously allocated UD destination handle. 534*0Sstevel@tonic-gate * 535*0Sstevel@tonic-gate * qkey Q_Key of the destination. 536*0Sstevel@tonic-gate * 537*0Sstevel@tonic-gate * dest_qpn QPN of the destination. Should be IB_MC_QPN if this is 538*0Sstevel@tonic-gate * a multicast destination handle. 539*0Sstevel@tonic-gate * 540*0Sstevel@tonic-gate * adds_vect NULL or a pointer to an address vector of th 541*0Sstevel@tonic-gate * destination. 542*0Sstevel@tonic-gate */ 543*0Sstevel@tonic-gate ibt_status_t ibt_modify_ud_dest(ibt_ud_dest_hdl_t ud_dest, ib_qkey_t qkey, 544*0Sstevel@tonic-gate ib_qpn_t dest_qpn, ibt_adds_vect_t *adds_vect); 545*0Sstevel@tonic-gate 546*0Sstevel@tonic-gate /* 547*0Sstevel@tonic-gate * ibt_modify_reply_ud_dest 548*0Sstevel@tonic-gate * Modify a previously allocated UD destination handle, so that it 549*0Sstevel@tonic-gate * can be used to reply to the sender of the datagram contained in the 550*0Sstevel@tonic-gate * specified work request completion. 551*0Sstevel@tonic-gate * 552*0Sstevel@tonic-gate * ud_chan Channel to be used with ud_dest. 553*0Sstevel@tonic-gate * 554*0Sstevel@tonic-gate * ud_dest A previously allocated UD destination handle 555*0Sstevel@tonic-gate * as returned by ibt_alloc_ud_dest(). 556*0Sstevel@tonic-gate * 557*0Sstevel@tonic-gate * qkey An Optional Q_Key, 0 if not specified. If this is 558*0Sstevel@tonic-gate * specified then the Q_Key of the existing ud_dest is 559*0Sstevel@tonic-gate * set to this, otherwise it is set to the Q_Key in the 560*0Sstevel@tonic-gate * ud_chan context. 561*0Sstevel@tonic-gate * 562*0Sstevel@tonic-gate * wc The receive work completion. 563*0Sstevel@tonic-gate * 564*0Sstevel@tonic-gate * recv_buf Pointer to the first data buffer associated 565*0Sstevel@tonic-gate * with the receive work request. 566*0Sstevel@tonic-gate */ 567*0Sstevel@tonic-gate ibt_status_t ibt_modify_reply_ud_dest(ibt_channel_hdl_t ud_chan, 568*0Sstevel@tonic-gate ibt_ud_dest_hdl_t ud_dest, ib_qkey_t qkey, ibt_wc_t *wc, 569*0Sstevel@tonic-gate ib_vaddr_t recv_buf); 570*0Sstevel@tonic-gate 571*0Sstevel@tonic-gate /* 572*0Sstevel@tonic-gate * ibt_request_ud_dest 573*0Sstevel@tonic-gate * Modify a previously allocated UD destination handle based on the 574*0Sstevel@tonic-gate * data retrieved by making an SIDR request. 575*0Sstevel@tonic-gate * 576*0Sstevel@tonic-gate * ud_dest A previously allocated UD destination handle. 577*0Sstevel@tonic-gate * 578*0Sstevel@tonic-gate * mode IBT_BLOCKING Do not return until completed. 579*0Sstevel@tonic-gate * ud_ret_args must be supplied. 580*0Sstevel@tonic-gate * IBT_NONBLOCKING Return as soon as possible. 581*0Sstevel@tonic-gate * This requires that the client 582*0Sstevel@tonic-gate * supplies a ud_cm_handler to 583*0Sstevel@tonic-gate * be called when this completes. 584*0Sstevel@tonic-gate * ud_ret_args must be NULL. 585*0Sstevel@tonic-gate * 586*0Sstevel@tonic-gate * dest_attrs Attributes for UD destination, including a pointer to an 587*0Sstevel@tonic-gate * ibt_adds_vect_t returned from a call to ibt_get_paths(). 588*0Sstevel@tonic-gate * 589*0Sstevel@tonic-gate * ud_ret_args If the function is called in blocking mode, ud_ret_args 590*0Sstevel@tonic-gate * should be a pointer to an ibt_ud_returns_t struct. 591*0Sstevel@tonic-gate * ibt_ud_returns_t contains: 592*0Sstevel@tonic-gate * 593*0Sstevel@tonic-gate * ud_status Indicates if the UD destination handle 594*0Sstevel@tonic-gate * was allocated successfully. If the 595*0Sstevel@tonic-gate * handle was not allocated the status 596*0Sstevel@tonic-gate * code gives an indication why not. 597*0Sstevel@tonic-gate * ud_redirect A ibt_redirect_info_s struct, valid 598*0Sstevel@tonic-gate * for a ud_status of 599*0Sstevel@tonic-gate * IBT_CM_SREP_REDIRECT. The remote 600*0Sstevel@tonic-gate * destination could not provide the 601*0Sstevel@tonic-gate * service requested in dest_attrs. The 602*0Sstevel@tonic-gate * request was redirected to a new 603*0Sstevel@tonic-gate * destination, the details of which are 604*0Sstevel@tonic-gate * returned in ud_redirect. ud_dest 605*0Sstevel@tonic-gate * contains a valid destination handle 606*0Sstevel@tonic-gate * for the new destination. 607*0Sstevel@tonic-gate * ud_priv_data_len The length (in bytes) of the buffer 608*0Sstevel@tonic-gate * pointed to by ud_priv_data. 609*0Sstevel@tonic-gate * ud_priv_data A pointer to a a buffer where private 610*0Sstevel@tonic-gate * data from the destination node is 611*0Sstevel@tonic-gate * returned. 612*0Sstevel@tonic-gate * 613*0Sstevel@tonic-gate * In non blocking mode the function returns immediately. If either 614*0Sstevel@tonic-gate * ud_sid, ud_sname or ud_dgid are modified then an IBT client UD 615*0Sstevel@tonic-gate * handler function is called with a status code that indicates if the 616*0Sstevel@tonic-gate * UD destination was modified successfully. If the destination was not 617*0Sstevel@tonic-gate * modified the status code gives an indication why. 618*0Sstevel@tonic-gate * 619*0Sstevel@tonic-gate * For blocking mode the function does not return until the UD destination 620*0Sstevel@tonic-gate * is modified successfully or the attempt to modify the destination 621*0Sstevel@tonic-gate * handle is terminated by the IBTF. If an IBT client has specified a 622*0Sstevel@tonic-gate * channel handler function, it will not be called when 623*0Sstevel@tonic-gate * ibt_request_ud_dest() is called in blocking mode. 624*0Sstevel@tonic-gate */ 625*0Sstevel@tonic-gate ibt_status_t ibt_request_ud_dest(ibt_ud_dest_hdl_t ud_dest, 626*0Sstevel@tonic-gate ibt_execution_mode_t mode, ibt_ud_dest_attr_t *dest_attrs, 627*0Sstevel@tonic-gate ibt_ud_returns_t *ud_ret_args); 628*0Sstevel@tonic-gate 629*0Sstevel@tonic-gate /* 630*0Sstevel@tonic-gate * ibt_free_ud_dest 631*0Sstevel@tonic-gate * Releases the resources associated with the specified UD destination 632*0Sstevel@tonic-gate * handle. 633*0Sstevel@tonic-gate * 634*0Sstevel@tonic-gate * ud_dest The opaque channel handle returned in a previous 635*0Sstevel@tonic-gate * call to ibt_alloc_ud_dest(). 636*0Sstevel@tonic-gate */ 637*0Sstevel@tonic-gate ibt_status_t ibt_free_ud_dest(ibt_ud_dest_hdl_t ud_dest); 638*0Sstevel@tonic-gate 639*0Sstevel@tonic-gate /* 640*0Sstevel@tonic-gate * ibt_query_ud_dest 641*0Sstevel@tonic-gate * Query a UD destination's attributes. 642*0Sstevel@tonic-gate * 643*0Sstevel@tonic-gate * ud_dest A previously allocated destination handle. 644*0Sstevel@tonic-gate * 645*0Sstevel@tonic-gate * dest_attrs destination's current attributes. 646*0Sstevel@tonic-gate */ 647*0Sstevel@tonic-gate ibt_status_t ibt_query_ud_dest(ibt_ud_dest_hdl_t ud_dest, 648*0Sstevel@tonic-gate ibt_ud_dest_query_attr_t *dest_attrs); 649*0Sstevel@tonic-gate 650*0Sstevel@tonic-gate 651*0Sstevel@tonic-gate /* 652*0Sstevel@tonic-gate * ibt_is_privileged_ud_dest 653*0Sstevel@tonic-gate * Determine if a UD destination Handle is a privileged handle. 654*0Sstevel@tonic-gate * 655*0Sstevel@tonic-gate * ud_dest A previously allocated destination handle. 656*0Sstevel@tonic-gate */ 657*0Sstevel@tonic-gate boolean_t ibt_is_privileged_ud_dest(ibt_ud_dest_hdl_t ud_dest); 658*0Sstevel@tonic-gate 659*0Sstevel@tonic-gate 660*0Sstevel@tonic-gate /* 661*0Sstevel@tonic-gate * ibt_update_channel_qkey 662*0Sstevel@tonic-gate * 663*0Sstevel@tonic-gate * ud_chan The UD channel handle, that is to be used to 664*0Sstevel@tonic-gate * communicate with the specified destination. 665*0Sstevel@tonic-gate * 666*0Sstevel@tonic-gate * ud_dest A UD destination handle returned from 667*0Sstevel@tonic-gate * ibt_alloc_ud_dest(). 668*0Sstevel@tonic-gate * 669*0Sstevel@tonic-gate * ibt_update_channel_qkey() set's the Qkey in the specified channel context 670*0Sstevel@tonic-gate * to the Qkey in the specified destination handle. This function can be used 671*0Sstevel@tonic-gate * to enable sends to a privileged destination. All posted Send Work Requests 672*0Sstevel@tonic-gate * that contain a privileged destination handle now use the Qkey in the 673*0Sstevel@tonic-gate * channel context. 674*0Sstevel@tonic-gate * 675*0Sstevel@tonic-gate * ibt_update_channel_qkey() can also be used to enable the caller to receive 676*0Sstevel@tonic-gate * from the specified remote destination on the specified channel. 677*0Sstevel@tonic-gate * 678*0Sstevel@tonic-gate */ 679*0Sstevel@tonic-gate ibt_status_t ibt_update_channel_qkey(ibt_channel_hdl_t ud_chan, 680*0Sstevel@tonic-gate ibt_ud_dest_hdl_t ud_dest); 681*0Sstevel@tonic-gate 682*0Sstevel@tonic-gate 683*0Sstevel@tonic-gate /* 684*0Sstevel@tonic-gate * ibt_set_chan_private() 685*0Sstevel@tonic-gate * ibt_get_chan_private() 686*0Sstevel@tonic-gate * Set/get a pointer to client private data. 687*0Sstevel@tonic-gate * Applicable for both RC and UD channels. 688*0Sstevel@tonic-gate * 689*0Sstevel@tonic-gate * chan A previously allocated channel handle. 690*0Sstevel@tonic-gate * 691*0Sstevel@tonic-gate * clnt_private A pointer to the client private data. 692*0Sstevel@tonic-gate */ 693*0Sstevel@tonic-gate void ibt_set_chan_private(ibt_channel_hdl_t chan, void *clnt_private); 694*0Sstevel@tonic-gate 695*0Sstevel@tonic-gate void *ibt_get_chan_private(ibt_channel_hdl_t chan); 696*0Sstevel@tonic-gate 697*0Sstevel@tonic-gate /* 698*0Sstevel@tonic-gate * ibt_channel_to_hca_guid() 699*0Sstevel@tonic-gate * 700*0Sstevel@tonic-gate * A helper function to retrieve HCA GUID for the specified Channel. 701*0Sstevel@tonic-gate * 702*0Sstevel@tonic-gate * chan Channel Handle 703*0Sstevel@tonic-gate * 704*0Sstevel@tonic-gate * hca_guid Returned HCA GUID on which the specified Channel is 705*0Sstevel@tonic-gate * allocated. Valid if it is non-NULL on return. 706*0Sstevel@tonic-gate */ 707*0Sstevel@tonic-gate ib_guid_t ibt_channel_to_hca_guid(ibt_channel_hdl_t chan); 708*0Sstevel@tonic-gate 709*0Sstevel@tonic-gate #ifdef __cplusplus 710*0Sstevel@tonic-gate } 711*0Sstevel@tonic-gate #endif 712*0Sstevel@tonic-gate 713*0Sstevel@tonic-gate #endif /* _SYS_IB_IBTL_IBTI_H */ 714