Skip to content

Commit

Permalink
tcp: use tcp_jiffies32 in __tcp_oow_rate_limited()
Browse files Browse the repository at this point in the history
This place wants to use tcp_jiffies32, this is good enough.

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>
  • Loading branch information
Eric Dumazet authored and David S. Miller committed May 17, 2017
1 parent 628174c commit 594208a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions net/ipv4/tcp_input.c
Original file line number Diff line number Diff line change
Expand Up @@ -3390,15 +3390,15 @@ static bool __tcp_oow_rate_limited(struct net *net, int mib_idx,
u32 *last_oow_ack_time)
{
if (*last_oow_ack_time) {
s32 elapsed = (s32)(tcp_time_stamp - *last_oow_ack_time);
s32 elapsed = (s32)(tcp_jiffies32 - *last_oow_ack_time);

if (0 <= elapsed && elapsed < sysctl_tcp_invalid_ratelimit) {
NET_INC_STATS(net, mib_idx);
return true; /* rate-limited: don't send yet! */
}
}

*last_oow_ack_time = tcp_time_stamp;
*last_oow_ack_time = tcp_jiffies32;

return false; /* not rate-limited: go ahead, send dupack now! */
}
Expand Down

0 comments on commit 594208a

Please sign in to comment.