netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] tcp: convert cached rtt from usec to jiffies when feeding initial rto
@ 2016-02-21  7:12 Konstantin Khlebnikov
  2016-02-23 23:33 ` David Miller
  0 siblings, 1 reply; 2+ messages in thread
From: Konstantin Khlebnikov @ 2016-02-21  7:12 UTC (permalink / raw)
  To: netdev, Eric Dumazet, David S. Miller

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

Signed-off-by: Konstantin Khlebnikov <khlebnikov@yandex-team.ru>
Fixes: 740b0f1841f6 ("tcp: switch rtt estimations to usec resolution")
---
 net/ipv4/tcp_metrics.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/net/ipv4/tcp_metrics.c b/net/ipv4/tcp_metrics.c
index c8cbc2b4b792..a726d7853ce5 100644
--- a/net/ipv4/tcp_metrics.c
+++ b/net/ipv4/tcp_metrics.c
@@ -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

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] tcp: convert cached rtt from usec to jiffies when feeding initial rto
  2016-02-21  7:12 [PATCH] tcp: convert cached rtt from usec to jiffies when feeding initial rto Konstantin Khlebnikov
@ 2016-02-23 23:33 ` David Miller
  0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2016-02-23 23:33 UTC (permalink / raw)
  To: khlebnikov; +Cc: netdev, edumazet

From: Konstantin Khlebnikov <khlebnikov@yandex-team.ru>
Date: Sun, 21 Feb 2016 10:12:39 +0300

> Currently it's converted into msecs, thus HZ=1000 intact.
> 
> Signed-off-by: Konstantin Khlebnikov <khlebnikov@yandex-team.ru>
> Fixes: 740b0f1841f6 ("tcp: switch rtt estimations to usec resolution")

Applied and queued up for -stable, thanks.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-02-24  0:08 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-02-21  7:12 [PATCH] tcp: convert cached rtt from usec to jiffies when feeding initial rto Konstantin Khlebnikov
2016-02-23 23:33 ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).