[ofa-general] Re: [PATCH] opensm/osm_pkey_mgr.c: setting/clearing both inbound and outbound partition enforcements

Hal Rosenstock hrosenstock at xsigo.com
Thu Dec 27 08:39:15 PST 2007


On Thu, 2007-12-27 at 16:35 +0000, Sasha Khapyorsky wrote:
> Hi Yevgeny,
> 
> On 17:39 Thu 27 Dec     , Yevgeny Kliteynik wrote:
> > Turning on inbound partition enforcement bit on switch ports -
> > undoing part of the changes that were done by the previous pkey patch.
> 
> It looks like full revert, is it what did you mean?
> 
> As far as I understand Hal's point was different - to set *full* P_Key
> values on switch's ports

That was before I looked up o18-14.

>  (and revert original patch). Not quite sure it
> is the best option - IMO it doesn't enforce limited-to-limited
> communication at nearest switch port and breaks limited-to-limited
> enforcement on outbound ports. However I don't see an ideal solution
> here.

After reading o18-14, do you still think so ?

>  Finally we will need sort of convention.

Not sure what you mean by this.

-- Hal

> 
> Sasha
> 
> > 
> > Signed-off-by: Yevgeny Kliteynik <kliteyn at dev.mellanox.co.il>
> > ---
> >  opensm/opensm/osm_pkey_mgr.c |   11 +++++------
> >  1 files changed, 5 insertions(+), 6 deletions(-)
> > 
> > diff --git a/opensm/opensm/osm_pkey_mgr.c b/opensm/opensm/osm_pkey_mgr.c
> > index 209fa71..61bd076 100644
> > --- a/opensm/opensm/osm_pkey_mgr.c
> > +++ b/opensm/opensm/osm_pkey_mgr.c
> > @@ -212,7 +212,7 @@ pkey_mgr_enforce_partition(IN osm_log_t * p_log,
> > 
> >  	p_pi = &p_physp->port_info;
> > 
> > -	if (((p_pi->vl_enforce & 0xc) == 0x4 && enforce) ||
> > +	if (((p_pi->vl_enforce & 0xc) == 0xc && enforce) ||
> >  	    ((p_pi->vl_enforce & 0xc) == 0 && !enforce)) {
> >  		osm_log(p_log, OSM_LOG_DEBUG,
> >  			"pkey_mgr_enforce_partition: "
> > @@ -229,11 +229,10 @@ pkey_mgr_enforce_partition(IN osm_log_t * p_log,
> > 
> >  	p_pi = (ib_port_info_t *) payload;
> > 
> > -	/* clearing enforcement in both directions */
> > -	p_pi->vl_enforce &= ~0xc;
> > -	if (enforce == TRUE)
> > -		/* enforcing only in outbound direction */
> > -		p_pi->vl_enforce |= 0x4;
> > +	if (enforce)
> > +		p_pi->vl_enforce |= 0xc;
> > +	else
> > +		p_pi->vl_enforce &= ~0xc;
> > 
> >  	p_pi->state_info2 = 0;
> >  	ib_port_info_set_port_state(p_pi, IB_LINK_NO_CHANGE);
> > -- 
> > 1.5.1.4
> > 
> _______________________________________________
> general mailing list
> general at lists.openfabrics.org
> http://lists.openfabrics.org/cgi-bin/mailman/listinfo/general
> 
> To unsubscribe, please visit http://openib.org/mailman/listinfo/openib-general



More information about the general mailing list