da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin * CDDL HEADER START
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin * The contents of this file are subject to the terms of the
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin * Common Development and Distribution License (the "License").
3e14f97f673e8a630f076077de35afdd43dc1587Roger A. Faulkner * You may not use this file except in compliance with the License.
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin * See the License for the specific language governing permissions
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin * and limitations under the License.
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin * When distributing Covered Code, include this CDDL HEADER in each
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin * If applicable, add the following below this CDDL HEADER, with the
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin * fields enclosed by brackets "[]" replaced with your own identifying
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin * information: Portions Copyright [yyyy] [name of copyright owner]
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin * CDDL HEADER END
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin * Copyright 2009 Sun Microsystems, Inc. All rights reserved.
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin * Use is subject to license terms.
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin * This file contains the data structure definitions for the IBTI
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin * communication manager (CM). It is only included in ibti.h
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinextern "C" {
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin * Defines.
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin#define IBT_CM_ADDL_REJ_LEN 72 /* Additional Rej Info len */
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin /* This is the max consumer addl */
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin /* reject info len */
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin#define IBT_CM_SIDR_CP_LEN 72 /* SIDR REP Class Port Info len */
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin#define IBT_CM_APR_ADDL_LEN 72 /* Additional Info len in APR message */
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin * CM channel handler reject reasons.
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin * Refer to InfiniBand Architecture Release Volume 1 Rev 1.0a:
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin * Section 12.6.7.2 Rejection Reason, and RDMA IP CM Service Annex
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin * When a REJ happens for an RDMA-aware ULP, a consumer reject code
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin * indicating an IP CM Service reject or a RDMA-Aware ULP reject can
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin * be returned. In the IBTA spec both use the consumer reject code, but
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin * are distinguished by the REJ layer byte (table 3 of the annex 11).
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin * The IBTF CM can thus tell what type of reject has been returned. When
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin * a RDMA ULP issues a consumer REJ to an RDMA REQ then the CM will
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin * return an IBT_CM_CONSUMER ibt_cm_reason_t. The ARI data is returned
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin * in an ibt_ari_con_t struct accessed by the 'ari_consumer' member of
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin * the ibt_arej_info_t. However the consumer reject data begins at
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin * 'ari_consumer.rej_ari[1]', and is of length
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin * 'ari_consumer.rej_ari_len - 1' (the first byte is the REJ layer byte),
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin * where as for a non RDMA-aware ULP consumer REJ, the ARI data begins
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin * at 'ari_consumer.rej_ari[0]' and is of length 'ari_consumer.rej_ari_len'
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin * If an RDMA-aware ULP REQ is rejected by the IP CM Service layer, the
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin * CM will return the new IBT_CM_RDMA_IP ibt_cm_reason_t, and the
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin * private data is returned in an ibt_ari_ip_t struct accessed via the
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin * 'ari_ip' member of the ibt_arej_info_t struct.
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin * If an RDMA IP CM REQ is sent to a non RDMA-aware ULP consumer, then
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin * the REQ is Rejected with an IBT_CM_INVALID_SID ibt_cm_reason_t.
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin IBT_CM_NO_CHAN = 1, /* Remote unable to allocate a CHAN */
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin IBT_CM_NO_EEC = 2, /* Remote unable to allocate an EEC */
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin IBT_CM_NO_RESC = 3, /* Remote unable to allocate resource */
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin IBT_CM_TIMEOUT = 4, /* CM protocol timed out waiting for */
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin /* a msg */
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin IBT_CM_INVALID_CID = 6, /* Local CID or Remote CID invalid */
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin IBT_CM_INVALID_COMM_INS = 7, /* Local CID, Remote CID, Channel */
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin /* does not refer to a valid */
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin /* communication Instance. */
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin IBT_CM_INVALID_SID = 8, /* Service not supported or not */
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin /* recognized */
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin IBT_CM_INVALID_SRV_TYPE = 9, /* Invalid transport service type */
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin IBT_CM_PRIM_GID = 12, /* Primary remote port gid rejected. */
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin IBT_CM_PRIM_LID = 13, /* Primary remote port lid rejected. */
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin IBT_CM_INVALID_PRIM_SL = 14, /* Primary Requested SL not supported */
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin IBT_CM_INVALID_PRIM_TC = 15, /* Primary Requested traffic class */
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin /* not supported */
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin IBT_CM_INVALID_PRIM_HOP = 16, /* Primary Requested hop limit not */
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin /* accepted */
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin IBT_CM_INVALID_PRIM_RATE = 17, /* Primary Packet rate not accepted */
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin IBT_CM_ALT_GID = 18, /* Alternate remote port gid rejected */
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin IBT_CM_ALT_LID = 19, /* Alternate remote port lid rejected */
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin IBT_CM_INVALID_ALT_SL = 20, /* Alternate Requested SL not */
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin /* supported */
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin IBT_CM_INVALID_ALT_TC = 21, /* Alternate Requested traffic class */
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin /* not supported */
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin IBT_CM_INVALID_ALT_HOP = 22, /* Alternate Requested hop limit */
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin /* accepted */
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin IBT_CM_INVALID_ALT_RATE = 23, /* Alternate Packet rate not accepted */
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin IBT_CM_INSUFF_RESOURCE = 27, /* Insufficient responder resources */
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin IBT_CM_CONSUMER = 28, /* Consumer rejected connection */
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin IBT_CM_RNR_RETRY_CNT_REJ = 29, /* RNR NAK retry count rejected */
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin IBT_CM_DUP_COM_ID = 30, /* Local CID in REQ is duplicated */
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin IBT_CM_CLASS_NO_SUPPORT = 31, /* Class version not supported */
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin IBT_CM_INVALID_PRIM_FLOW = 32, /* Invalid primary flow label */
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin IBT_CM_INVALID_ALT_FLOW = 33, /* Invalid alternate flow label */
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin IBT_CM_DUP_CONN_REQ = 1000, /* Duplicate connection request */
* such as ibt_free_cq, ibt_free_rc/ud_channel, etc. on connection failure
#ifdef __cplusplus