[ofa-general] Re: [PATCH] opensm/osm_trap_rcv.c disable the port with the least hop count

Sasha Khapyorsky sashak at voltaire.com
Fri Nov 21 01:45:14 PST 2008


Hi Eli,

On 10:00 Thu 20 Nov     , Eli Dorfman wrote:
> disable the port with the least hop count.
> this will address the case of inter switch link where the
> most remote port (from opensm) is sending traps.
> in that case we would like to disable the nearest switch port (from opensm).
> 
> Signed-off-by: Eli Dorfman <elid at voltaire.com>

I applied the patch. However have some question.

> ---
>  opensm/opensm/osm_trap_rcv.c |    4 ++--
>  1 files changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/opensm/opensm/osm_trap_rcv.c b/opensm/opensm/osm_trap_rcv.c
> index 07c5183..d1dfbd4 100644
> --- a/opensm/opensm/osm_trap_rcv.c
> +++ b/opensm/opensm/osm_trap_rcv.c
> @@ -239,8 +239,8 @@ static int disable_port(osm_sm_t *sm, osm_physp_t *p)
>  	ib_port_info_t *pi = (ib_port_info_t *)payload;
>  	int ret;
>  
> -	/* in case of endport - disable switch's peer port */
> -	if (osm_node_get_type(p->p_node) != IB_NODE_TYPE_SWITCH)
> +	/* select the nearest port to master opensm */
> +	if (p->dr_path.hop_count > p->p_remote_physp->dr_path.hop_count)
>  		p = p->p_remote_physp;

Is it possible that this noisy port is switch external port, "the
nearest" to OpenSM node and doesn't have remote port (due to unstable
link)? We saw such cases in practice and it is handled by OpenSM in a
light sweep (see __osm_state_mgr_get_remote_port_info() calls in
__osm_state_mgr_light_sweep_start() function).

With endports check only is is impossible IMO, but with I don't see that
it cannot happen with switch ports. Right?

If so then maybe the code should look like:

	if (p->p_remote_physp &&
	    p->dr_path.hop_count > p->p_remote_physp->dr_path.hop_count)
		p = p->p_remote_physp;


Sasha

>  
>  	/* If trap 131, might want to disable peer port if available */
> -- 
> 1.5.5
> 



More information about the general mailing list