\r
\r
/* ib_api_status_t values above converted to text for easier printing. */\r
-const char* ib_error_str[] =\r
+static const char* const __ib_error_str[] =\r
{\r
"IB_SUCCESS",\r
"IB_INSUFFICIENT_RESOURCES",\r
"IB_NO_MATCH",\r
"IB_PENDING",\r
"IB_UNKNOWN_ERROR"\r
-\r
};\r
\r
\r
{\r
if( status > IB_UNKNOWN_ERROR )\r
status = IB_UNKNOWN_ERROR;\r
- return( ib_error_str[status] );\r
+ return( __ib_error_str[status] );\r
}\r
\r
\r
/* ib_async_event_t values above converted to text for easier printing. */\r
-const char* ib_async_event_str[] =\r
+static const char* const __ib_async_event_str[] =\r
{\r
+ "IB_AE_DUMMY", /*place holder*/\r
"IB_AE_SQ_ERROR",\r
"IB_AE_SQ_DRAINED",\r
"IB_AE_RQ_ERROR",\r
"IB_AE_PORT_ACTIVE", /* ACTIVE STATE */\r
"IB_AE_PORT_DOWN", /* INIT", ARMED", DOWN */\r
"IB_AE_UNKNOWN"\r
-\r
};\r
\r
\r
{\r
if( event > IB_AE_UNKNOWN )\r
event = IB_AE_UNKNOWN;\r
- return( ib_async_event_str[event] );\r
+ return( __ib_async_event_str[event] );\r
}\r
\r
\r
-const char* ib_wc_status_str[] =\r
+static const char* const __ib_wc_status_str[] =\r
{\r
"IB_WCS_SUCCESS",\r
"IB_WCS_LOCAL_LEN_ERR",\r
"IB_WCS_UNMATCHED_RESPONSE", /* InfiniBand Access Layer */\r
"IB_WCS_CANCELED", /* InfiniBand Access Layer */\r
"IB_WCS_UNKNOWN"\r
-\r
};\r
\r
\r
{\r
if( wc_status > IB_WCS_UNKNOWN )\r
wc_status = IB_WCS_UNKNOWN;\r
- return( ib_wc_status_str[wc_status] );\r
+ return( __ib_wc_status_str[wc_status] );\r
}\r
\r
\r
-const char *ib_wc_type_str[] = {\r
+static const char* const __ib_wc_type_str[] =\r
+{\r
"IB_WC_SEND",\r
"IB_WC_RDMA_WRITE",\r
"IB_WC_RECV",\r
{\r
if( wc_type > IB_WC_UNKNOWN )\r
wc_type = IB_WC_UNKNOWN;\r
- return( ib_wc_type_str[wc_type] );\r
+ return( __ib_wc_type_str[wc_type] );\r
}\r
+\r
+\r
+static const char* const __ib_wr_type_str[] =\r
+{\r
+ "WR_SEND",\r
+ "WR_RDMA_WRITE",\r
+ "WR_RDMA_READ",\r
+ "WR_COMPARE_SWAP",\r
+ "WR_FETCH_ADD",\r
+ "WR_UNKNOWN"\r
+};\r
+\r
+\r
+const char* \r
+ib_get_wr_type_str(\r
+ IN uint8_t wr_type )\r
+{\r
+ if( wr_type > WR_UNKNOWN )\r
+ wr_type = WR_UNKNOWN;\r
+ return( __ib_wr_type_str[wr_type] );\r
+}\r
+\r
}\r
/*\r
* PARAMETERS\r
-* node_type\r
+* port_state\r
* [in] Encoded port state as returned in the PortInfo attribute.\r
\r
* RETURN VALUES\r
WR_RDMA_WRITE,\r
WR_RDMA_READ,\r
WR_COMPARE_SWAP,\r
- WR_FETCH_ADD\r
+ WR_FETCH_ADD,\r
+ WR_UNKNOWN\r
\r
} ib_wr_type_t;\r
/*****/\r
\r
\r
+/****f* IBA Base: Types/ib_get_wr_type_str\r
+* NAME\r
+* ib_get_wr_type_str\r
+*\r
+* DESCRIPTION\r
+* Returns a string for the specified work request type\r
+*\r
+* SYNOPSIS\r
+*/\r
+AL_EXPORT const char* AL_API\r
+ib_get_wr_type_str(\r
+ IN uint8_t wr_type );\r
+\r
+/*\r
+* PARAMETERS\r
+* wr_type\r
+* [in] Encoded work request type as defined in the\r
+work request attribute.\r
+\r
+* RETURN VALUES\r
+* Pointer to the work request type string.\r
+*\r
+* NOTES\r
+*\r
+* SEE ALSO\r
+* ib_wr_type_t\r
+*********/\r
+\r
+\r
/****s* Access Layer/ib_local_ds_t\r
* NAME\r
* ib_local_ds_t\r