Skip to contentSkip to conversation

Patch "tcp: disallow cwnd undo when switching congestion control" has been added to the 4.4-stable tree

PATCH [email protected] 1 participant 1 message Jun 8, 2017

Subsystems (3)
lore
Share & tools
lore

[email protected]

author maintainer Applied
#0 lore raw

This is a note to let you know that I've just added the patch titled

tcp: disallow cwnd undo when switching congestion control

to the 4.4-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
tcp-disallow-cwnd-undo-when-switching-congestion-control.patch
and it can be found in the queue-4.4 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.

Quoted 1 line

From foo@baz Thu Jun 8 09:11:25 CEST 2017

From: Yuchung Cheng <[email protected]>
Date: Wed, 31 May 2017 11:21:27 -0700
Subject: tcp: disallow cwnd undo when switching congestion control

From: Yuchung Cheng <[email protected]>

[ 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 tcp_undo_cwnd_reduction().

---
 net/ipv4/tcp_cong.c |    1 +
 1 file changed, 1 insertion(+)
net/ipv4/tcp_cong.c +1 -0
@@ -183,6 +183,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)
 		icsk->icsk_ca_ops->init(sk);
 	if (tcp_ca_needs_ecn(sk))

Patches currently in stable-queue which might be from [email protected] are

queue-4.4/tcp-disallow-cwnd-undo-when-switching-congestion-control.patch