[openib-general] [PATCH] OpenSM: Don't obtain PKeyTables on switch when option not supported
Hal Rosenstock
halr at voltaire.com
Thu Nov 3 03:22:31 PST 2005
OpenSM: Don't obtain PKeyTables on switch when partition enforcement
option not supported. Part of patch supplied by Brad Benton
<brad.benton at us.ibm.com>
Signed-off-by: Hal Rosenstock <halr at voltaire.com>
Index: osm_port_info_rcv.c
===================================================================
--- osm_port_info_rcv.c (revision 3942)
+++ osm_port_info_rcv.c (working copy)
@@ -467,6 +467,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 ;
}
More information about the general
mailing list