ibtl_cm.h revision 015f8fff605f2fbd5fd0072e555576297804d57b
/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License (the "License").
* You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* See the License for the specific language governing permissions
* and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at usr/src/OPENSOLARIS.LICENSE.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*/
/*
* Copyright 2007 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#ifndef _SYS_IB_IBTL_IMPL_IBTL_CM_H
#define _SYS_IB_IBTL_IMPL_IBTL_CM_H
#pragma ident "%Z%%M% %I% %E% SMI"
/*
*
* All data structures and function prototypes that are specific to the
* IBTL <-> IBCM private interface.
*/
#ifdef __cplusplus
extern "C" {
#endif
/*
* ibt_ud_dest_t is defined in ibtl_ci_types.h, it holds all the
* information needed to reach a UD destination.
*
* typedef struct ibt_ud_dest_s {
* ibc_ah_hdl_t ud_ah; * Address handle *
* ib_qpn_t ud_dst_qpn; * Destination QPN *
* ib_qkey_t ud_qkey; * Q_Key *
*
* * The following fields are CM-only, i.e., opaque to the CI *
* struct ibtl_hca_s *ud_hca; * IBTL HCA handle *
* } ibt_ud_dest_t;
*/
#define ud_dest_hca ud_dest_opaque1
/* CM private data */
/*
* ibtl_cm_get_hca_port() helper function will retrieve these for the
* specified SGID value.
*/
typedef struct ibtl_cm_hca_port_s {
/*
* ibtl_cm_get_hca_port()
*
* A helper function to get HCA node GUID, Base LID, SGID Index,
* port number, LMC and MTU for the specified SGID.
*
* sgid Input Source GID.
*
* hca_guid Optional HCA Guid.
*
* hca_port Pointer to ibtl_cm_hca_port_t structure,
*/
/*
* ibtl_cm_get_1st_full_pkey_ix()
*
* A helper function to get P_Key Index of the first full member P_Key
* available on the specified HCA and Port combination.
*
* hca_guid HCA GUID.
*
* port HCA port number.
*/
/*
* Functions to support CM and clients to reliably free RC QPs.
*
* ibtl_cm_chan_is_open()
*
* Inform IBTL that the connection has been established on this
* channel so that a later call to ibtl_cm_chan_is_closed()
* will be required to free the QPN used by this channel.
*
* ibtl_cm_chan_is_closing()
*
* Inform IBTL that the TIMEWAIT delay for the connection has been
* started for this channel so that the QP can be freed.
*
* ibtl_cm_is_chan_closing()
*
* Returns 1 if the connection on this channel has been moved to TIME WAIT
*
* ibtl_cm_is_chan_closed()
*
* Returns 1 if the connection on this channel has completed TIME WAIT
*
* ibtl_cm_chan_is_closed()
*
* Inform IBTL that the TIMEWAIT delay for the connection has been
* reached for this channel so that the QPN can be reused.
*
* rc_chan Channel Handle
*
* ibtl_cm_chan_is_reused()
*
* Inform IBTL that the channel is going to be re-used for another
* connection.
*
* rc_chan Channel Handle
*/
/*
* ibtl_cm_get_chan_type()
*
* A helper function to get channel transport type.
*/
/*
* ibtl_cm_change_service_cnt()
*
* Inform IBTL that service registration count has changed
* so that it can correctly manage whether or not it should
* allow ibt_detach() to succeed.
*/
/*
* ibtl_cm_query_hca_ports_byguid()
*
* Use the cached copy of the portinfo.
*/
/*
* ibtl_cm_get_active_plist
*
* Returns a list of active source points which satisfy the desired
* attribute. The memory allocated for the array "port_list_p" should
* be freed by the caller using ibtl_cm_free_active_plist().
*
* ibtl_cm_free_active_plist
*
* Frees the memory allocated in ibtl_cm_get_active_plist().
*/
#define IBTL_CM_SIMPLE_SETUP 0
#define IBTL_CM_MULTI_SM (1 << 0)
typedef struct ibtl_cm_port_list_s {
void *p_saa_hdl;
/*
* Functions to support ibt_register_subnet_notices and the
* related callbacks.
*
* ibtl_cm_set_sm_notice_handler
* Pass the handler into IBTL where it will actually be used.
*
* ibtl_cm_sm_notice_handler
* Post an event to interested IBT clients.
*
* ibtl_cm_sm_notice_init_failure
* Inform the client that callbacks are not working.
*/
/* pass all failing sgids at once */
typedef struct ibtl_cm_sm_init_fail_s {
int smf_num_sgids;
#ifdef __cplusplus
}
#endif
#endif /* _SYS_IB_IBTL_IMPL_IBTL_CM_H */