diff options
author | Eric Dumazet <edumazet@google.com> | 2017-05-16 17:00:08 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2017-05-17 16:06:01 -0400 |
commit | c74df29a8d119a09ccc5e50265e3383c76278f3d (patch) | |
tree | 416048d0a7c69d434959e3a6a5f070de7784764b | |
parent | 70eabf0e1b8fe11519f793416655266605f700b9 (diff) |
tcp: use tcp_jiffies32 to feed probe_timestamp
Use tcp_jiffies32 instead of tcp_time_stamp, since
tcp_time_stamp will soon be only used for TCP TS option.
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>
-rw-r--r-- | net/ipv4/tcp_output.c | 6 | ||||
-rw-r--r-- | net/ipv4/tcp_timer.c | 2 |
2 files changed, 4 insertions, 4 deletions
diff --git a/net/ipv4/tcp_output.c b/net/ipv4/tcp_output.c index cbda5de16449..f0fd1b4fdb32 100644 --- a/net/ipv4/tcp_output.c +++ b/net/ipv4/tcp_output.c | |||
@@ -1475,7 +1475,7 @@ void tcp_mtup_init(struct sock *sk) | |||
1475 | icsk->icsk_mtup.search_low = tcp_mss_to_mtu(sk, net->ipv4.sysctl_tcp_base_mss); | 1475 | icsk->icsk_mtup.search_low = tcp_mss_to_mtu(sk, net->ipv4.sysctl_tcp_base_mss); |
1476 | icsk->icsk_mtup.probe_size = 0; | 1476 | icsk->icsk_mtup.probe_size = 0; |
1477 | if (icsk->icsk_mtup.enabled) | 1477 | if (icsk->icsk_mtup.enabled) |
1478 | icsk->icsk_mtup.probe_timestamp = tcp_time_stamp; | 1478 | icsk->icsk_mtup.probe_timestamp = tcp_jiffies32; |
1479 | } | 1479 | } |
1480 | EXPORT_SYMBOL(tcp_mtup_init); | 1480 | EXPORT_SYMBOL(tcp_mtup_init); |
1481 | 1481 | ||
@@ -1987,7 +1987,7 @@ static inline void tcp_mtu_check_reprobe(struct sock *sk) | |||
1987 | s32 delta; | 1987 | s32 delta; |
1988 | 1988 | ||
1989 | interval = net->ipv4.sysctl_tcp_probe_interval; | 1989 | interval = net->ipv4.sysctl_tcp_probe_interval; |
1990 | delta = tcp_time_stamp - icsk->icsk_mtup.probe_timestamp; | 1990 | delta = tcp_jiffies32 - icsk->icsk_mtup.probe_timestamp; |
1991 | if (unlikely(delta >= interval * HZ)) { | 1991 | if (unlikely(delta >= interval * HZ)) { |
1992 | int mss = tcp_current_mss(sk); | 1992 | int mss = tcp_current_mss(sk); |
1993 | 1993 | ||
@@ -1999,7 +1999,7 @@ static inline void tcp_mtu_check_reprobe(struct sock *sk) | |||
1999 | icsk->icsk_mtup.search_low = tcp_mss_to_mtu(sk, mss); | 1999 | icsk->icsk_mtup.search_low = tcp_mss_to_mtu(sk, mss); |
2000 | 2000 | ||
2001 | /* Update probe time stamp */ | 2001 | /* Update probe time stamp */ |
2002 | icsk->icsk_mtup.probe_timestamp = tcp_time_stamp; | 2002 | icsk->icsk_mtup.probe_timestamp = tcp_jiffies32; |
2003 | } | 2003 | } |
2004 | } | 2004 | } |
2005 | 2005 | ||
diff --git a/net/ipv4/tcp_timer.c b/net/ipv4/tcp_timer.c index 9e0616cb8c17..6629f47aa7f0 100644 --- a/net/ipv4/tcp_timer.c +++ b/net/ipv4/tcp_timer.c | |||
@@ -115,7 +115,7 @@ static void tcp_mtu_probing(struct inet_connection_sock *icsk, struct sock *sk) | |||
115 | if (net->ipv4.sysctl_tcp_mtu_probing) { | 115 | if (net->ipv4.sysctl_tcp_mtu_probing) { |
116 | if (!icsk->icsk_mtup.enabled) { | 116 | if (!icsk->icsk_mtup.enabled) { |
117 | icsk->icsk_mtup.enabled = 1; | 117 | icsk->icsk_mtup.enabled = 1; |
118 | icsk->icsk_mtup.probe_timestamp = tcp_time_stamp; | 118 | icsk->icsk_mtup.probe_timestamp = tcp_jiffies32; |
119 | tcp_sync_mss(sk, icsk->icsk_pmtu_cookie); | 119 | tcp_sync_mss(sk, icsk->icsk_pmtu_cookie); |
120 | } else { | 120 | } else { |
121 | struct net *net = sock_net(sk); | 121 | struct net *net = sock_net(sk); |