[ofa-general] Re: [openib-general] [PATCH] 2.6.20 ib_cm: limit cm message timeouts
Ishai Rabinovitz
ishai at dev.mellanox.co.il
Mon Mar 5 13:00:17 PST 2007
Hi Roland, Sean,
How about the attached fix to Sean patch?
Ishai
Roland Dreier wrote:
>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.
>
> - R.
>
>_______________________________________________
>openib-general mailing list
>openib-general at openib.org
>http://openib.org/mailman/listinfo/openib-general
>
>To unsubscribe, please visit http://openib.org/mailman/listinfo/openib-general
>
>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: fixed_sean_cm_limit_mra_timeout.patch
URL: <http://lists.openfabrics.org/pipermail/general/attachments/20070305/62a17677/attachment.ksh>
More information about the general
mailing list