[openib-general] [PATCH] osm: adding max_lid_ho field to osm_switch_t
Sasha Khapyorsky
sashak at voltaire.com
Tue Dec 19 12:30:44 PST 2006
On 21:35 Tue 19 Dec , Yevgeny Kliteynik wrote:
> Hi Hal
>
> Adding max_lid_ho field to osm_switch_t to allow routing
> engines that don't use lid matrices to explicitly set the
> max lid (in host order) that is reachable from the switch.
>
> Signed-off-by: Yevgeny Kliteynik <kliteyn at dev.mellanox.co.il>
> ---
Looks fine. Small comments below.
> @@ -793,6 +797,8 @@ static inline uint16_t
> osm_switch_get_max_lid_ho(
> IN const osm_switch_t* const p_sw )
> {
> + if (p_sw->max_lid_ho != 0)
> + return p_sw->max_lid_ho;
> return( osm_lid_matrix_get_max_lid_ho( &p_sw->lmx ) );
> }
What do you think about to remove osm_lid_matrix_get_max_lid_ho() at
all?
> @@ -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; ?
Sasha
More information about the general
mailing list