1321936Shselasky/* 2321936Shselasky * Copyright (c) 2004-2007 Voltaire, Inc. All rights reserved. 3321936Shselasky * Copyright (c) 2002-2005 Mellanox Technologies LTD. All rights reserved. 4321936Shselasky * Copyright (c) 1996-2003 Intel Corporation. All rights reserved. 5321936Shselasky * 6321936Shselasky * This software is available to you under a choice of one of two 7321936Shselasky * licenses. You may choose to be licensed under the terms of the GNU 8321936Shselasky * General Public License (GPL) Version 2, available from the file 9321936Shselasky * COPYING in the main directory of this source tree, or the 10321936Shselasky * OpenIB.org BSD license below: 11321936Shselasky * 12321936Shselasky * Redistribution and use in source and binary forms, with or 13321936Shselasky * without modification, are permitted provided that the following 14321936Shselasky * conditions are met: 15321936Shselasky * 16321936Shselasky * - Redistributions of source code must retain the above 17321936Shselasky * copyright notice, this list of conditions and the following 18321936Shselasky * disclaimer. 19321936Shselasky * 20321936Shselasky * - Redistributions in binary form must reproduce the above 21321936Shselasky * copyright notice, this list of conditions and the following 22321936Shselasky * disclaimer in the documentation and/or other materials 23321936Shselasky * provided with the distribution. 24321936Shselasky * 25321936Shselasky * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 26321936Shselasky * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 27321936Shselasky * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 28321936Shselasky * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS 29321936Shselasky * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN 30321936Shselasky * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 31321936Shselasky * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 32321936Shselasky * SOFTWARE. 33321936Shselasky * 34321936Shselasky */ 35321936Shselasky 36321936Shselasky#if !defined(__IB_CM_TYPES_H__) 37321936Shselasky#define __IB_CM_TYPES_H__ 38321936Shselasky 39321936Shselasky#ifndef __WIN__ 40321936Shselasky 41321936Shselasky#include <iba/ib_types.h> 42321936Shselasky 43321936Shselasky#ifdef __cplusplus 44321936Shselasky# define BEGIN_C_DECLS extern "C" { 45321936Shselasky# define END_C_DECLS } 46321936Shselasky#else /* !__cplusplus */ 47321936Shselasky# define BEGIN_C_DECLS 48321936Shselasky# define END_C_DECLS 49321936Shselasky#endif /* __cplusplus */ 50321936Shselasky 51321936ShselaskyBEGIN_C_DECLS 52321936Shselasky/* 53321936Shselasky * Defines known Communication management class versions 54321936Shselasky */ 55321936Shselasky#define IB_MCLASS_CM_VER_2 2 56321936Shselasky#define IB_MCLASS_CM_VER_1 1 57321936Shselasky/* 58321936Shselasky * Defines the size of user available data in communication management MADs 59321936Shselasky */ 60321936Shselasky#define IB_REQ_PDATA_SIZE_VER2 92 61321936Shselasky#define IB_MRA_PDATA_SIZE_VER2 222 62321936Shselasky#define IB_REJ_PDATA_SIZE_VER2 148 63321936Shselasky#define IB_REP_PDATA_SIZE_VER2 196 64321936Shselasky#define IB_RTU_PDATA_SIZE_VER2 224 65321936Shselasky#define IB_LAP_PDATA_SIZE_VER2 168 66321936Shselasky#define IB_APR_PDATA_SIZE_VER2 148 67321936Shselasky#define IB_DREQ_PDATA_SIZE_VER2 220 68321936Shselasky#define IB_DREP_PDATA_SIZE_VER2 224 69321936Shselasky#define IB_SIDR_REQ_PDATA_SIZE_VER2 216 70321936Shselasky#define IB_SIDR_REP_PDATA_SIZE_VER2 136 71321936Shselasky#define IB_REQ_PDATA_SIZE_VER1 92 72321936Shselasky#define IB_MRA_PDATA_SIZE_VER1 222 73321936Shselasky#define IB_REJ_PDATA_SIZE_VER1 148 74321936Shselasky#define IB_REP_PDATA_SIZE_VER1 204 75321936Shselasky#define IB_RTU_PDATA_SIZE_VER1 224 76321936Shselasky#define IB_LAP_PDATA_SIZE_VER1 168 77321936Shselasky#define IB_APR_PDATA_SIZE_VER1 151 78321936Shselasky#define IB_DREQ_PDATA_SIZE_VER1 220 79321936Shselasky#define IB_DREP_PDATA_SIZE_VER1 224 80321936Shselasky#define IB_SIDR_REQ_PDATA_SIZE_VER1 216 81321936Shselasky#define IB_SIDR_REP_PDATA_SIZE_VER1 140 82321936Shselasky#define IB_ARI_SIZE 72 // redefine 83321936Shselasky#define IB_APR_INFO_SIZE 72 84321936Shselasky/****d* Access Layer/ib_rej_status_t 85321936Shselasky* NAME 86321936Shselasky* ib_rej_status_t 87321936Shselasky* 88321936Shselasky* DESCRIPTION 89321936Shselasky* Rejection reasons. 90321936Shselasky* 91321936Shselasky* SYNOPSIS 92321936Shselasky*/ 93321936Shselaskytypedef ib_net16_t ib_rej_status_t; 94321936Shselasky/* 95321936Shselasky* SEE ALSO 96321936Shselasky* ib_cm_rej, ib_cm_rej_rec_t 97321936Shselasky* 98321936Shselasky* SOURCE 99321936Shselasky*/ 100321936Shselasky#define IB_REJ_INSUF_QP CL_HTON16(1) 101321936Shselasky#define IB_REJ_INSUF_EEC CL_HTON16(2) 102321936Shselasky#define IB_REJ_INSUF_RESOURCES CL_HTON16(3) 103321936Shselasky#define IB_REJ_TIMEOUT CL_HTON16(4) 104321936Shselasky#define IB_REJ_UNSUPPORTED CL_HTON16(5) 105321936Shselasky#define IB_REJ_INVALID_COMM_ID CL_HTON16(6) 106321936Shselasky#define IB_REJ_INVALID_COMM_INSTANCE CL_HTON16(7) 107321936Shselasky#define IB_REJ_INVALID_SID CL_HTON16(8) 108321936Shselasky#define IB_REJ_INVALID_XPORT CL_HTON16(9) 109321936Shselasky#define IB_REJ_STALE_CONN CL_HTON16(10) 110321936Shselasky#define IB_REJ_RDC_NOT_EXIST CL_HTON16(11) 111321936Shselasky#define IB_REJ_INVALID_GID CL_HTON16(12) 112321936Shselasky#define IB_REJ_INVALID_LID CL_HTON16(13) 113321936Shselasky#define IB_REJ_INVALID_SL CL_HTON16(14) 114321936Shselasky#define IB_REJ_INVALID_TRAFFIC_CLASS CL_HTON16(15) 115321936Shselasky#define IB_REJ_INVALID_HOP_LIMIT CL_HTON16(16) 116321936Shselasky#define IB_REJ_INVALID_PKT_RATE CL_HTON16(17) 117321936Shselasky#define IB_REJ_INVALID_ALT_GID CL_HTON16(18) 118321936Shselasky#define IB_REJ_INVALID_ALT_LID CL_HTON16(19) 119321936Shselasky#define IB_REJ_INVALID_ALT_SL CL_HTON16(20) 120321936Shselasky#define IB_REJ_INVALID_ALT_TRAFFIC_CLASS CL_HTON16(21) 121321936Shselasky#define IB_REJ_INVALID_ALT_HOP_LIMIT CL_HTON16(22) 122321936Shselasky#define IB_REJ_INVALID_ALT_PKT_RATE CL_HTON16(23) 123321936Shselasky#define IB_REJ_PORT_REDIRECT CL_HTON16(24) 124321936Shselasky#define IB_REJ_INVALID_MTU CL_HTON16(26) 125321936Shselasky#define IB_REJ_INSUFFICIENT_RESP_RES CL_HTON16(27) 126321936Shselasky#define IB_REJ_USER_DEFINED CL_HTON16(28) 127321936Shselasky#define IB_REJ_INVALID_RNR_RETRY CL_HTON16(29) 128321936Shselasky#define IB_REJ_DUPLICATE_LOCAL_COMM_ID CL_HTON16(30) 129321936Shselasky#define IB_REJ_INVALID_CLASS_VER CL_HTON16(31) 130321936Shselasky#define IB_REJ_INVALID_FLOW_LBL CL_HTON16(32) 131321936Shselasky#define IB_REJ_INVALID_ALT_FLOW_LBL CL_HTON16(33) 132321936Shselasky 133321936Shselasky#define IB_REJ_SERVICE_HANDOFF CL_HTON16(65535) 134321936Shselasky/******/ 135321936Shselasky 136321936Shselasky/****d* Access Layer/ib_apr_status_t 137321936Shselasky* NAME 138321936Shselasky* ib_apr_status_t 139321936Shselasky* 140321936Shselasky* DESCRIPTION 141321936Shselasky* Automatic path migration status information. 142321936Shselasky* 143321936Shselasky* SYNOPSIS 144321936Shselasky*/ 145321936Shselaskytypedef uint8_t ib_apr_status_t; 146321936Shselasky/* 147321936Shselasky* SEE ALSO 148321936Shselasky* ib_cm_apr, ib_cm_apr_rec_t 149321936Shselasky* 150321936Shselasky* SOURCE 151321936Shselasky */ 152321936Shselasky#define IB_AP_SUCCESS 0 153321936Shselasky#define IB_AP_INVALID_COMM_ID 1 154321936Shselasky#define IB_AP_UNSUPPORTED 2 155321936Shselasky#define IB_AP_REJECT 3 156321936Shselasky#define IB_AP_REDIRECT 4 157321936Shselasky#define IB_AP_IS_CURRENT 5 158321936Shselasky#define IB_AP_INVALID_QPN_EECN 6 159321936Shselasky#define IB_AP_INVALID_LID 7 160321936Shselasky#define IB_AP_INVALID_GID 8 161321936Shselasky#define IB_AP_INVALID_FLOW_LBL 9 162321936Shselasky#define IB_AP_INVALID_TCLASS 10 163321936Shselasky#define IB_AP_INVALID_HOP_LIMIT 11 164321936Shselasky#define IB_AP_INVALID_PKT_RATE 12 165321936Shselasky#define IB_AP_INVALID_SL 13 166321936Shselasky/******/ 167321936Shselasky 168321936Shselasky/****d* Access Layer/ib_cm_cap_mask_t 169321936Shselasky* NAME 170321936Shselasky* ib_cm_cap_mask_t 171321936Shselasky* 172321936Shselasky* DESCRIPTION 173321936Shselasky* Capability mask values in ClassPortInfo. 174321936Shselasky* 175321936Shselasky* SYNOPSIS 176321936Shselasky*/ 177321936Shselasky#define IB_CM_RELIABLE_CONN_CAPABLE CL_HTON16(9) 178321936Shselasky#define IB_CM_RELIABLE_DGRM_CAPABLE CL_HTON16(10) 179321936Shselasky#define IB_CM_RDGRM_CAPABLE CL_HTON16(11) 180321936Shselasky#define IB_CM_UNRELIABLE_CONN_CAPABLE CL_HTON16(12) 181321936Shselasky#define IB_CM_SIDR_CAPABLE CL_HTON16(13) 182321936Shselasky/* 183321936Shselasky* SEE ALSO 184321936Shselasky* ib_cm_rep, ib_class_port_info_t 185321936Shselasky* 186321936Shselasky* SOURCE 187321936Shselasky* 188321936Shselasky*******/ 189321936Shselasky 190321936Shselasky/* 191321936Shselasky * Service ID resolution status 192321936Shselasky */ 193321936Shselaskytypedef uint16_t ib_sidr_status_t; 194321936Shselasky#define IB_SIDR_SUCCESS 0 195321936Shselasky#define IB_SIDR_UNSUPPORTED 1 196321936Shselasky#define IB_SIDR_REJECT 2 197321936Shselasky#define IB_SIDR_NO_QP 3 198321936Shselasky#define IB_SIDR_REDIRECT 4 199321936Shselasky#define IB_SIDR_UNSUPPORTED_VER 5 200321936Shselasky 201321936ShselaskyEND_C_DECLS 202321936Shselasky#endif /* ndef __WIN__ */ 203321936Shselasky#endif /* __IB_CM_TYPES_H__ */ 204