git: 251842c63927 - main - tcp rack: improve initialisation of retransmit timeout

Michael Tuexen tuexen at FreeBSD.org
Wed May 12 16:11:57 UTC 2021


The branch main has been updated by tuexen:

URL: https://cgit.FreeBSD.org/src/commit/?id=251842c63927fc4af63bdc61989bbfbf3823c679

commit 251842c63927fc4af63bdc61989bbfbf3823c679
Author:     Michael Tuexen <tuexen at FreeBSD.org>
AuthorDate: 2021-05-12 15:58:56 +0000
Commit:     Michael Tuexen <tuexen at FreeBSD.org>
CommitDate: 2021-05-12 16:02:21 +0000

    tcp rack: improve initialisation of retransmit timeout
    
    When the TCP is in the front states, don't take the slop variable
    into account. This improves consistency with the base stack.
    
    Reviewed by:            rrs@
    Differential Revision:  https://reviews.freebsd.org/D30230
    MFC after:              1 week
    Sponsored by:           Netflix, Inc.
---
 sys/netinet/tcp_stacks/rack.c | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/sys/netinet/tcp_stacks/rack.c b/sys/netinet/tcp_stacks/rack.c
index e6b2ef60cef7..115f5f2ee44b 100644
--- a/sys/netinet/tcp_stacks/rack.c
+++ b/sys/netinet/tcp_stacks/rack.c
@@ -6606,8 +6606,13 @@ rack_convert_rtts(struct tcpcb *tp)
 			tp->t_rttvar += frac;
 		}
 	}
-	RACK_TCPT_RANGESET(tp->t_rxtcur, RACK_REXMTVAL(tp),
-			   rack_rto_min, rack_rto_max);
+	tp->t_rxtcur = RACK_REXMTVAL(tp);
+	if (TCPS_HAVEESTABLISHED(tp->t_state)) {
+		tp->t_rxtcur += TICKS_2_USEC(tcp_rexmit_slop);
+	}
+	if (tp->t_rxtcur > rack_rto_max) {
+		tp->t_rxtcur = rack_rto_max;
+	}
 }
 
 static void


More information about the dev-commits-src-main mailing list