tcp: move cwnd reduction after recovery state procesing
authorYuchung Cheng <ycheng@google.com>
Tue, 2 Feb 2016 18:33:05 +0000 (10:33 -0800)
committerDavid S. Miller <davem@davemloft.net>
Sun, 7 Feb 2016 19:09:50 +0000 (14:09 -0500)
commit31ba0c10723e9eba378f96de1d1a9426129949e1
tree98b0ed4aeb112803ccbb80ef18754acf58faa87d
parente662ca40de846e0a2be6326a7c4668326ddb194c
tcp: move cwnd reduction after recovery state procesing

Currently the cwnd is reduced and increased in various different
places. The reduction happens in various places in the recovery
state processing (tcp_fastretrans_alert) while the increase
happens afterward.

A better sequence is to identify lost packets and update
the congestion control state (icsk_ca_state) first. Then base
on the new state, up/down the cwnd in one central place. It's
more clear to reason cwnd changes.

Signed-off-by: Yuchung Cheng <ycheng@google.com>
Signed-off-by: Neal Cardwell <ncardwell@google.com>
Signed-off-by: Eric Dumazet <ncardwell@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv4/tcp_input.c