xref: /freebsd/contrib/ofed/opensm/complib/ib_statustext.c (revision f7c32ed617858bcd22f8d1b03199099d50125721)
1 /*
2  * Copyright (c) 2004, 2005 Voltaire, Inc. All rights reserved.
3  * Copyright (c) 2002-2005 Mellanox Technologies LTD. All rights reserved.
4  * Copyright (c) 1996-2003 Intel Corporation. All rights reserved.
5  *
6  * This software is available to you under a choice of one of two
7  * licenses.  You may choose to be licensed under the terms of the GNU
8  * General Public License (GPL) Version 2, available from the file
9  * COPYING in the main directory of this source tree, or the
10  * OpenIB.org BSD license below:
11  *
12  *     Redistribution and use in source and binary forms, with or
13  *     without modification, are permitted provided that the following
14  *     conditions are met:
15  *
16  *      - Redistributions of source code must retain the above
17  *        copyright notice, this list of conditions and the following
18  *        disclaimer.
19  *
20  *      - Redistributions in binary form must reproduce the above
21  *        copyright notice, this list of conditions and the following
22  *        disclaimer in the documentation and/or other materials
23  *        provided with the distribution.
24  *
25  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
26  * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
27  * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
28  * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
29  * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
30  * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
31  * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
32  * SOFTWARE.
33  *
34  */
35 
36 /*
37  * Abstract:
38  *	Defines string to decode ib_api_status_t return values.
39  *
40  */
41 
42 #if HAVE_CONFIG_H
43 #  include <config.h>
44 #endif				/* HAVE_CONFIG_H */
45 
46 #include <complib/cl_types.h>
47 
48 /* ib_api_status_t values above converted to text for easier printing. */
49 const char *ib_error_str[] = {
50 	"IB_SUCCESS",
51 	"IB_INSUFFICIENT_RESOURCES",
52 	"IB_INSUFFICIENT_MEMORY",
53 	"IB_INVALID_PARAMETER",
54 	"IB_INVALID_SETTING",
55 	"IB_NOT_FOUND",
56 	"IB_TIMEOUT",
57 	"IB_CANCELED",
58 	"IB_INTERRUPTED",
59 	"IB_INVALID_PERMISSION",
60 	"IB_UNSUPPORTED",
61 	"IB_OVERFLOW",
62 	"IB_MAX_MCAST_QPS_REACHED",
63 	"IB_INVALID_QP_STATE",
64 	"IB_INVALID_EEC_STATE",
65 	"IB_INVALID_APM_STATE",
66 	"IB_INVALID_PORT_STATE",
67 	"IB_INVALID_STATE",
68 	"IB_RESOURCE_BUSY",
69 	"IB_INVALID_PKEY",
70 	"IB_INVALID_LKEY",
71 	"IB_INVALID_RKEY",
72 	"IB_INVALID_MAX_WRS",
73 	"IB_INVALID_MAX_SGE",
74 	"IB_INVALID_CQ_SIZE",
75 	"IB_INVALID_SERVICE_TYPE",
76 	"IB_INVALID_GID",
77 	"IB_INVALID_LID",
78 	"IB_INVALID_GUID",
79 	"IB_INVALID_CA_HANDLE",
80 	"IB_INVALID_AV_HANDLE",
81 	"IB_INVALID_CQ_HANDLE",
82 	"IB_INVALID_EEC_HANDLE",
83 	"IB_INVALID_QP_HANDLE",
84 	"IB_INVALID_PD_HANDLE",
85 	"IB_INVALID_MR_HANDLE",
86 	"IB_INVALID_MW_HANDLE",
87 	"IB_INVALID_RDD_HANDLE",
88 	"IB_INVALID_MCAST_HANDLE",
89 	"IB_INVALID_CALLBACK",
90 	"IB_INVALID_AL_HANDLE",
91 	"IB_INVALID_HANDLE",
92 	"IB_ERROR",
93 	"IB_REMOTE_ERROR",	/* Infiniband Access Layer */
94 	"IB_VERBS_PROCESSING_DONE",
95 	"IB_INVALID_WR_TYPE",
96 	"IB_QP_IN_TIMEWAIT",
97 	"IB_EE_IN_TIMEWAIT",
98 	"IB_INVALID_PORT",
99 	"IB_NOT_DONE",
100 	"IB_UNKNOWN_ERROR"
101 };
102 
103 /* ib_async_event_t values above converted to text for easier printing. */
104 const char *ib_async_event_str[] = {
105 	"IB_AE_SQ_ERROR",
106 	"IB_AE_SQ_DRAINED",
107 	"IB_AE_RQ_ERROR",
108 	"IB_AE_CQ_ERROR",
109 	"IB_AE_QP_FATAL",
110 	"IB_AE_QP_COMM",
111 	"IB_AE_QP_APM",
112 	"IB_AE_EEC_FATAL",
113 	"IB_AE_EEC_COMM",
114 	"IB_AE_EEC_APM",
115 	"IB_AE_LOCAL_FATAL",
116 	"IB_AE_PKEY_TRAP",
117 	"IB_AE_QKEY_TRAP",
118 	"IB_AE_MKEY_TRAP",
119 	"IB_AE_PORT_TRAP",
120 	"IB_AE_SYSIMG_GUID_TRAP",
121 	"IB_AE_BUF_OVERRUN",
122 	"IB_AE_LINK_INTEGRITY",
123 	"IB_AE_FLOW_CTRL_ERROR",
124 	"IB_AE_BKEY_TRAP",
125 	"IB_AE_QP_APM_ERROR",
126 	"IB_AE_EEC_APM_ERROR",
127 	"IB_AE_WQ_REQ_ERROR",
128 	"IB_AE_WQ_ACCESS_ERROR",
129 	"IB_AE_PORT_ACTIVE",	/* ACTIVE STATE */
130 	"IB_AE_PORT_DOWN",	/* INIT", ARMED", DOWN */
131 	"IB_AE_UNKNOWN"
132 };
133 
134 const char *ib_wc_status_str[] = {
135 	"IB_WCS_SUCCESS",
136 	"IB_WCS_LOCAL_LEN_ERR",
137 	"IB_WCS_LOCAL_OP_ERR",
138 	"IB_WCS_LOCAL_EEC_OP_ERR",
139 	"IB_WCS_LOCAL_PROTECTION_ERR",
140 	"IB_WCS_WR_FLUSHED_ERR",
141 	"IB_WCS_MEM_WINDOW_BIND_ERR",
142 	"IB_WCS_REM_ACCESS_ERR",
143 	"IB_WCS_REM_OP_ERR",
144 	"IB_WCS_RNR_RETRY_ERR",
145 	"IB_WCS_TIMEOUT_RETRY_ERR",
146 	"IB_WCS_REM_INVALID_REQ_ERR",
147 	"IB_WCS_REM_INVALID_RD_REQ_ERR",
148 	"IB_WCS_INVALID_EECN",
149 	"IB_WCS_INVALID_EEC_STATE",
150 	"IB_WCS_UNMATCHED_RESPONSE",	/* InfiniBand Access Layer */
151 	"IB_WCS_CANCELED",	/* InfiniBand Access Layer */
152 	"IB_WCS_UNKNOWN"
153 };
154