public inbox for linux-rdma@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] osm_port_info_rcv.c Issue a log message if we cannot read the MKey of a port
@ 2013-08-14 10:26 Line Holen
  2013-08-16 13:47 ` Hal Rosenstock
  2013-08-26 12:08 ` Hal Rosenstock
  0 siblings, 2 replies; 6+ messages in thread
From: Line Holen @ 2013-08-14 10:26 UTC (permalink / raw)
  To: hal-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb; +Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA

Signed-off-by: Line Holen <Line.Holen-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>

---

diff --git a/opensm/osm_port_info_rcv.c b/opensm/osm_port_info_rcv.c
index 7dcd15e..961b376 100644
--- a/opensm/osm_port_info_rcv.c
+++ b/opensm/osm_port_info_rcv.c
@@ -85,7 +85,7 @@ static void pi_rcv_process_endport(IN osm_sm_t * sm, IN osm_physp_t * p_physp,
 	osm_madw_context_t context;
 	ib_api_status_t status;
 	ib_net64_t port_guid;
-	uint8_t rate, mtu;
+	uint8_t rate, mtu, mpb;
 	unsigned data_vls;
 	cl_qmap_t *p_sm_tbl;
 	osm_remote_sm_t *p_sm;
@@ -126,6 +126,14 @@ static void pi_rcv_process_endport(IN osm_sm_t * sm, IN osm_physp_t * p_physp,
 		}
 	}
 
+	/* Check M_Key vs M_Key protect, can we control the port ? */
+	mpb = ib_port_info_get_mpb(p_pi);
+	if (mpb > 0 && p_pi->m_key == 0) {
+		OSM_LOG(sm->p_log, OSM_LOG_INFO,
+			"Port 0x%" PRIx64 " has unknown M_Key, protection level %u\n",
+			cl_ntoh64(port_guid), mpb);
+	}
+
 	if (port_guid != sm->p_subn->sm_port_guid) {
 		p_sm_tbl = &sm->p_subn->sm_guid_tbl;
 		if (p_pi->capability_mask & IB_PORT_CAP_IS_SM) {
--
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] 6+ messages in thread

end of thread, other threads:[~2013-08-26 12:08 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-08-14 10:26 [PATCH] osm_port_info_rcv.c Issue a log message if we cannot read the MKey of a port Line Holen
2013-08-16 13:47 ` Hal Rosenstock
     [not found]   ` <520E2D86.6080903-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org>
2013-08-19 10:46     ` Line Holen
     [not found]       ` <5211F76C.6020501-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
2013-08-20 12:59         ` Hal Rosenstock
     [not found]           ` <52136823.8010104-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org>
2013-08-26 10:54             ` Line Holen
2013-08-26 12:08 ` Hal Rosenstock

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox