Skip to content

Commit 3cfe95a

Browse files
nealcardwellgregkh
authored andcommitted
tcp_bbr: fix to zero idle_restart only upon S/ACKed data
[ Upstream commit e6e6a27 ] Previously the bbr->idle_restart tracking was zeroing out the bbr->idle_restart bit upon ACKs that did not SACK or ACK anything, e.g. receiving incoming data or receiver window updates. In such situations BBR would forget that this was a restart-from-idle situation, and if the min_rtt had expired it would unnecessarily enter PROBE_RTT (even though we were actually restarting from idle but had merely forgotten that fact). The fix is simple: we need to remember we are restarting from idle until we receive a S/ACK for some data (a S/ACK for the first flight of data we send as we are restarting). This commit is a stable candidate for kernels back as far as 4.9. Fixes: 0f8782e ("tcp_bbr: add BBR congestion control") Signed-off-by: Neal Cardwell <[email protected]> Signed-off-by: Yuchung Cheng <[email protected]> Signed-off-by: Soheil Hassas Yeganeh <[email protected]> Signed-off-by: Priyaranjan Jha <[email protected]> Signed-off-by: Yousuk Seung <[email protected]> Signed-off-by: David S. Miller <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent bf2f3ba commit 3cfe95a

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

net/ipv4/tcp_bbr.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -802,7 +802,9 @@ static void bbr_update_min_rtt(struct sock *sk, const struct rate_sample *rs)
802802
}
803803
}
804804
}
805-
bbr->idle_restart = 0;
805+
/* Restart after idle ends only once we process a new S/ACK for data */
806+
if (rs->delivered > 0)
807+
bbr->idle_restart = 0;
806808
}
807809

808810
static void bbr_update_model(struct sock *sk, const struct rate_sample *rs)

0 commit comments

Comments
 (0)