[openib-general] [PATCH] osm: adding max_lid_ho field to osm_switch_t
Yevgeny Kliteynik
kliteyn at dev.mellanox.co.il
Wed Dec 20 00:49:12 PST 2006
Sasha Khapyorsky wrote:
> 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.
You're right - setter is not needed.
I will issue a V2 series of patches that will address this and Hal's
comments.
-- Yevgeny
> Sasha
>
More information about the general
mailing list