OpenSM: Don't obtain PKeyTables on switch when partition enforcement
authoreitan <eitan@ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86>
Thu, 3 Nov 2005 13:15:15 +0000 (13:15 +0000)
committereitan <eitan@ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86>
Thu, 3 Nov 2005 13:15:15 +0000 (13:15 +0000)
option not supported. Part of patch supplied by Brad Benton
<brad.benton@us.ibm.com>

git-svn-id: svn://openib.tc.cornell.edu/gen1/trunk@143 ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86

ulp/opensm/user/opensm/osm_port_info_rcv.c

index 5ae9b7f..8ca5b32 100644 (file)
@@ -442,6 +442,11 @@ void osm_pkey_get_tables(
                cl_ntoh64(p_node->node_info.node_guid) );
       goto Exit;
     }
+
+    /* bail out if this is a switch with no partition enforcement capability */
+    if (cl_ntoh16(p_switch->switch_info.enforce_cap) == 0)
+      goto Exit;
+
     max_blocks = (cl_ntoh16(p_switch->switch_info.enforce_cap)+IB_NUM_PKEY_ELEMENTS_IN_BLOCK -1)
       / IB_NUM_PKEY_ELEMENTS_IN_BLOCK ;
   }