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>
This commit is contained in:
committed by
David S. Miller
parent
d011b9a448
commit
d635fbe27e
@@ -160,7 +160,7 @@ static void tcp_event_data_sent(struct tcp_sock *tp,
|
||||
struct sock *sk)
|
||||
{
|
||||
struct inet_connection_sock *icsk = inet_csk(sk);
|
||||
const u32 now = tcp_time_stamp;
|
||||
const u32 now = tcp_jiffies32;
|
||||
|
||||
if (tcp_packets_in_flight(tp) == 0)
|
||||
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,
|
||||
/* Avoid bursty behavior by allowing defer
|
||||
* only if the last write was recent.
|
||||
*/
|
||||
if ((s32)(tcp_time_stamp - tp->lsndtime) > 0)
|
||||
if ((s32)(tcp_jiffies32 - tp->lsndtime) > 0)
|
||||
goto send_now;
|
||||
|
||||
in_flight = tcp_packets_in_flight(tp);
|
||||
|
||||
Reference in New Issue
Block a user