[ofa-general] Re: [PATCH] osm_port.c: do not force max_op_vls = 0 to 1

Sasha Khapyorsky sashak at voltaire.com
Wed May 6 04:07:19 PDT 2009


Hi Doron,

On 16:00 Tue 05 May     , Doron Shoham wrote:
> when setting max_op_vls = 0
> do not force it to 1.
> 0 is valid value which means "No change"
> 
> Signed-off-by: Doron Shoham <dorons at voltaire.com>
> ---
>  opensm/opensm/osm_port.c   |    6 ------
>  opensm/opensm/osm_subnet.c |    8 ++++++++
>  2 files changed, 8 insertions(+), 6 deletions(-)
> 
> diff --git a/opensm/opensm/osm_port.c b/opensm/opensm/osm_port.c
> index 2e6c642..db0c27e 100644
> --- a/opensm/opensm/osm_port.c
> +++ b/opensm/opensm/osm_port.c
> @@ -380,12 +380,6 @@ uint8_t osm_physp_calc_link_op_vls(IN osm_log_t * p_log,
>  	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: "
> -			"Invalid OP_VLS = 0. Forcing correction to 1 (VL0)\n");
> -		op_vls = 1;
> -	}
> -

I think that originally it was done as workaround for some old and buggy
device. Personally I don't remember such cases in practice, but maybe
Mellanox guys could say more. Yevgeny?

Basically if this is not needed anymore I'm fine to remove it (but
somehow it was not a direct purpose of the patch).

>  	OSM_LOG_EXIT(p_log);
>  	return op_vls;
>  }
> diff --git a/opensm/opensm/osm_subnet.c b/opensm/opensm/osm_subnet.c
> index ec15f8a..71fc7a0 100644
> --- a/opensm/opensm/osm_subnet.c
> +++ b/opensm/opensm/osm_subnet.c
> @@ -1288,6 +1288,14 @@ int osm_subn_output_conf(FILE *out, IN osm_subn_opt_t *const p_opts)
>  		"# switch port connected to a CA or router port\n"
>  		"leaf_head_of_queue_lifetime 0x%02x\n\n"
>  		"# Limit the maximal operational VLs\n"
> +		"# Virtual Lanes operational on this port\n"
> +		"# Values are (IB Spec 1.2.1, 14.2.5.6 Table 146 \"PortInfo\")\n"
> +		"#    0: No change; valid only on Set()\n"
> +		"#    1: VL0\n"
> +		"#    2: VL0, VL1\n"
> +		"#    3: VL0 - VL3\n"
> +		"#    4: VL0 - VL7\n"
> +		"#    5: VL0 - VL14\n"
>  		"max_op_vls %u\n\n"

Using 'max_op_vls = 0' will enforce PortInfo update (see how
osm_physp_calc_link_op_vls() is used in osm_link_mgr.c and
osm_lid_mgr.c) with "No change" request, which is obviously not desired.
So max_op_vls = 0 case should be handled properly or not permitted.

Sasha

>  		"# Force PortInfo:LinkSpeedEnabled on switch ports\n"
>  		"# If 0, don't modify PortInfo:LinkSpeedEnabled on switch port\n"
> -- 
> 1.5.4
> 



More information about the general mailing list