freebsd-dev/sys/netinet/cc
Lawrence Stewart 47f44cdd93 Some correctness and robustness fixes related to CUBIC's mean RTT estimate:
- The mean RTT is updated at the end of each congestion epoch, but if we switch
  to congestion avoidance within the first epoch (e.g. if ssthresh was primed
  from the hostcache), we'll trigger a divide by zero panic in
  cubic_ack_received(). Set the mean to the min in cubic_record_rtt() if the
  mean is less than the min to ensure we have a sane mean for use in this
  situation. This fixes the panic reported by Nick Hibma.

- Adjust conditions under which we update the mean RTT in cubic_post_recovery()
  to ensure a low latency path won't yield an RTT of less than 1. This avoids
  another potential divide by zero panic when running CUBIC in networks with
  sub-millisecond latencies.

- Remove the "safety" assignment of min into mean when we don't update the mean
  because of failed conditions. The above change to the conditions for updating
  the mean ensures the safety issue is addressed and I feel it is better to keep
  our previous mean estimate around if we can't update than to revert to the
  min.

- Initialise the mean RTT to 1 on connection startup to act as a safety belt if
  a situation we haven't considered and addressed with the above changes were to
  crop up in the wild.

Sponsored by:	FreeBSD Foundation
Reported and tested by:	Nick Hibma
Discussed with:	David Hayes <dahayes at swin edu au>
MFC after:	5 weeks
X-MFC with:	r216114
2011-01-21 05:19:47 +00:00
..
cc_cubic.c Some correctness and robustness fixes related to CUBIC's mean RTT estimate: 2011-01-21 05:19:47 +00:00
cc_cubic.h Import a clean-room implementation of the experimental CUBIC congestion control 2010-12-02 06:05:44 +00:00
cc_htcp.c sysctl(9) cleanup checkpoint: amd64 GENERIC builds cleanly. 2011-01-12 19:53:50 +00:00
cc_module.h
cc_newreno.c General cleanup of the NewReno CC module (no functional changes): 2010-12-02 02:32:46 +00:00
cc.c Make the CC framework more VIMAGE friendly by adding the machinery to allow 2010-11-16 09:34:31 +00:00