[openib-general] [PATCH][MINOR]OpenSM/osm_trap_rcv.c:

Hal Rosenstock halr at voltaire.com
Fri Jul 7 10:32:15 PDT 2006


OpenSM/osm_trap_rcv.c: In __osm_trap_rcv_process_request, display port
number for SM traps 129-131

Signed-off-by: Hal Rosenstock <halr at voltaire.com>

Index: opensm/osm_trap_rcv.c
===================================================================
--- opensm/osm_trap_rcv.c	(revision 8447)
+++ opensm/osm_trap_rcv.c	(working copy)
@@ -399,16 +399,35 @@ __osm_trap_rcv_process_request(
     /* Print some info about the incoming Trap */
     if (ib_notice_is_generic(p_ntci))
     {
-      osm_log( p_rcv->p_log, OSM_LOG_ERROR,
-               "__osm_trap_rcv_process_request: "
-               "Received Generic Notice type:0x%02X num:%u Producer:%u "
-               "from LID:0x%04X TID:0x%016" PRIx64 "\n",
-               ib_notice_get_type(p_ntci),
-               cl_ntoh16(p_ntci->g_or_v.generic.trap_num),
-               cl_ntoh32(ib_notice_get_prod_type(p_ntci)),
-               cl_hton16(source_lid),
-               cl_ntoh64(p_smp->trans_id)
-               );
+      if ((p_ntci->g_or_v.generic.trap_num == CL_HTON16(129)) ||
+           (p_ntci->g_or_v.generic.trap_num == CL_HTON16(130)) ||
+           (p_ntci->g_or_v.generic.trap_num == CL_HTON16(131)))
+      {
+        osm_log( p_rcv->p_log, OSM_LOG_ERROR,
+                 "__osm_trap_rcv_process_request: "
+                 "Received Generic Notice type:0x%02X num:%u Producer:%u "
+                 "from LID:0x%04X Port %d TID:0x%016" PRIx64 "\n",
+                 ib_notice_get_type(p_ntci),
+                 cl_ntoh16(p_ntci->g_or_v.generic.trap_num),
+                 cl_ntoh32(ib_notice_get_prod_type(p_ntci)),
+                 cl_hton16(source_lid),
+                 p_ntci->data_details.ntc_129_131.port_num,
+                 cl_ntoh64(p_smp->trans_id)
+                 );
+      }
+      else
+      {
+        osm_log( p_rcv->p_log, OSM_LOG_ERROR,
+                 "__osm_trap_rcv_process_request: "
+                 "Received Generic Notice type:0x%02X num:%u Producer:%u "
+                 "from LID:0x%04X TID:0x%016" PRIx64 "\n",
+                 ib_notice_get_type(p_ntci),
+                 cl_ntoh16(p_ntci->g_or_v.generic.trap_num),
+                 cl_ntoh32(ib_notice_get_prod_type(p_ntci)),
+                 cl_hton16(source_lid),
+                 cl_ntoh64(p_smp->trans_id)
+                 );
+      }
     }
     else
     {








More information about the general mailing list