Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 12 May 2021 16:11:56 GMT
From:      Michael Tuexen <tuexen@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
Subject:   git: 251842c63927 - main - tcp rack: improve initialisation of retransmit timeout
Message-ID:  <202105121611.14CGBud7061092@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch main has been updated by tuexen:

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

commit 251842c63927fc4af63bdc61989bbfbf3823c679
Author:     Michael Tuexen <tuexen@FreeBSD.org>
AuthorDate: 2021-05-12 15:58:56 +0000
Commit:     Michael Tuexen <tuexen@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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202105121611.14CGBud7061092>