Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 5c16a050 authored by Konstantin Khlebnikov's avatar Konstantin Khlebnikov Committed by Sasha Levin
Browse files

tcp: convert cached rtt from usec to jiffies when feeding initial rto



[ Upstream commit 9bdfb3b79e61c60e1a3e2dc05ad164528afa6b8a ]

Currently it's converted into msecs, thus HZ=1000 intact.

Signed-off-by: default avatarKonstantin Khlebnikov <khlebnikov@yandex-team.ru>
Fixes: 740b0f18 ("tcp: switch rtt estimations to usec resolution")
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
Signed-off-by: default avatarSasha Levin <sasha.levin@oracle.com>
parent 742a7a14
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -550,7 +550,7 @@ reset:
	 */
	if (crtt > tp->srtt_us) {
		/* Set RTO like tcp_rtt_estimator(), but from cached RTT. */
		crtt /= 8 * USEC_PER_MSEC;
		crtt /= 8 * USEC_PER_SEC / HZ;
		inet_csk(sk)->icsk_rto = crtt + max(2 * crtt, tcp_rto_min(sk));
	} else if (tp->srtt_us == 0) {
		/* RFC6298: 5.7 We've failed to get a valid RTT sample from