[ofa-general] [PATCH] opensm: sminfo self query check

Sasha Khapyorsky sashak at voltaire.com
Thu May 31 13:45:24 PDT 2007


OpenSM can query itself for SMInfo because it is just legal, or
occasionally due to port moving during subnet discovery process.
Don't create remote SM entry in this case in order to prevent
deadlocks.

Signed-off-by: Sasha Khapyorsky <sashak at voltaire.com>
---
 opensm/opensm/osm_sminfo_rcv.c |    9 +++++++++
 1 files changed, 9 insertions(+), 0 deletions(-)

diff --git a/opensm/opensm/osm_sminfo_rcv.c b/opensm/opensm/osm_sminfo_rcv.c
index 776c70b..99a716e 100644
--- a/opensm/opensm/osm_sminfo_rcv.c
+++ b/opensm/opensm/osm_sminfo_rcv.c
@@ -632,6 +632,15 @@ __osm_sminfo_rcv_process_get_response(
     goto Exit;
   }
 
+  if( port_guid == p_rcv->p_subn->sm_port_guid )
+  {
+    osm_log( p_rcv->p_log, OSM_LOG_VERBOSE,
+             "__osm_sminfo_rcv_process_get_response: "
+             "Self query response received - SM port 0x%016" PRIx64 "\n",
+             cl_ntoh64( port_guid ) );
+    goto Exit;
+  }
+
   p_sm = (osm_remote_sm_t*)cl_qmap_get( p_sm_tbl, port_guid );
   if( p_sm == (osm_remote_sm_t*)cl_qmap_end( p_sm_tbl ) )
   {
-- 
1.5.2.171.gf509




More information about the general mailing list