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

Hal Rosenstock hal.rosenstock at gmail.com
Sun May 10 03:47:29 PDT 2009


On Sun, May 10, 2009 at 4:17 AM, Doron Shoham <dorons at voltaire.com> 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 |   11 ++++++-----
>  1 files changed, 6 insertions(+), 5 deletions(-)
>
> diff --git a/opensm/opensm/osm_port.c b/opensm/opensm/osm_port.c
> index 2e6c642..41b67ad 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) {
> -               OSM_LOG(p_log, OSM_LOG_DEBUG, "ERR 4102: "
> +               /* for non compliant implementations */
> +               OSM_LOG(p_log, OSM_LOG_ERROR, "ERR 4102: "


Sasha has been adamant that any device supplied data errors use
something other than ERROR log level.

-- Hal

>                        "Invalid OP_VLS = 0. Forcing correction to 1 (VL0)\n");
>                op_vls = 1;
>        }
> +       /* support user limitation of max_op_vls */
> +       if (op_vls > p_subn->opt.max_op_vls)
> +               op_vls = p_subn->opt.max_op_vls;
> +
>
>        OSM_LOG_EXIT(p_log);
>        return op_vls;
> --
> 1.5.4
>
> _______________________________________________
> general mailing list
> general at lists.openfabrics.org
> http://lists.openfabrics.org/cgi-bin/mailman/listinfo/general
>
> To unsubscribe, please visit http://openib.org/mailman/listinfo/openib-general
>



More information about the general mailing list