summaryrefslogtreecommitdiffstats
path: root/net/ipv4/tcp_input.c
diff options
context:
space:
mode:
authorDaikichi Osuga <osugad@s1.nttdocomo.co.jp>2006-08-29 11:01:44 +0200
committerDavid S. Miller <davem@sunset.davemloft.net>2006-08-30 06:22:16 +0200
commit3fdf3f0c99e90e167f0d0643fcc8739e27456697 (patch)
tree03e70416c6baca7db752d00d5623d43390d84714 /net/ipv4/tcp_input.c
parent[IPV6]: SNMPv2 "ipv6IfStatsInAddrErrors" counter error (diff)
downloadlinux-3fdf3f0c99e90e167f0d0643fcc8739e27456697.tar.xz
linux-3fdf3f0c99e90e167f0d0643fcc8739e27456697.zip
[TCP]: Two RFC3465 Appropriate Byte Count fixes.
1) fix slow start after retransmit timeout 2) fix case of L=2*SMSS acked bytes comparison Signed-off-by: Daikichi Osuga <osugad@s1.nttdocomo.co.jp> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4/tcp_input.c')
-rw-r--r--net/ipv4/tcp_input.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c
index 104af5d5bcbc..111ff39a08c5 100644
--- a/net/ipv4/tcp_input.c
+++ b/net/ipv4/tcp_input.c
@@ -2505,8 +2505,13 @@ static int tcp_ack(struct sock *sk, struct sk_buff *skb, int flag)
if (before(ack, prior_snd_una))
goto old_ack;
- if (sysctl_tcp_abc && icsk->icsk_ca_state < TCP_CA_CWR)
- tp->bytes_acked += ack - prior_snd_una;
+ if (sysctl_tcp_abc) {
+ if (icsk->icsk_ca_state < TCP_CA_CWR)
+ tp->bytes_acked += ack - prior_snd_una;
+ else if (icsk->icsk_ca_state == TCP_CA_Loss)
+ /* we assume just one segment left network */
+ tp->bytes_acked += min(ack - prior_snd_una, tp->mss_cache);
+ }
if (!(flag&FLAG_SLOWPATH) && after(ack, prior_snd_una)) {
/* Window is constant, pure forward advance.