IB/mad: Add MAD error codes from IBA spec
authorSwapna Thete <swapna.thete@qlogic.com>
Sun, 26 Feb 2012 01:47:31 +0000 (17:47 -0800)
committerRoland Dreier <roland@purestorage.com>
Sun, 26 Feb 2012 01:47:31 +0000 (17:47 -0800)
Add defines for MAD error codes so that they can be used when
returning error responses.

Signed-off-by: Swapna Thete <swapna.thete@qlogic.com>
Signed-off-by: Roland Dreier <roland@purestorage.com>
include/rdma/ib_mad.h

index d3b9401b77b025d19c9ddfb1e5818d87ec88b2da..b513f57e172544d29edf6acec9479f4e7af679dc 100644 (file)
 
 #define IB_MGMT_MAX_METHODS                    128
 
+/* MAD Status field bit masks */
+#define IB_MGMT_MAD_STATUS_SUCCESS                     0x0000
+#define IB_MGMT_MAD_STATUS_BUSY                                0x0001
+#define IB_MGMT_MAD_STATUS_REDIRECT_REQD               0x0002
+#define IB_MGMT_MAD_STATUS_BAD_VERSION                 0x0004
+#define IB_MGMT_MAD_STATUS_UNSUPPORTED_METHOD          0x0008
+#define IB_MGMT_MAD_STATUS_UNSUPPORTED_METHOD_ATTRIB   0x000c
+#define IB_MGMT_MAD_STATUS_INVALID_ATTRIB_VALUE                0x001c
+
 /* RMPP information */
 #define IB_MGMT_RMPP_VERSION                   1