[openib-general] [PATCH] osm: OpenSM exits on PathRecord query with zero LID

Eitan Zahavi eitan at mellanox.co.il
Wed Dec 6 02:21:22 PST 2006


Hi Hal,

This is another catch from the nightly simulator based regression.
Simple: if OpenSM gets a PathRecord that eventually maps into a port 
with zero LID (either SRC or DST)
if just asserts (in debug mode) on getting the LFT.

The following patch catches this error.

EZ

Signed-off-by:  Eitan Zahavi <eitan at mellanox.co.il>

Index: opensm/osm_sa_path_record.c
===================================================================
--- opensm/osm_sa_path_record.c    (revision 10188)
+++ opensm/osm_sa_path_record.c    (working copy)
@@ -976,6 +976,22 @@ __osm_pr_rcv_get_port_pair_paths(
                                &src_lid_max_ho );
   }
 
+  if ( src_lid_min_ho == 0 )
+  {
+    osm_log( p_rcv->p_log, OSM_LOG_ERROR,
+             "__osm_pr_rcv_get_port_pair_paths: ERR 1F20:"
+             "Obtained zero source LID. No such LID possible.\n");
+     goto Exit;
+  }
+
+  if ( dest_lid_min_ho == 0 )
+  {
+    osm_log( p_rcv->p_log, OSM_LOG_ERROR,
+             "__osm_pr_rcv_get_port_pair_paths: ERR 1F21:"
+             "Obtained zero destination LID. No such LID possible.\n");
+     goto Exit;
+  }
+
   if( osm_log_is_active( p_rcv->p_log, OSM_LOG_DEBUG ) )
   {
     osm_log( p_rcv->p_log, OSM_LOG_DEBUG,





More information about the general mailing list