On Thu, 2006-03-30 at 03:33, Eitan Zahavi wrote: > I would rather have the PartitionManager inspect the IB attributes > defining the port P_Key table length then change the pre-allocation of > PKey entry. Even if this does not break anything.
Can you state the reason for this preference ? > So I propose the partition manager inspect: > NodeInfo.PartitionCap - for Switch Port 0, HCA and Router) Endports need a partition table of at least 1 entry so this is not an issue for these, right ? > SwitchInfo.PartitionEnforcementCap - for Switch Extarnal ports These are the only ones which have the issue. Do you have a patch for this approach ? -- Hal > Eitan Zahavi > Design Technology Director > Mellanox Technologies LTD > Tel:+972-4-9097208 > Fax:+972-4-9593245 > P.O. Box 586 Yokneam 20692 ISRAEL > > > > -----Original Message----- > > From: [EMAIL PROTECTED] [mailto:openib-general- > > [EMAIL PROTECTED] On Behalf Of Rolf Manderscheid > > Sent: Thursday, March 30, 2006 1:55 AM > > To: [EMAIL PROTECTED] > > Cc: [email protected] > > Subject: [openib-general] [PATCH] opensm: observe > PartitionEnforcementCap ofzero > > > > Hi Hal, > > > > opensm attempts to set pkey table entries on external switch ports > > even if the switch declares a PartitionEnforcementCap of zero. The > > consequence is ERR 4108. > > > > The decision to set the block is based on the size of the > > pkeys->blocks vector, which is initialized to one. There is a > > comment that claims there must be a pre-allocated block in said vector > > "for the sake of empty table test", but I can't see why it's > > necessary. Is this comment wrong or am I missing something? > > > > The vector size grows, if necessary, when processing the response from > > a SubnGet(PKeyTable). The query happens during a sweep after > > obtaining the portinfo, and the query code is careful to observe the > > partition cap. All this means that the vector size can still be used > > to decide whether to do the set provided the vector size starts out at > > zero. So, the patch below just initializes the vector to size zero > > and removes the code that inserts the pre-allocated block. > > > > Rolf > > > > Index: osm_pkey.c > > =================================================================== > > --- osm_pkey.c (revision 5971) > > +++ osm_pkey.c (working copy) > > @@ -91,21 +91,7 @@ > > int osm_pkey_tbl_init( > > IN osm_pkey_tbl_t *p_pkey_tbl) > > { > > - ib_pkey_table_t *p_pkey_block; > > - /* > > - we always need one block to be pre-allocated for the sake of > > - empty table test > > - */ > > - cl_ptr_vector_init( &p_pkey_tbl->blocks, 1, 1); > > - p_pkey_block = (ib_pkey_table_t > *)cl_zalloc(sizeof(ib_pkey_table_t)); > > - if (! p_pkey_block) > > - { > > - return(IB_ERROR); > > - } > > - > > - cl_ptr_vector_set(&p_pkey_tbl->blocks, 0, p_pkey_block); > > - > > - /* deal with the map */ > > + cl_ptr_vector_init( &p_pkey_tbl->blocks, 0, 1); > > cl_map_init( &p_pkey_tbl->keys, 1 ); > > return(IB_SUCCESS); > > } > > _______________________________________________ > > openib-general mailing list > > [email protected] > > http://openib.org/mailman/listinfo/openib-general > > > > To unsubscribe, please visit > http://openib.org/mailman/listinfo/openib-general _______________________________________________ openib-general mailing list [email protected] http://openib.org/mailman/listinfo/openib-general To unsubscribe, please visit http://openib.org/mailman/listinfo/openib-general
