tcp: fix ABC in tcp_slow_start()
authorEric Dumazet <edumazet@google.com>
Fri, 20 Jul 2012 05:02:33 +0000 (05:02 +0000)
committerDavid S. Miller <davem@davemloft.net>
Fri, 20 Jul 2012 17:59:41 +0000 (10:59 -0700)
commit9dc274151a548ffd215caecec5a8872db8799447
tree13b7199958243d28c43ea3ecdeca254edc2d7245
parent5815d5e7aae3cc9c5e85af83094d4d6498c3f4fc
tcp: fix ABC in tcp_slow_start()

When/if sysctl_tcp_abc > 1, we expect to increase cwnd by 2 if the
received ACK acknowledges more than 2*MSS bytes, in tcp_slow_start()

Problem is this RFC 3465 statement is not correctly coded, as
the while () loop increases snd_cwnd one by one.

Add a new variable to avoid this off-by one error.

Signed-off-by: Eric Dumazet <edumazet@google.com>
Cc: Tom Herbert <therbert@google.com>
Cc: Yuchung Cheng <ycheng@google.com>
Cc: Neal Cardwell <ncardwell@google.com>
Cc: Nandita Dukkipati <nanditad@google.com>
Cc: John Heffner <johnwheffner@gmail.com>
Cc: Stephen Hemminger <shemminger@vyatta.com>
Acked-by: Yuchung Cheng <ycheng@google.com>
Acked-by: Neal Cardwell <ncardwell@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv4/tcp_cong.c