ibtl_ci_types.h revision 7c478bd95313f5f23a4c958a745db2134aa03244
/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License, Version 1.0 only
* (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 2004 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#ifndef _SYS_IB_IBTL_IBTL_CI_TYPES_H
#define _SYS_IB_IBTL_IBTL_CI_TYPES_H
#pragma ident "%Z%%M% %I% %E% SMI"
/*
* Definitions shared between the IBTL and CI interface.
*/
#ifdef __cplusplus
extern "C" {
#endif
typedef struct ibc_cq_s *ibt_opaque1_t;
typedef struct ibc_srq_s *ibt_opaque2_t;
/*
* Channel Modify flags - ibt_cep_modify_flags_t
*
* Opaque definitions for channel modify flags.
*
* IBT_CEP_SET_RESET_INIT Transit the channel (QP) from RESET to INIT
* state.
*
* Attributes modified during this transition
* (depends on type of channel) are:
* Required:
* P_Key Index
* HCA Port Number
* Q_Key
* IBT_CEP_RDMA_RD
* IBT_CEP_RDMA_WR
* IBT_CEP_ATOMIC
*
* IBT_CEP_SET_INIT_RTR Transit the channel (QP) from INIT to RESET
* state.
*
* Attributes modified during this transition
* (depends on type of channel) are:
* Required:
* Number of responder resources for RDMA
* Primary Path Address Vector Info.
* Destination QPN.
* PSN for ReceiveQ.
* Minimum RNR NAK Timer field value.
* Optional:
* Alternate Path Info.
* P_Key Index.
* Q_Key
* SendQ Size.
* ReceiveQ Size.
* IBT_CEP_RDMA_RD
* IBT_CEP_RDMA_WR
* IBT_CEP_ATOMIC
*
* IBT_CEP_SET_RTR_RTS Transit the channel (QP) from RTR to RTS state.
*
* Attributes modified during this transition
* (depends on type of channel) are:
* Required:
* Local ACK Timeout.
* Retry Count.
* RNR Retry Count.
* SendQ PSN.
* ops at destination.
* Optional:
* Alternate Path Info.
* Q_Key
* SendQ Size.
* ReceiveQ Size.
* Minimum RNR NAK Timer field value.
* IBT_CEP_RDMA_RD
* IBT_CEP_RDMA_WR
* IBT_CEP_ATOMIC
*
* IBT_CEP_SET_STATE This flag needs to be set to qualify for all
* specified next state transitions - qp_state.
*
* IBT_CEP_SET_MTU Modify Path MTU (RC & UC Only). This flag is
* only valid when transiting from the INIT to RTR
* state.
*
* IBT_CEP_SET_TIMEOUT Primary Local ACK Timeout (RC only).
*
* IBT_CEP_SET_PKEY_IX Primary P_Key Index (RC, UC & UD Only).
*
* IBT_CEP_SET_MIG Path Migration State (RC & UC only).
*
* Note:
* That the IBT_CEP_SET_RESET_INIT, IBT_CEP_SET_INIT_RTR
* IBT_CEP_SET_RTR_RTS flags are mutually exclusive. However if one of the
* optional attributes associated with these flags is to be modified then
* the corresponding modify flag must also be specified. For example if
* a client wishes to transit from the INIT to RTR state but additionally
* they want to disable atomics, then the modify flags should be:
*
* (IBT_CEP_SET_INIT_RTR | IBT_CEP_SET_ATOMIC)
*
* And the following attributes specified:
*
* - Primary Path Address Vector Information.
* - Destination QPN.
* - PSN for ReceiveQ.
* - Minimum RNR NAK Timer field value.
* - ibt_cep_flags_t set to IBT_CEP_ATOMIC
*
*/
#define IBT_CEP_SET_STATE IBT_CEP_SET_OPAQUE4
#define IBT_CEP_SET_MTU IBT_CEP_SET_OPAQUE5
#define IBT_CEP_SET_MIG IBT_CEP_SET_OPAQUE8
/*
* ibt_async_code_t
*/
/*
* ibt_adds_vect_t
*/
#define av_sgid_ix av_opaque4
/*
* ibt_wc_t
*/
/* RawEthr only */
/*
* ibt_mcg_attr_t
*/
/*
* ibt_mcg_info_t
*/
#define mc_pkt_lt mc_opaque2
/*
* ibt_hca_flags_t
*/
#define IBT_HCA_RESIZE_QP IBT_HCA_RESIZE_CHAN
/*
* ibt_object_type_t
*/
#define IBT_HDL_QP IBT_HDL_CHANNEL
#define IBT_HDL_AH IBT_HDL_UD_DEST
/*
* ibt_hca_attr_t
*/
#define hca_max_mcg_qps hca_max_mcg_chans
/*
* ibt_hca_portinfo_t
*/
/* Mapping of Verbs defined return status to channel specific. */
#define IBT_QP_FULL IBT_CHAN_FULL
#define IBT_QP_ATTR_RO IBT_CHAN_ATTR_RO
#define IBT_QP_IN_USE IBT_CHAN_IN_USE
#define IBT_MC_MLID_INVALID IBT_MC_OPAQUE
#define IBT_QP_SRQ IBT_CHAN_SRQ
/*
* ibt_cep_path_t
*/
/* Local ACK timeout for RC */
/*
* Define an ibt UD Destination struct. This holds all the information
* needed to reach a UD destination.
*
* The ibt_ud_dest_s struct is known by the CI and IBTL. This structure is
* referenced by the CI during UD work request processing. It is defined here
* here so that IBTL does not need to do any data copying during ibt_post_send.
*/
typedef struct ibt_ud_dest_s {
/* The following fields are IBTL-only, i.e., opaque to the CI */
struct ibtl_hca_s *ud_dest_opaque1;
/*
* Reserved For Future Use
* RD destination address info.
*/
typedef struct ibt_rd_dest_s {
/*
* QP Type.
*/
typedef enum ibt_qp_type_e {
IBT_RC_RQP = 0,
IBT_UD_RQP = 3
/*
* Special QP Type.
*/
typedef enum ibt_sqp_type_e {
IBT_SMI_SQP = 0,
IBT_GSI_SQP = 1,
/*
* QP alloc flags.
*/
typedef enum ibt_qp_alloc_flags_e {
IBT_QP_NO_FLAGS = 0,
IBT_QP_USER_MAP = (1 << 0),
/*
* QP Alloc Attributes definition.
*
* Contains the QP attributes that are required to create a QP.
*/
typedef struct ibt_qp_alloc_attr_s {
/*
* QP query info
*/
/* RC transport specific */
typedef struct ibt_qp_rc_attr_s {
/* Number of RDMA RD's & */
/* Atomics outstanding */
/* Responder resources for */
/* handling incoming RDMA */
/* RD's & Atomics */
/*
* Reserved For Future Use.
* UC transport specific
*/
typedef struct ibt_qp_uc_attr_s {
/*
* Reserved For Future Use.
* RD transport specific
*/
typedef struct ibt_qp_rd_attr_s {
/* UD transport specific */
typedef struct ibt_qp_ud_attr_s {
/*
* Common QP Info
*/
typedef struct ibt_qp_info_s {
/* modify_qp to RTS state */
union { /* transport specific */
} qp_transport;
/*
* QP Query Attributes definition.
*/
typedef struct ibt_qp_query_attr_s {
/*
* Reserved For Future Use.
* EEC Info.
*/
typedef struct ibt_eec_info_s {
/*
* Reserved For Future Use.
* EEC Query Attributes definition.
*/
typedef struct ibt_eec_query_attr_s {
#define ibt_ah_flags_t ibt_ud_dest_flags_t
#define IBT_AH_NO_FLAGS IBT_UD_DEST_NO_FLAGS
#define IBT_AH_USER_MAP IBT_UD_DEST_USER_MAP
#ifdef __cplusplus
}
#endif
#endif /* _SYS_IB_IBTL_IBTL_CI_TYPES_H */