From: eitan Date: Thu, 3 Nov 2005 13:15:15 +0000 (+0000) Subject: OpenSM: Don't obtain PKeyTables on switch when partition enforcement X-Git-Url: https://openfabrics.org/gitweb/?a=commitdiff_plain;h=883e98f6cb4f1b6e0345771d29db675eaa4aa88a;p=~shefty%2Frdma-win.git OpenSM: Don't obtain PKeyTables on switch when partition enforcement option not supported. Part of patch supplied by Brad Benton git-svn-id: svn://openib.tc.cornell.edu/gen1@143 ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86 --- diff --git a/trunk/ulp/opensm/user/opensm/osm_port_info_rcv.c b/trunk/ulp/opensm/user/opensm/osm_port_info_rcv.c index 5ae9b7fe..8ca5b321 100644 --- a/trunk/ulp/opensm/user/opensm/osm_port_info_rcv.c +++ b/trunk/ulp/opensm/user/opensm/osm_port_info_rcv.c @@ -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 ; }