diff options
author | hsu <hsu@FreeBSD.org> | 2004-01-20 21:40:25 +0000 |
---|---|---|
committer | hsu <hsu@FreeBSD.org> | 2004-01-20 21:40:25 +0000 |
commit | 00b5b7f8ec3dff4792047c4bd357ca4e270aceb7 (patch) | |
tree | 0d18cf0a68416ca5ff2991e110700036c550e05c /sys | |
parent | 8e0fa372ea0a9a6b57b2743168659b2774a30472 (diff) | |
download | FreeBSD-src-00b5b7f8ec3dff4792047c4bd357ca4e270aceb7.zip FreeBSD-src-00b5b7f8ec3dff4792047c4bd357ca4e270aceb7.tar.gz |
Merge from DragonFlyBSD rev 1.10:
date: 2003/09/02 10:04:47; author: hsu; state: Exp; lines: +5 -6
Account for when Limited Transmit is not congestion window limited.
Obtained from: DragonFlyBSD
Diffstat (limited to 'sys')
-rw-r--r-- | sys/netinet/tcp_input.c | 11 | ||||
-rw-r--r-- | sys/netinet/tcp_reass.c | 11 |
2 files changed, 10 insertions, 12 deletions
diff --git a/sys/netinet/tcp_input.c b/sys/netinet/tcp_input.c index 263dfd8..eef736c 100644 --- a/sys/netinet/tcp_input.c +++ b/sys/netinet/tcp_input.c @@ -1859,13 +1859,12 @@ trimthenstep6: KASSERT(tp->t_dupacks == 1 || tp->t_dupacks == 2, ("dupacks not 1 or 2")); - if (tp->t_dupacks == 1) { + if (tp->t_dupacks == 1) tp->snd_limited = 0; - tp->snd_cwnd += tp->t_maxseg; - } else { - tp->snd_cwnd += - tp->t_maxseg * 2; - } + tp->snd_cwnd = + (tp->snd_nxt - tp->snd_una) + + (tp->t_dupacks - tp->snd_limited) * + tp->t_maxseg; (void) tcp_output(tp); sent = tp->snd_max - oldsndmax; if (sent > tp->t_maxseg) { diff --git a/sys/netinet/tcp_reass.c b/sys/netinet/tcp_reass.c index 263dfd8..eef736c 100644 --- a/sys/netinet/tcp_reass.c +++ b/sys/netinet/tcp_reass.c @@ -1859,13 +1859,12 @@ trimthenstep6: KASSERT(tp->t_dupacks == 1 || tp->t_dupacks == 2, ("dupacks not 1 or 2")); - if (tp->t_dupacks == 1) { + if (tp->t_dupacks == 1) tp->snd_limited = 0; - tp->snd_cwnd += tp->t_maxseg; - } else { - tp->snd_cwnd += - tp->t_maxseg * 2; - } + tp->snd_cwnd = + (tp->snd_nxt - tp->snd_una) + + (tp->t_dupacks - tp->snd_limited) * + tp->t_maxseg; (void) tcp_output(tp); sent = tp->snd_max - oldsndmax; if (sent > tp->t_maxseg) { |