1219820Sjeff/*
2219820Sjeff * Copyright (c) 2004, 2005 Voltaire, Inc. All rights reserved.
3219820Sjeff * Copyright (c) 2002-2005 Mellanox Technologies LTD. All rights reserved.
4219820Sjeff * Copyright (c) 1996-2003 Intel Corporation. All rights reserved.
5219820Sjeff *
6219820Sjeff * This software is available to you under a choice of one of two
7219820Sjeff * licenses.  You may choose to be licensed under the terms of the GNU
8219820Sjeff * General Public License (GPL) Version 2, available from the file
9219820Sjeff * COPYING in the main directory of this source tree, or the
10219820Sjeff * OpenIB.org BSD license below:
11219820Sjeff *
12219820Sjeff *     Redistribution and use in source and binary forms, with or
13219820Sjeff *     without modification, are permitted provided that the following
14219820Sjeff *     conditions are met:
15219820Sjeff *
16219820Sjeff *      - Redistributions of source code must retain the above
17219820Sjeff *        copyright notice, this list of conditions and the following
18219820Sjeff *        disclaimer.
19219820Sjeff *
20219820Sjeff *      - Redistributions in binary form must reproduce the above
21219820Sjeff *        copyright notice, this list of conditions and the following
22219820Sjeff *        disclaimer in the documentation and/or other materials
23219820Sjeff *        provided with the distribution.
24219820Sjeff *
25219820Sjeff * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
26219820Sjeff * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
27219820Sjeff * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
28219820Sjeff * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
29219820Sjeff * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
30219820Sjeff * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
31219820Sjeff * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
32219820Sjeff * SOFTWARE.
33219820Sjeff *
34219820Sjeff */
35219820Sjeff
36219820Sjeff/*
37219820Sjeff * Abstract:
38219820Sjeff *	Defines string to decode ib_api_status_t return values.
39219820Sjeff *
40219820Sjeff */
41219820Sjeff
42219820Sjeff#if HAVE_CONFIG_H
43219820Sjeff#  include <config.h>
44219820Sjeff#endif				/* HAVE_CONFIG_H */
45219820Sjeff
46219820Sjeff#include <complib/cl_types.h>
47219820Sjeff
48219820Sjeff/* ib_api_status_t values above converted to text for easier printing. */
49219820Sjeffconst char *ib_error_str[] = {
50219820Sjeff	"IB_SUCCESS",
51219820Sjeff	"IB_INSUFFICIENT_RESOURCES",
52219820Sjeff	"IB_INSUFFICIENT_MEMORY",
53219820Sjeff	"IB_INVALID_PARAMETER",
54219820Sjeff	"IB_INVALID_SETTING",
55219820Sjeff	"IB_NOT_FOUND",
56219820Sjeff	"IB_TIMEOUT",
57219820Sjeff	"IB_CANCELED",
58219820Sjeff	"IB_INTERRUPTED",
59219820Sjeff	"IB_INVALID_PERMISSION",
60219820Sjeff	"IB_UNSUPPORTED",
61219820Sjeff	"IB_OVERFLOW",
62219820Sjeff	"IB_MAX_MCAST_QPS_REACHED",
63219820Sjeff	"IB_INVALID_QP_STATE",
64219820Sjeff	"IB_INVALID_EEC_STATE",
65219820Sjeff	"IB_INVALID_APM_STATE",
66219820Sjeff	"IB_INVALID_PORT_STATE",
67219820Sjeff	"IB_INVALID_STATE",
68219820Sjeff	"IB_RESOURCE_BUSY",
69219820Sjeff	"IB_INVALID_PKEY",
70219820Sjeff	"IB_INVALID_LKEY",
71219820Sjeff	"IB_INVALID_RKEY",
72219820Sjeff	"IB_INVALID_MAX_WRS",
73219820Sjeff	"IB_INVALID_MAX_SGE",
74219820Sjeff	"IB_INVALID_CQ_SIZE",
75219820Sjeff	"IB_INVALID_SERVICE_TYPE",
76219820Sjeff	"IB_INVALID_GID",
77219820Sjeff	"IB_INVALID_LID",
78219820Sjeff	"IB_INVALID_GUID",
79219820Sjeff	"IB_INVALID_CA_HANDLE",
80219820Sjeff	"IB_INVALID_AV_HANDLE",
81219820Sjeff	"IB_INVALID_CQ_HANDLE",
82219820Sjeff	"IB_INVALID_EEC_HANDLE",
83219820Sjeff	"IB_INVALID_QP_HANDLE",
84219820Sjeff	"IB_INVALID_PD_HANDLE",
85219820Sjeff	"IB_INVALID_MR_HANDLE",
86219820Sjeff	"IB_INVALID_MW_HANDLE",
87219820Sjeff	"IB_INVALID_RDD_HANDLE",
88219820Sjeff	"IB_INVALID_MCAST_HANDLE",
89219820Sjeff	"IB_INVALID_CALLBACK",
90219820Sjeff	"IB_INVALID_AL_HANDLE",
91219820Sjeff	"IB_INVALID_HANDLE",
92219820Sjeff	"IB_ERROR",
93219820Sjeff	"IB_REMOTE_ERROR",	/* Infiniband Access Layer */
94219820Sjeff	"IB_VERBS_PROCESSING_DONE",
95219820Sjeff	"IB_INVALID_WR_TYPE",
96219820Sjeff	"IB_QP_IN_TIMEWAIT",
97219820Sjeff	"IB_EE_IN_TIMEWAIT",
98219820Sjeff	"IB_INVALID_PORT",
99219820Sjeff	"IB_NOT_DONE",
100219820Sjeff	"IB_UNKNOWN_ERROR"
101219820Sjeff};
102219820Sjeff
103219820Sjeff/* ib_async_event_t values above converted to text for easier printing. */
104219820Sjeffconst char *ib_async_event_str[] = {
105219820Sjeff	"IB_AE_SQ_ERROR",
106219820Sjeff	"IB_AE_SQ_DRAINED",
107219820Sjeff	"IB_AE_RQ_ERROR",
108219820Sjeff	"IB_AE_CQ_ERROR",
109219820Sjeff	"IB_AE_QP_FATAL",
110219820Sjeff	"IB_AE_QP_COMM",
111219820Sjeff	"IB_AE_QP_APM",
112219820Sjeff	"IB_AE_EEC_FATAL",
113219820Sjeff	"IB_AE_EEC_COMM",
114219820Sjeff	"IB_AE_EEC_APM",
115219820Sjeff	"IB_AE_LOCAL_FATAL",
116219820Sjeff	"IB_AE_PKEY_TRAP",
117219820Sjeff	"IB_AE_QKEY_TRAP",
118219820Sjeff	"IB_AE_MKEY_TRAP",
119219820Sjeff	"IB_AE_PORT_TRAP",
120219820Sjeff	"IB_AE_SYSIMG_GUID_TRAP",
121219820Sjeff	"IB_AE_BUF_OVERRUN",
122219820Sjeff	"IB_AE_LINK_INTEGRITY",
123219820Sjeff	"IB_AE_FLOW_CTRL_ERROR",
124219820Sjeff	"IB_AE_BKEY_TRAP",
125219820Sjeff	"IB_AE_QP_APM_ERROR",
126219820Sjeff	"IB_AE_EEC_APM_ERROR",
127219820Sjeff	"IB_AE_WQ_REQ_ERROR",
128219820Sjeff	"IB_AE_WQ_ACCESS_ERROR",
129219820Sjeff	"IB_AE_PORT_ACTIVE",	/* ACTIVE STATE */
130219820Sjeff	"IB_AE_PORT_DOWN",	/* INIT", ARMED", DOWN */
131219820Sjeff	"IB_AE_UNKNOWN"
132219820Sjeff};
133219820Sjeff
134219820Sjeffconst char *ib_wc_status_str[] = {
135219820Sjeff	"IB_WCS_SUCCESS",
136219820Sjeff	"IB_WCS_LOCAL_LEN_ERR",
137219820Sjeff	"IB_WCS_LOCAL_OP_ERR",
138219820Sjeff	"IB_WCS_LOCAL_EEC_OP_ERR",
139219820Sjeff	"IB_WCS_LOCAL_PROTECTION_ERR",
140219820Sjeff	"IB_WCS_WR_FLUSHED_ERR",
141219820Sjeff	"IB_WCS_MEM_WINDOW_BIND_ERR",
142219820Sjeff	"IB_WCS_REM_ACCESS_ERR",
143219820Sjeff	"IB_WCS_REM_OP_ERR",
144219820Sjeff	"IB_WCS_RNR_RETRY_ERR",
145219820Sjeff	"IB_WCS_TIMEOUT_RETRY_ERR",
146219820Sjeff	"IB_WCS_REM_INVALID_REQ_ERR",
147219820Sjeff	"IB_WCS_REM_INVALID_RD_REQ_ERR",
148219820Sjeff	"IB_WCS_INVALID_EECN",
149219820Sjeff	"IB_WCS_INVALID_EEC_STATE",
150219820Sjeff	"IB_WCS_UNMATCHED_RESPONSE",	/* InfiniBand Access Layer */
151219820Sjeff	"IB_WCS_CANCELED",	/* InfiniBand Access Layer */
152219820Sjeff	"IB_WCS_UNKNOWN"
153219820Sjeff};
154