All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] opensm/osm_trap_rcv.c: Add better logging for traps 257 and 258
@ 2012-07-25 10:39 Hal Rosenstock
       [not found] ` <500FCCE8.6020703-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org>
  0 siblings, 1 reply; 2+ messages in thread
From: Hal Rosenstock @ 2012-07-25 10:39 UTC (permalink / raw)
  To: Alex Netes,
	linux-rdma (linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org)


More logging for Bad P_Key (trap 257) and Bad Q_Key (trap 258)

Signed-off-by: Hal Rosenstock <hal-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
---
diff --git a/opensm/osm_trap_rcv.c b/opensm/osm_trap_rcv.c
index e90ad5e..cb7c8ce 100644
--- a/opensm/osm_trap_rcv.c
+++ b/opensm/osm_trap_rcv.c
@@ -268,6 +268,20 @@ static void log_trap_info(osm_log_t *p_log, ib_mad_notice_attr_t *p_ntci,
 			cl_ntoh32(ib_notice_get_prod_type(p_ntci)),
 			ib_get_producer_type_str(ib_notice_get_prod_type(p_ntci)),
 			cl_hton16(source_lid), str, cl_ntoh64(trans_id));
+		if ((p_ntci->g_or_v.generic.trap_num == CL_HTON16(257)) ||
+		    (p_ntci->g_or_v.generic.trap_num == CL_HTON16(258))) {
+			OSM_LOG(p_log, OSM_LOG_ERROR,
+				"Bad %s_Key:0x%x on SL:%d from "
+				"LID1:%u QP1:0x%x to "
+				"LID2:%u QP2:0x%x\n",
+				(p_ntci->g_or_v.generic.trap_num == CL_HTON16(257)) ? "P" : "Q",
+				cl_ntoh32(p_ntci->data_details.ntc_257_258.key),
+				cl_ntoh32(p_ntci->data_details.ntc_257_258.qp1) >> 28,
+				cl_ntoh16(p_ntci->data_details.ntc_257_258.lid1),
+				cl_ntoh32(p_ntci->data_details.ntc_257_258.qp1) & 0xfff,
+				cl_ntoh16(p_ntci->data_details.ntc_257_258.lid2),
+				cl_ntoh32(p_ntci->data_details.ntc_257_258.qp2));
+		}
 	} else
 		OSM_LOG(p_log, OSM_LOG_ERROR,
 			"Received Vendor Notice type:%u vend:0x%06X "
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] opensm/osm_trap_rcv.c: Add better logging for traps 257 and 258
       [not found] ` <500FCCE8.6020703-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org>
@ 2012-07-30  7:03   ` Alex Netes
  0 siblings, 0 replies; 2+ messages in thread
From: Alex Netes @ 2012-07-30  7:03 UTC (permalink / raw)
  To: Hal Rosenstock
  Cc: linux-rdma (linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org)

Hi Hal,

On 06:39 Wed 25 Jul     , Hal Rosenstock wrote:
> 
> More logging for Bad P_Key (trap 257) and Bad Q_Key (trap 258)
> 
> Signed-off-by: Hal Rosenstock <hal-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
> ---

Applied, thanks
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2012-07-30  7:03 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-07-25 10:39 [PATCH] opensm/osm_trap_rcv.c: Add better logging for traps 257 and 258 Hal Rosenstock
     [not found] ` <500FCCE8.6020703-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org>
2012-07-30  7:03   ` Alex Netes

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.