From 883e98f6cb4f1b6e0345771d29db675eaa4aa88a Mon Sep 17 00:00:00 2001 From: eitan Date: Thu, 3 Nov 2005 13:15:15 +0000 Subject: [PATCH] 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 --- trunk/ulp/opensm/user/opensm/osm_port_info_rcv.c | 5 +++++ 1 file changed, 5 insertions(+) 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 ; } -- 2.41.0