aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv4/tcp_output.c
diff options
context:
space:
mode:
authorEric Dumazet <edumazet@google.com>2017-05-16 17:00:03 -0400
committerDavid S. Miller <davem@davemloft.net>2017-05-17 16:06:01 -0400
commitd635fbe27ebee0f4b845abe5e9620c9400785a5c (patch)
tree76982f9042c717aef9be65f1ede08c128a8dea09 /net/ipv4/tcp_output.c
parentd011b9a448907833a19b2f0a34381419f8ca9b23 (diff)
tcp: use tcp_jiffies32 to feed tp->lsndtime
Use tcp_jiffies32 instead of tcp_time_stamp to feed tp->lsndtime. tcp_time_stamp will soon be a litle bit more expensive than simply reading 'jiffies'. 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_output.c')
-rw-r--r--net/ipv4/tcp_output.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/net/ipv4/tcp_output.c b/net/ipv4/tcp_output.c
index 4c8a6eaba6b3..be9f8f483e21 100644
--- a/net/ipv4/tcp_output.c
+++ b/net/ipv4/tcp_output.c
@@ -160,7 +160,7 @@ static void tcp_event_data_sent(struct tcp_sock *tp,
160 struct sock *sk) 160 struct sock *sk)
161{ 161{
162 struct inet_connection_sock *icsk = inet_csk(sk); 162 struct inet_connection_sock *icsk = inet_csk(sk);
163 const u32 now = tcp_time_stamp; 163 const u32 now = tcp_jiffies32;
164 164
165 if (tcp_packets_in_flight(tp) == 0) 165 if (tcp_packets_in_flight(tp) == 0)
166 tcp_ca_event(sk, CA_EVENT_TX_START); 166 tcp_ca_event(sk, CA_EVENT_TX_START);
@@ -1918,7 +1918,7 @@ static bool tcp_tso_should_defer(struct sock *sk, struct sk_buff *skb,
1918 /* Avoid bursty behavior by allowing defer 1918 /* Avoid bursty behavior by allowing defer
1919 * only if the last write was recent. 1919 * only if the last write was recent.
1920 */ 1920 */
1921 if ((s32)(tcp_time_stamp - tp->lsndtime) > 0) 1921 if ((s32)(tcp_jiffies32 - tp->lsndtime) > 0)
1922 goto send_now; 1922 goto send_now;
1923 1923
1924 in_flight = tcp_packets_in_flight(tp); 1924 in_flight = tcp_packets_in_flight(tp);