[ofa-general] [PATCH] opensm/osm_pkey_mgr.c: setting only outbound partition enforcement on switch

Sasha Khapyorsky sashak at voltaire.com
Sat Dec 29 10:34:59 PST 2007


On 23:04 Thu 27 Dec     , Yevgeny Kliteynik wrote:
>  Sasha Khapyorsky wrote:
> > On 08:20 Thu 27 Dec     , Hal Rosenstock wrote:
> >> On Thu, 2007-12-27 at 16:13 +0000, Sasha Khapyorsky wrote:
> >>> Hi Hal,
> >>>
> >>> On 07:00 Thu 27 Dec     , Hal Rosenstock wrote:
> >>>> On Tue, 2007-12-25 at 14:29 +0200, Yevgeny Kliteynik wrote:
> >>>>> Fixing wrong setting of partition enforcement bits on switch ports.
> >>>>> When an HCA port is configured with a certain pkey, the peer port
> >>>>> on the switch should turn on outbound partition enforcement bit only.
> >>>>> Turning on the inbound enforcement will cause the switch to drop
> >>>>> valid packets if the HCA is partial member.
> >>>> Inbound enforcement is actually the more useful case. If there is
> >>>> inbound enforcement, outbound enforcement doesn't add much.
> >>>>
> >>>> In the case of partial only (not both partial and full) membership, the
> >>>> peer switch physical port would need to be set to full membership.
> >>> Then it could break outbound enforcement. Isn't it?
> >> What I wrote was wrong. Limited pkey is sufficient. See o18-14
> > Do you mean last paragraph of o18-14? Assuming so - it makes sense. So
> > we need just revert the original patch.
> 
>  Almost true. It would be nice to keep the new condition:
> 
>  -	if ((p_pi->vl_enforce & 0xc) == (0xc) * (enforce == TRUE)) {
>  +	if (((p_pi->vl_enforce & 0xc) == 0x4 && enforce) ||
>  +	    ((p_pi->vl_enforce & 0xc) == 0 && !enforce)) {

I liked the original version - it is shorter and looks cleaner for me.

I'm reverting entire patch.

Sasha



More information about the general mailing list