[openib-general] [PATCH] osm: fix num of blocks of GUIDInfo GetTable query

Eitan Zahavi eitan at mellanox.co.il
Thu Jun 8 04:24:03 PDT 2006


Hi Hal

I'm working on passing osmtest check. Found a bug in the new
GUIDInfoRecord query: If you had a physical port with zero guid_cap
the code would loop on blocks 0..255 instead of trying the next port.

I am still looking for why we might have a guid_cap == 0 on some
ports.

This patch resolves this new problem. osmtest passes on some arbitrary
networks.

Eitan

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

Index: opensm/osm_sa_guidinfo_record.c
===================================================================
--- opensm/osm_sa_guidinfo_record.c	(revision 7703)
+++ opensm/osm_sa_guidinfo_record.c	(working copy)
@@ -255,6 +255,10 @@ __osm_sa_gir_create_gir(
       continue;
 
     p_pi = osm_physp_get_port_info_ptr( p_physp );
+
+    if ( p_pi->guid_cap == 0 )  
+      continue;
+
     num_blocks = p_pi->guid_cap / 8;
     if ( p_pi->guid_cap % 8 )
       num_blocks++;





More information about the general mailing list