[ofa-general] [PATCH 1/2] osm_port.c: check if op_vls = 0 before max_op_vls comparison

Sasha Khapyorsky sashak at voltaire.com
Tue May 12 11:55:20 PDT 2009


On 09:49 Sun 10 May     , Eli Dorfman (Voltaire) wrote:
> Doron Shoham wrote:
> > check if op_vls = 0 before max_op_vls comparison
> > 
> > Signed-off-by: Doron Shoham <dorons at voltaire.com>
> > ---
> >  opensm/opensm/osm_port.c |    9 +++++----
> >  1 files changed, 5 insertions(+), 4 deletions(-)
> > 
> > diff --git a/opensm/opensm/osm_port.c b/opensm/opensm/osm_port.c
> > index 2e6c642..4d1bbf2 100644
> > --- a/opensm/opensm/osm_port.c
> > +++ b/opensm/opensm/osm_port.c
> > @@ -376,15 +376,16 @@ uint8_t osm_physp_calc_link_op_vls(IN osm_log_t * p_log,
> >  	} else
> >  		op_vls = ib_port_info_get_op_vls(&p_physp->port_info);
> >  
> > -	/* support user limitation of max_op_vls */
> > -	if (op_vls > p_subn->opt.max_op_vls)
> > -		op_vls = p_subn->opt.max_op_vls;
> > -
> >  	if (op_vls == 0) {
> > +		/* for non compliant implementations */	
> >  		OSM_LOG(p_log, OSM_LOG_DEBUG, "ERR 4102: "
> 
> I think that level should be OSM_LOG_ERROR.

OSM_LOG_VERBOSE is better - it is not OpenSM error.

And also - don't mix two ideas in a single patch :) .

Sasha



More information about the general mailing list