[IBAL] Add PnP event string conversion
authorftillier <ftillier@ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86>
Wed, 17 May 2006 20:24:14 +0000 (20:24 +0000)
committerftillier <ftillier@ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86>
Wed, 17 May 2006 20:24:14 +0000 (20:24 +0000)
Submitted by: Tzachi Dar (tzachid@mellanox.co.il)

git-svn-id: svn://openib.tc.cornell.edu/gen1/trunk@357 ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86

inc/iba/ib_al.h

index 0b77c78..73dc8d9 100644 (file)
@@ -8187,6 +8187,37 @@ typedef uint32_t ib_pnp_event_t;
 *****/\r
 \r
 \r
+AL_INLINE const char* AL_API\r
+ib_get_pnp_event_str(\r
+       IN                              ib_pnp_event_t                          event )\r
+{\r
+       switch( event )\r
+       {\r
+       case IB_PNP_CA_ADD                                      : return "IB_PNP_CA_ADD";\r
+       case IB_PNP_CA_REMOVE                           : return "IB_PNP_CA_REMOVE";\r
+       case IB_PNP_PORT_ADD                            : return "IB_PNP_PORT_ADD";\r
+       case IB_PNP_PORT_REMOVE                         : return "IB_PNP_PORT_REMOVE";\r
+       case IB_PNP_PORT_INIT                           : return "IB_PNP_PORT_INIT";\r
+       case IB_PNP_PORT_ARMED                          : return "IB_PNP_PORT_ARMED";\r
+       case IB_PNP_PORT_ACTIVE                         : return "IB_PNP_PORT_ACTIVE";\r
+       case IB_PNP_PORT_DOWN                           : return "IB_PNP_PORT_DOWN";\r
+       case IB_PNP_PKEY_CHANGE                         : return "IB_PNP_PKEY_CHANGE";\r
+       case IB_PNP_SM_CHANGE                           : return "IB_PNP_SM_CHANGE";\r
+       case IB_PNP_GID_CHANGE                          : return "IB_PNP_GID_CHANGE";\r
+       case IB_PNP_LID_CHANGE                          : return "IB_PNP_LID_CHANGE";\r
+       case IB_PNP_SUBNET_TIMEOUT_CHANGE       : return "IB_PNP_SUBNET_TIMEOUT_CHANGE";\r
+       case IB_PNP_IOU_ADD                                     : return "IB_PNP_IOU_ADD";\r
+       case IB_PNP_IOU_REMOVE                          : return "IB_PNP_IOU_REMOVE";\r
+       case IB_PNP_IOC_ADD                                     : return "IB_PNP_IOC_ADD";\r
+       case IB_PNP_IOC_REMOVE                          : return "IB_PNP_IOC_REMOVE";\r
+       case IB_PNP_IOC_PATH_ADD                        : return "IB_PNP_IOC_PATH_ADD";\r
+       case IB_PNP_IOC_PATH_REMOVE                     : return "IB_PNP_IOC_PATH_REMOVE";\r
+       case IB_PNP_REG_COMPLETE                        : return "IB_PNP_REG_COMPLETE";\r
+       }\r
+       return "Unknown";\r
+}\r
+\r
+\r
 /****s* Access Layer/ib_pnp_rec_t\r
 * NAME\r
 *      ib_pnp_rec_t\r