[4.9,005/119] tcp: disallow cwnd undo when switching congestion control
diff mbox series

Message ID 20170612152556.889881005@linuxfoundation.org
State New, archived
Headers show
  • 4.9.32-stable review
Related show

Commit Message

Greg Kroah-Hartman June 12, 2017, 3:24 p.m. UTC
4.9-stable review patch.  If anyone has any objections, please let me know.


From: Yuchung Cheng <ycheng@google.com>

[ Upstream commit 44abafc4cc094214a99f860f778c48ecb23422fc ]

When the sender switches its congestion control during loss
recovery, if the recovery is spurious then it may incorrectly
revert cwnd and ssthresh to the older values set by a previous
congestion control. Consider a congestion control (like BBR)
that does not use ssthresh and keeps it infinite: the connection
may incorrectly revert cwnd to an infinite value when switching
from BBR to another congestion control.

This patch fixes it by disallowing such cwnd undo operation
upon switching congestion control.  Note that undo_marker
is not reset s.t. the packets that were incorrectly marked
lost would be corrected. We only avoid undoing the cwnd in

Signed-off-by: Yuchung Cheng <ycheng@google.com>
Signed-off-by: Soheil Hassas Yeganeh <soheil@google.com>
Signed-off-by: Neal Cardwell <ncardwell@google.com>
Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
 net/ipv4/tcp_cong.c |    1 +
 1 file changed, 1 insertion(+)

diff mbox series

--- a/net/ipv4/tcp_cong.c
+++ b/net/ipv4/tcp_cong.c
@@ -179,6 +179,7 @@  void tcp_init_congestion_control(struct
 	const struct inet_connection_sock *icsk = inet_csk(sk);
+	tcp_sk(sk)->prior_ssthresh = 0;
 	if (icsk->icsk_ca_ops->init)
 	if (tcp_ca_needs_ecn(sk))