summaryrefslogtreecommitdiff
path: root/include/net/tcp.h
diff options
context:
space:
mode:
authorEric Dumazet <edumazet@google.com>2023-10-20 15:57:43 +0300
committerDavid S. Miller <davem@davemloft.net>2023-10-23 11:35:01 +0300
commit9d0c00f5ca05be9e89649c156f9d5b9421fc534e (patch)
treee9c00f8f79f0d5b4b8d0a1a5f60596519bcf6518 /include/net/tcp.h
parent003e07a1e48e9423647d2fef1c86b4caab3a94be (diff)
downloadlinux-9d0c00f5ca05be9e89649c156f9d5b9421fc534e.tar.xz
tcp: rename tcp_time_stamp() to tcp_time_stamp_ts()
This helper returns a TSval from a TCP socket. It currently calls tcp_time_stamp_ms() but will soon be able to return a usec based TSval, depending on an upcoming tp->tcp_usec_ts field. Signed-off-by: Eric Dumazet <edumazet@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/net/tcp.h')
-rw-r--r--include/net/tcp.h9
1 files changed, 4 insertions, 5 deletions
diff --git a/include/net/tcp.h b/include/net/tcp.h
index b86abf1fbe46..af72c1dc37f3 100644
--- a/include/net/tcp.h
+++ b/include/net/tcp.h
@@ -813,15 +813,14 @@ static inline u32 tcp_clock_ts(bool usec_ts)
return usec_ts ? tcp_clock_us() : tcp_clock_ms();
}
-/* This should only be used in contexts where tp->tcp_mstamp is up to date */
-static inline u32 tcp_time_stamp(const struct tcp_sock *tp)
+static inline u32 tcp_time_stamp_ms(const struct tcp_sock *tp)
{
- return div_u64(tp->tcp_mstamp, USEC_PER_SEC / TCP_TS_HZ);
+ return div_u64(tp->tcp_mstamp, USEC_PER_MSEC);
}
-static inline u32 tcp_time_stamp_ms(const struct tcp_sock *tp)
+static inline u32 tcp_time_stamp_ts(const struct tcp_sock *tp)
{
- return div_u64(tp->tcp_mstamp, USEC_PER_MSEC);
+ return tcp_time_stamp_ms(tp);
}
void tcp_mstamp_refresh(struct tcp_sock *tp);