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
[email protected]
http://openib.org/mailman/listinfo/openib-general

To unsubscribe, please visit http://openib.org/mailman/listinfo/openib-general

Reply via email to