[openib-general] [PATCH] 2.6.20 ib_cm: limit cm message timeouts

Michael S. Tsirkin mst at mellanox.co.il
Sat Jan 13 11:01:00 PST 2007


> Quoting Roland Dreier <rdreier at cisco.com>:
> Subject: Re: [PATCH] 2.6.20 ib_cm: limit cm message timeouts
> 
> This all looks rather fishy:
> 
>  > +/*
>  > + * Limit CM msg timeouts to something reasonable.
>  > + * 8 seconds, with up to 15 retries, gives per msg timeout of 2 min.
>  > + */
>  > +#define IB_CM_MAX_TIMEOUT 21
> 
> OK... (although 8 seconds seems a little short -- it seems a somewhat
> longer timeout could be legitimate on a very busy fabric across a WAN
> or something like that)
> 
> but then...
> 
>  > +	timeout = min(IB_CM_MAX_TIMEOUT,
>  > +		      cm_convert_to_ms(cm_mra_get_service_timeout(mra_msg)) +
>  > +		      cm_convert_to_ms(cm_id_priv->av.packet_life_time));
> 
> should the IB_CM_MAX_TIMEOUT be inside a cm_convert_to_ms() too?
> and similarly...
> 
>  > -	cm_id_priv->timeout_ms = param->timeout_ms;
>  > +	cm_id_priv->timeout_ms = min(IB_CM_MAX_TIMEOUT, param->timeout_ms);
> 
> is timeout_ms misnamed, or did we just limit all timeouts to 21 msecs?
> 
> ...and other places in the patch seem to have similar problems.
> 
> Also, I would like to see warning messages like
> 
>     ib_cm: Possibly bogus timeout of xx (yyyyyy msecs) in REP from GID zzzz
> 
> printed in the kernel log so people realize they have broken SRP
> targets or whatever.

Sean, do you plan to post a fixed patch?
We really need this in 2.6.20 I think.

-- 
MST




More information about the general mailing list