[ofa-general] [PATCH] osm: TrapRepress was failing for mkey != 0

Yevgeny Kliteynik kliteyn at dev.mellanox.co.il
Mon Sep 17 12:09:55 PDT 2007


TrapRepress always had mkey 0, which was copied from trap
notice's mkey (which is always 0).
As a result, TrapRepress was failing for port with mkey != 0

Signed-off-by: Yevgeny Kliteynik <kliteyn at dev.mellanox.co.il>
---
 opensm/opensm/osm_trap_rcv.c |   10 ++++++++++
 1 files changed, 10 insertions(+), 0 deletions(-)

diff --git a/opensm/opensm/osm_trap_rcv.c b/opensm/opensm/osm_trap_rcv.c
index 3323a83..9c28005 100644
--- a/opensm/opensm/osm_trap_rcv.c
+++ b/opensm/opensm/osm_trap_rcv.c
@@ -439,6 +439,16 @@ __osm_trap_rcv_process_request(IN osm_trap_rcv_t * const p_rcv,

 	osm_dump_notice(p_rcv->p_log, p_ntci, OSM_LOG_VERBOSE);

+	p_physp = osm_get_physp_by_mad_addr(p_rcv->p_log,
+					    p_rcv->p_subn,
+					    &tmp_madw.mad_addr);
+	if (p_physp)
+		p_smp->m_key = p_physp->port_info.m_key;
+	else
+		osm_log(p_rcv->p_log, OSM_LOG_ERROR,
+			"__osm_trap_rcv_process_request: ERR 3809: "
+			"Failed to find source physical port for trap\n");
+
 	status = osm_resp_send(p_rcv->p_resp, &tmp_madw, 0, payload);
 	if (status != IB_SUCCESS) {
 		osm_log(p_rcv->p_log, OSM_LOG_ERROR,
-- 
1.5.1.4





More information about the general mailing list