git: 17fdbda3bb60 - stable/14 - tcp bbr: improve invalidating rtt
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Tue, 24 Nov 2026 20:05:57 UTC
The branch stable/14 has been updated by tuexen:
URL: https://cgit.FreeBSD.org/src/commit/?id=17fdbda3bb604af866960da7a28ecfdc93010c28
commit 17fdbda3bb604af866960da7a28ecfdc93010c28
Author: Michael Tuexen <tuexen@FreeBSD.org>
AuthorDate: 2026-11-15 18:56:25 +0000
Commit: Michael Tuexen <tuexen@FreeBSD.org>
CommitDate: 2026-11-24 19:02:42 +0000
tcp bbr: improve invalidating rtt
Invalidate the rtt based on t_rxtshift instead of resetting t_srtt to 0,
because using the latter also affects the retransmission timeout.
Reviewed by: Peter Lei
Sponsored by: Netflix, Inc.
Differential Revision: https://reviews.freebsd.org/D61585
(cherry picked from commit 8018d75601dfe804a8d70f4f08bdb0e4e3a8c5c9)
---
sys/netinet/tcp_stacks/bbr.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/sys/netinet/tcp_stacks/bbr.c b/sys/netinet/tcp_stacks/bbr.c
index 5cd1209f249f..893bba0f7be7 100644
--- a/sys/netinet/tcp_stacks/bbr.c
+++ b/sys/netinet/tcp_stacks/bbr.c
@@ -5142,15 +5142,13 @@ bbr_timeout_rxt(struct tcpcb *tp, struct tcp_bbr *bbr, uint32_t cts)
* move the current srtt into rttvar to keep the current retransmit
* times until then.
*/
- if (tp->t_rxtshift > TCP_MAXRXTSHIFT / 4) {
+ if (tp->t_rxtshift > TCP_RTT_INVALIDATE) {
#ifdef INET6
if (bbr->r_is_v6)
in6_losing(inp);
else
#endif
in_losing(inp);
- tp->t_rttvar += (tp->t_srtt >> TCP_RTT_SHIFT);
- tp->t_srtt = 0;
}
sack_filter_clear(&bbr->r_ctl.bbr_sf, tp->snd_una);
tp->snd_recover = tp->snd_max;
@@ -6306,7 +6304,7 @@ tcp_bbr_xmit_timer_commit(struct tcp_bbr *bbr, struct tcpcb *tp, uint32_t cts)
}
/* Round it up */
rtt_ticks = USEC_2_TICKS((rtt + (USECS_IN_MSEC - 1)));
- if (tp->t_srtt != 0) {
+ if (tp->t_srtt != 0 && tp->t_rxtshift <= TCP_RTT_INVALIDATE) {
/*
* srtt is stored as fixed point with 5 bits after the
* binary point (i.e., scaled by 8). The following magic is