[ofa-general] Re: [PATCH v2] opensm: fixing handling of opt.max_wire_smps
Sasha Khapyorsky
sashak at voltaire.com
Wed Aug 5 07:12:56 PDT 2009
On 14:20 Wed 05 Aug , Yevgeny Kliteynik wrote:
> Hi Sasha,
>
> V2 of this patch:
>
> opt.max_wire_smps is uint32, but then when it's propagated
> into the VL15 poller it's casted to int32. Fixing the
> parameter handling to protect it from wrong values.
>
> Signed-off-by: Yevgeny Kliteynik <kliteyn at dev.mellanox.co.il>
Applied with change noted below. Thanks.
> diff --git a/opensm/opensm/osm_subnet.c b/opensm/opensm/osm_subnet.c
> index ec15f8a..c43bef7 100644
> --- a/opensm/opensm/osm_subnet.c
> +++ b/opensm/opensm/osm_subnet.c
> @@ -1066,6 +1066,18 @@ int osm_subn_verify_config(IN osm_subn_opt_t * const p_opts)
> p_opts->force_link_speed = IB_PORT_LINK_SPEED_ENABLED_MASK;
> }
>
> + if (p_opts->max_wire_smps == 0) {
> + log_report(" Invalid Cached Option Value: max_wire_smps = 0,"
> + " Using unlimited: 0x7FFFFFFF\n");
> + p_opts->max_wire_smps = 0x7FFFFFFF;
> + }
'0' is not an invalid value, it is means "unlimited", so I'm removing
this error message.
Sasha
More information about the general
mailing list