[openib-general] Re: [PATCH] opensm: observe PartitionEnforcementCap of zero

Sasha Khapyorsky sashak at voltaire.com
Thu Mar 30 09:31:20 PST 2006


On 12:20 Thu 30 Mar     , Hal Rosenstock wrote:
> > 
> > > Also, is PortInfo:PartitionEnforcementInbound/Outbound set properly (0)
> > > for these ports which don't support partition enforcement ? (That might
> > > be another issue).
> > 
> > Partititon manager will try to update PortInfo in this case too. I don't
> > know could it hurt anything or not, but it is obviously unnecessary
> > action. There is the patch.
> > 
> > Sasha.
> > 
> > 
> > Check Partition Enfocement capabilities before switch external ports'
> > pkey tables update and partiton enforcement.
> > 
> > Signed-off-by: Sasha Khapyorsky <sashak at voltaire.com>
> > ---
> > 
> >  osm/opensm/osm_pkey_mgr.c |   10 ++++++++++
> >  1 files changed, 10 insertions(+), 0 deletions(-)
> > 
> > diff --git a/osm/opensm/osm_pkey_mgr.c b/osm/opensm/osm_pkey_mgr.c
> > index 28b475c..577fcc6 100644
> > --- a/osm/opensm/osm_pkey_mgr.c
> > +++ b/osm/opensm/osm_pkey_mgr.c
> > @@ -55,6 +55,7 @@
> >  #include <complib/cl_qmap.h>
> >  #include <complib/cl_debug.h>
> >  #include <opensm/osm_node.h>
> > +#include <opensm/osm_switch.h>
> >  #include <opensm/osm_pkey_mgr.h>
> >  #include <opensm/osm_partition.h>
> >  
> > @@ -325,6 +326,15 @@ osm_pkey_mgr_update_peer_port(
> >     p_node = osm_physp_get_node_ptr( peer );
> >     if ( osm_node_get_type( p_node ) == IB_NODE_TYPE_CA )
> >        return;
> > +   else if ( osm_node_get_type( p_node ) == IB_NODE_TYPE_SWITCH ) {
> > +      osm_switch_t *p_sw;
> > +      ib_switch_info_t *p_si;
> > +      if (!(p_sw = osm_get_switch_by_guid( p_mgr->p_subn,
> > +                                           osm_node_get_node_guid( p_node ))) ||
> > +	  !(p_si = osm_switch_get_si_ptr( p_sw )) ||
> > +	  !p_si->enforce_cap)
> 
> Should switch port 0 be excepted from this ?

This function updates CA's "peer" ports - only external ports should be
there.

Sasha.



More information about the general mailing list