[openib-general] [PATCH] osm: adding max_lid_ho field to osm_switch_t

Sasha Khapyorsky sashak at voltaire.com
Tue Dec 19 15:05:53 PST 2006


On 23:03 Tue 19 Dec     , Yevgeny Kliteynik wrote:
>  
> >> @@ -809,6 +815,37 @@ osm_switch_get_max_lid_ho(
> >>  * SEE ALSO
> >>  *********/
> >>  
> >> +/****f* OpenSM: Switch/osm_switch_set_max_lid_ho
> >> +* NAME
> >> +*	osm_switch_set_max_lid_ho
> >> +*
> >> +* DESCRIPTION
> >> +*	Set the maximum LID (host order) value accessed from this switch
> >> +* SYNOPSIS
> >> +*/
> >> +static inline void
> >> +osm_switch_set_max_lid_ho(
> >> +	IN osm_switch_t* const p_sw,
> >> +	IN uint16_t max_lid_ho )
> >> +{
> >> +	p_sw->max_lid_ho = max_lid_ho;
> >> +}
> >> +/*
> >> +* PARAMETERS
> >> +*	p_sw
> >> +*		[in] Pointer to a switch object.
> >> +*
> >> +*	max_lid_ho
> >> +*		Max LID (host order) value accessed from this switch
> >> +*
> >> +* RETURN VALUES
> >> +*	None.
> >> +*
> >> +* NOTES
> >> +*
> >> +* SEE ALSO
> >> +*********/
> >> +
> > 
> > Do we need those +31 lines of code instead of just
> > p_sw->max_lid_ho = N; ?
> 
> Since there are access functions for the rest of the fields,
> I didn't want to make an exception in this case either.

I think you did anyway - there is no full set of access methods. I'm
perfectly fine with it. And don't call you to cleanup the rest, just to
not add new ones.

Sasha




More information about the general mailing list