diff options
author | Eric Dumazet <edumazet@google.com> | 2017-05-16 14:00:00 -0700 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2017-05-17 16:06:01 -0400 |
commit | 385e20706facd376f27863bd55b7cc7720d3f27b (patch) | |
tree | b3e6e53158d3348cd6d6b7b473adfe2f1c5a8d6c /net/ipv4/tcp_timer.c | |
parent | 9d4f97f97bb8adc47f569d995402c33de9a4fa19 (diff) | |
download | op-kernel-dev-385e20706facd376f27863bd55b7cc7720d3f27b.zip op-kernel-dev-385e20706facd376f27863bd55b7cc7720d3f27b.tar.gz |
tcp: use tp->tcp_mstamp in output path
Idea is to later convert tp->tcp_mstamp to a full u64 counter
using usec resolution, so that we can later have fine
grained TCP TS clock (RFC 7323), regardless of HZ value.
We try to refresh tp->tcp_mstamp only when necessary.
Signed-off-by: Eric Dumazet <edumazet@google.com>
Acked-by: Soheil Hassas Yeganeh <soheil@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4/tcp_timer.c')
-rw-r--r-- | net/ipv4/tcp_timer.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/net/ipv4/tcp_timer.c b/net/ipv4/tcp_timer.c index 86934bc..ec7c547 100644 --- a/net/ipv4/tcp_timer.c +++ b/net/ipv4/tcp_timer.c @@ -339,7 +339,7 @@ static void tcp_probe_timer(struct sock *sk) */ start_ts = tcp_skb_timestamp(tcp_send_head(sk)); if (!start_ts) - skb_mstamp_get(&tcp_send_head(sk)->skb_mstamp); + tcp_send_head(sk)->skb_mstamp = tp->tcp_mstamp; else if (icsk->icsk_user_timeout && (s32)(tcp_time_stamp - start_ts) > icsk->icsk_user_timeout) goto abort; @@ -561,6 +561,7 @@ void tcp_write_timer_handler(struct sock *sk) goto out; } + skb_mstamp_get(&tcp_sk(sk)->tcp_mstamp); event = icsk->icsk_pending; switch (event) { |