* [PATCH net] tcp: refresh tcp_mstamp from timers callbacks
@ 2017-12-13 2:22 Eric Dumazet
2017-12-13 2:26 ` Neal Cardwell
2017-12-13 21:04 ` David Miller
0 siblings, 2 replies; 5+ messages in thread
From: Eric Dumazet @ 2017-12-13 2:22 UTC (permalink / raw)
To: David Miller; +Cc: netdev, Soheil Hassas Yeganeh, Neal Cardwell, Mike Maloney
From: Eric Dumazet <edumazet@google.com>
Only the retransmit timer currently refreshes tcp_mstamp
We should do the same for delayed acks and keepalives.
Even if RFC 7323 does not request it, this is consistent to what linux
did in the past, when TS values were based on jiffies.
Fixes: 385e20706fac ("tcp: use tp->tcp_mstamp in output path")
Signed-off-by: Eric Dumazet <edumazet@google.com>
Cc: Soheil Hassas Yeganeh <soheil@google.com>
Cc: Mike Maloney <maloney@google.com>
Cc: Neal Cardwell <ncardwell@google.com>
---
net/ipv4/tcp_timer.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/net/ipv4/tcp_timer.c b/net/ipv4/tcp_timer.c
index 16df6dd44b988a128d97df3a7953437499a216e8..968fda1983762e6d7c078a28ccfcbd9066788daf 100644
--- a/net/ipv4/tcp_timer.c
+++ b/net/ipv4/tcp_timer.c
@@ -264,6 +264,7 @@ void tcp_delack_timer_handler(struct sock *sk)
icsk->icsk_ack.pingpong = 0;
icsk->icsk_ack.ato = TCP_ATO_MIN;
}
+ tcp_mstamp_refresh(tcp_sk(sk));
tcp_send_ack(sk);
__NET_INC_STATS(sock_net(sk), LINUX_MIB_DELAYEDACKS);
}
@@ -632,6 +633,7 @@ static void tcp_keepalive_timer (struct timer_list *t)
goto out;
}
+ tcp_mstamp_refresh(tp);
if (sk->sk_state == TCP_FIN_WAIT2 && sock_flag(sk, SOCK_DEAD)) {
if (tp->linger2 >= 0) {
const int tmo = tcp_fin_time(sk) - TCP_TIMEWAIT_LEN;
^ permalink raw reply related [flat|nested] 5+ messages in thread* Re: [PATCH net] tcp: refresh tcp_mstamp from timers callbacks
2017-12-13 2:22 [PATCH net] tcp: refresh tcp_mstamp from timers callbacks Eric Dumazet
@ 2017-12-13 2:26 ` Neal Cardwell
2017-12-13 2:42 ` Soheil Hassas Yeganeh
2017-12-13 21:04 ` David Miller
1 sibling, 1 reply; 5+ messages in thread
From: Neal Cardwell @ 2017-12-13 2:26 UTC (permalink / raw)
To: Eric Dumazet; +Cc: David Miller, netdev, Soheil Hassas Yeganeh, Mike Maloney
On Tue, Dec 12, 2017 at 9:22 PM, Eric Dumazet <eric.dumazet@gmail.com> wrote:
> From: Eric Dumazet <edumazet@google.com>
>
> Only the retransmit timer currently refreshes tcp_mstamp
>
> We should do the same for delayed acks and keepalives.
>
> Even if RFC 7323 does not request it, this is consistent to what linux
> did in the past, when TS values were based on jiffies.
>
> Fixes: 385e20706fac ("tcp: use tp->tcp_mstamp in output path")
> Signed-off-by: Eric Dumazet <edumazet@google.com>
> Cc: Soheil Hassas Yeganeh <soheil@google.com>
> Cc: Mike Maloney <maloney@google.com>
> Cc: Neal Cardwell <ncardwell@google.com>
> ---
Acked-by: Neal Cardwell <ncardwell@google.com>
Thanks, Eric!
neal
^ permalink raw reply [flat|nested] 5+ messages in thread* Re: [PATCH net] tcp: refresh tcp_mstamp from timers callbacks
2017-12-13 2:26 ` Neal Cardwell
@ 2017-12-13 2:42 ` Soheil Hassas Yeganeh
2017-12-13 16:10 ` Mike Maloney
0 siblings, 1 reply; 5+ messages in thread
From: Soheil Hassas Yeganeh @ 2017-12-13 2:42 UTC (permalink / raw)
To: Neal Cardwell; +Cc: Eric Dumazet, David Miller, netdev, Mike Maloney
On Tue, Dec 12, 2017 at 9:26 PM, Neal Cardwell <ncardwell@google.com> wrote:
> On Tue, Dec 12, 2017 at 9:22 PM, Eric Dumazet <eric.dumazet@gmail.com> wrote:
>> From: Eric Dumazet <edumazet@google.com>
>>
>> Only the retransmit timer currently refreshes tcp_mstamp
>>
>> We should do the same for delayed acks and keepalives.
>>
>> Even if RFC 7323 does not request it, this is consistent to what linux
>> did in the past, when TS values were based on jiffies.
>>
>> Fixes: 385e20706fac ("tcp: use tp->tcp_mstamp in output path")
>> Signed-off-by: Eric Dumazet <edumazet@google.com>
>> Cc: Soheil Hassas Yeganeh <soheil@google.com>
>> Cc: Mike Maloney <maloney@google.com>
>> Cc: Neal Cardwell <ncardwell@google.com>
>> ---
>
> Acked-by: Neal Cardwell <ncardwell@google.com>
>
> Thanks, Eric!
>
> neal
Acked-by: Soheil Hassas Yeganeh <soheil@google.com>
This is a very nice catch! Thank you Eric!
^ permalink raw reply [flat|nested] 5+ messages in thread* Re: [PATCH net] tcp: refresh tcp_mstamp from timers callbacks
2017-12-13 2:42 ` Soheil Hassas Yeganeh
@ 2017-12-13 16:10 ` Mike Maloney
0 siblings, 0 replies; 5+ messages in thread
From: Mike Maloney @ 2017-12-13 16:10 UTC (permalink / raw)
To: Soheil Hassas Yeganeh
Cc: Neal Cardwell, Eric Dumazet, David Miller, netdev, Mike Maloney
Acked-by: Mike Maloney <maloney@google.com>
Thanks for the quick fix!
On Tue, Dec 12, 2017 at 9:42 PM, Soheil Hassas Yeganeh
<soheil.kdev@gmail.com> wrote:
> On Tue, Dec 12, 2017 at 9:26 PM, Neal Cardwell <ncardwell@google.com> wrote:
>> On Tue, Dec 12, 2017 at 9:22 PM, Eric Dumazet <eric.dumazet@gmail.com> wrote:
>>> From: Eric Dumazet <edumazet@google.com>
>>>
>>> Only the retransmit timer currently refreshes tcp_mstamp
>>>
>>> We should do the same for delayed acks and keepalives.
>>>
>>> Even if RFC 7323 does not request it, this is consistent to what linux
>>> did in the past, when TS values were based on jiffies.
>>>
>>> Fixes: 385e20706fac ("tcp: use tp->tcp_mstamp in output path")
>>> Signed-off-by: Eric Dumazet <edumazet@google.com>
>>> Cc: Soheil Hassas Yeganeh <soheil@google.com>
>>> Cc: Mike Maloney <maloney@google.com>
>>> Cc: Neal Cardwell <ncardwell@google.com>
>>> ---
>>
>> Acked-by: Neal Cardwell <ncardwell@google.com>
>>
>> Thanks, Eric!
>>
>> neal
>
> Acked-by: Soheil Hassas Yeganeh <soheil@google.com>
>
> This is a very nice catch! Thank you Eric!
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH net] tcp: refresh tcp_mstamp from timers callbacks
2017-12-13 2:22 [PATCH net] tcp: refresh tcp_mstamp from timers callbacks Eric Dumazet
2017-12-13 2:26 ` Neal Cardwell
@ 2017-12-13 21:04 ` David Miller
1 sibling, 0 replies; 5+ messages in thread
From: David Miller @ 2017-12-13 21:04 UTC (permalink / raw)
To: eric.dumazet; +Cc: netdev, soheil, ncardwell, maloney
From: Eric Dumazet <eric.dumazet@gmail.com>
Date: Tue, 12 Dec 2017 18:22:52 -0800
> From: Eric Dumazet <edumazet@google.com>
>
> Only the retransmit timer currently refreshes tcp_mstamp
>
> We should do the same for delayed acks and keepalives.
>
> Even if RFC 7323 does not request it, this is consistent to what linux
> did in the past, when TS values were based on jiffies.
>
> Fixes: 385e20706fac ("tcp: use tp->tcp_mstamp in output path")
> Signed-off-by: Eric Dumazet <edumazet@google.com>
Applied and queued up for -stable, thanks Eric.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2017-12-13 21:04 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-12-13 2:22 [PATCH net] tcp: refresh tcp_mstamp from timers callbacks Eric Dumazet
2017-12-13 2:26 ` Neal Cardwell
2017-12-13 2:42 ` Soheil Hassas Yeganeh
2017-12-13 16:10 ` Mike Maloney
2017-12-13 21:04 ` 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).