tcp: fix ABC in tcp_slow_start()
authorEric Dumazet <[email protected]>
Fri, 20 Jul 2012 05:02:33 +0000 (05:02 +0000)
committerDavid S. Miller <[email protected]>
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 <[email protected]>
Cc: Tom Herbert <[email protected]>
Cc: Yuchung Cheng <[email protected]>
Cc: Neal Cardwell <[email protected]>
Cc: Nandita Dukkipati <[email protected]>
Cc: John Heffner <[email protected]>
Cc: Stephen Hemminger <[email protected]>
Acked-by: Yuchung Cheng <[email protected]>
Acked-by: Neal Cardwell <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
net/ipv4/tcp_cong.c