aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv4/tcp_output.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/ipv4/tcp_output.c')
-rw-r--r--net/ipv4/tcp_output.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/net/ipv4/tcp_output.c b/net/ipv4/tcp_output.c
index b95aa72d8823..5a8105e84f7c 100644
--- a/net/ipv4/tcp_output.c
+++ b/net/ipv4/tcp_output.c
@@ -45,6 +45,22 @@
45 45
46#include <trace/events/tcp.h> 46#include <trace/events/tcp.h>
47 47
48/* Refresh clocks of a TCP socket,
49 * ensuring monotically increasing values.
50 */
51void tcp_mstamp_refresh(struct tcp_sock *tp)
52{
53 u64 val = tcp_clock_ns();
54
55 /* departure time for next data packet */
56 if (val > tp->tcp_wstamp_ns)
57 tp->tcp_wstamp_ns = val;
58
59 val = div_u64(val, NSEC_PER_USEC);
60 if (val > tp->tcp_mstamp)
61 tp->tcp_mstamp = val;
62}
63
48static bool tcp_write_xmit(struct sock *sk, unsigned int mss_now, int nonagle, 64static bool tcp_write_xmit(struct sock *sk, unsigned int mss_now, int nonagle,
49 int push_one, gfp_t gfp); 65 int push_one, gfp_t gfp);
50 66