diff options
author | Eric Dumazet <edumazet@google.com> | 2017-05-16 14:00:01 -0700 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2017-05-17 16:06:01 -0400 |
commit | ec66eda82d4b0c552bf40005d8f53b63b2b07de4 (patch) | |
tree | 3d6a1727aec027cccc9c14b1a8c0f52a6ab291fb /include/net/tcp.h | |
parent | 385e20706facd376f27863bd55b7cc7720d3f27b (diff) | |
download | linux-ec66eda82d4b0c552bf40005d8f53b63b2b07de4.tar.gz linux-ec66eda82d4b0c552bf40005d8f53b63b2b07de4.tar.bz2 linux-ec66eda82d4b0c552bf40005d8f53b63b2b07de4.zip |
tcp: introduce tcp_jiffies32
We abuse tcp_time_stamp for two different cases :
1) base to generate TCP Timestamp options (RFC 7323)
2) A 32bit version of jiffies since some TCP fields
are 32bit wide to save memory.
Since we want in the future to have 1ms TCP TS clock,
regardless of HZ value, we want to cleanup things.
tcp_jiffies32 is the truncated jiffies value,
which will be used only in places where we want a 'host'
timestamp.
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 'include/net/tcp.h')
-rw-r--r-- | include/net/tcp.h | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/include/net/tcp.h b/include/net/tcp.h index b4dc93dae98c..4b45be570821 100644 --- a/include/net/tcp.h +++ b/include/net/tcp.h @@ -700,11 +700,14 @@ u32 __tcp_select_window(struct sock *sk); void tcp_send_window_probe(struct sock *sk); -/* TCP timestamps are only 32-bits, this causes a slight - * complication on 64-bit systems since we store a snapshot - * of jiffies in the buffer control blocks below. We decided - * to use only the low 32-bits of jiffies and hide the ugly - * casts with the following macro. +/* TCP uses 32bit jiffies to save some space. + * Note that this is different from tcp_time_stamp, which + * historically has been the same until linux-4.13. + */ +#define tcp_jiffies32 ((u32)jiffies) + +/* Generator for TCP TS option (RFC 7323) + * Currently tied to 'jiffies' but will soon be driven by 1 ms clock. */ #define tcp_time_stamp ((__u32)(jiffies)) |