diff options
author | lstewart <lstewart@FreeBSD.org> | 2010-12-02 01:36:00 +0000 |
---|---|---|
committer | lstewart <lstewart@FreeBSD.org> | 2010-12-02 01:36:00 +0000 |
commit | f6f8b1d549789edac59dceae52ddfeef29a89206 (patch) | |
tree | d6d53b927036fc4994afbd2e5aeb064877082c11 /sys/netinet/cc | |
parent | 234ab3f0356ccf170c37d91adc8adf9d1312e63e (diff) | |
download | FreeBSD-src-f6f8b1d549789edac59dceae52ddfeef29a89206.zip FreeBSD-src-f6f8b1d549789edac59dceae52ddfeef29a89206.tar.gz |
- Reinstantiate the after_idle hook call in tcp_output(), which got lost
somewhere along the way due to mismerging r211464 in our development tree.
- Capture the essence of r211464 in NewReno's after_idle() hook. We don't
use V_ss_fltsz/V_ss_fltsz_local yet which needs to be revisited.
Sponsored by: FreeBSD Foundation
Submitted by: David Hayes <dahayes at swin edu au>
MFC after: 9 weeks
X-MFC with: r215166
Diffstat (limited to 'sys/netinet/cc')
-rw-r--r-- | sys/netinet/cc/cc_newreno.c | 21 |
1 files changed, 17 insertions, 4 deletions
diff --git a/sys/netinet/cc/cc_newreno.c b/sys/netinet/cc/cc_newreno.c index e383510..511186a 100644 --- a/sys/netinet/cc/cc_newreno.c +++ b/sys/netinet/cc/cc_newreno.c @@ -216,15 +216,28 @@ newreno_post_recovery(struct cc_var *ccv) void newreno_after_idle(struct cc_var *ccv) { + int rw; + /* - * We have been idle for "a while" and no acks are expected to clock out - * any data we send -- slow start to get ack "clock" running again. + * If we've been idle for more than one retransmit timeout the old + * congestion window is no longer current and we have to reduce it to + * the restart window before we can transmit again. + * + * The restart window is the initial window or the last CWND, whichever + * is smaller. + * + * This is done to prevent us from flooding the path with a full CWND at + * wirespeed, overloading router and switch buffers along the way. + * + * See RFC5681 Section 4.1. "Restarting Idle Connections". */ if (V_tcp_do_rfc3390) - CCV(ccv, snd_cwnd) = min(4 * CCV(ccv, t_maxseg), + rw = min(4 * CCV(ccv, t_maxseg), max(2 * CCV(ccv, t_maxseg), 4380)); else - CCV(ccv, snd_cwnd) = CCV(ccv, t_maxseg) * 2; + rw = CCV(ccv, t_maxseg) * 2; + + CCV(ccv, snd_cwnd) = min(rw, CCV(ccv, snd_cwnd)); } |