[openib-general] [PATCH] OpenSM: When not forcing link speed, use LinkSpeedSupported as LinkSpeedEnabled

Hal Rosenstock halr at voltaire.com
Sat Nov 18 09:16:18 PST 2006


Hi Eitan,

On Sat, 2006-11-18 at 11:58, Eitan Zahavi wrote:
> Hi Hal,
> 
> What the patch does is to force the LinkSpeedEnabled to 
> IB_PORT_LINK_SPEED_ENABLED_MASK.
> The text implies that this would make the LinkSpeedEnabled  be equal to 
> LinkSpeedSupported.
> What I do not get is how come a static mask can represent a port 
> specific attribute like LinkSpeedSupported.

The mask value is the right value for the value of setting
LinkSpeedEnabled set to LinkSpeedSupport value (15). There was no define
in ib_types for this and other. It would be cleaner to add them there
but I reused this. Do you prefer I add the define for this (and some
other missing defines there) ? Does this make more sense now ?

-- Hal

> Eitan
> 
> Hal Rosenstock wrote:
> > OpenSM: When not forcing link speed, use LinkSpeedSupported as
> > LinkSpeedEnabled.
> >
> > Signed-off-by: Hal Rosenstock <halr at voltaire.com> 
> > Index: opensm/osm_lid_mgr.c
> > ===================================================================
> > -- opensm/osm_lid_mgr.c	(revision 10056)
> > +++ opensm/osm_lid_mgr.c	(working copy)
> > @@ -1155,7 +1155,7 @@ __osm_lid_mgr_set_physp_pi(
> >      if ( p_mgr->p_subn->opt.force_link_speed )
> >        ib_port_info_set_link_speed_enabled( p_pi, IB_LINK_SPEED_ACTIVE_2_5 );
> >      else
> > -      ib_port_info_set_link_speed_enabled( p_pi, ib_port_info_get_link_speed_enabled(p_old_pi) );
> > +      ib_port_info_set_link_speed_enabled( p_pi, IB_PORT_LINK_SPEED_ENABLED_MASK );
> >      if (memcmp( &p_pi->link_speed, &p_old_pi->link_speed,
> >                  sizeof(p_pi->link_speed) ))
> >        send_set = TRUE;
> > Index: opensm/osm_link_mgr.c
> > ===================================================================
> > -- opensm/osm_link_mgr.c	(revision 10056)
> > +++ opensm/osm_link_mgr.c	(working copy)
> > @@ -313,7 +313,7 @@ __osm_link_mgr_set_physp_pi(
> >      if ( p_mgr->p_subn->opt.force_link_speed )
> >        ib_port_info_set_link_speed_enabled( p_pi, IB_LINK_SPEED_ACTIVE_2_5 );
> >      else
> > -      ib_port_info_set_link_speed_enabled( p_pi, ib_port_info_get_link_speed_enabled(p_old_pi) );
> > +      ib_port_info_set_link_speed_enabled( p_pi, IB_PORT_LINK_SPEED_ENABLED_MASK );
> >      if (memcmp( &p_pi->link_speed, &p_old_pi->link_speed,
> >                  sizeof(p_pi->link_speed) ))
> >        send_set = TRUE;
> >
> >
> >
> > _______________________________________________
> > openib-general mailing list
> > openib-general at openib.org
> > http://openib.org/mailman/listinfo/openib-general
> >
> > To unsubscribe, please visit http://openib.org/mailman/listinfo/openib-general
> >   
> 





More information about the general mailing list