diff options
author | Eric Dumazet <edumazet@google.com> | 2018-09-21 11:51:47 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2018-09-21 22:37:59 -0400 |
commit | 2fd66ffba50716fc5ab481c48db643af3bda2276 (patch) | |
tree | 0429f0bb89fa036d79e9b9d2105f89c0a3e38ca0 /net/ipv4/tcp_output.c | |
parent | 72b0094f918294e6cb8cf5c3b4520d928fbb1a57 (diff) |
tcp: introduce tcp_skb_timestamp_us() helper
There are few places where TCP reads skb->skb_mstamp expecting
a value in usec unit.
skb->tstamp (aka skb->skb_mstamp) will soon store CLOCK_TAI nsec value.
Add tcp_skb_timestamp_us() to provide proper conversion when needed.
Signed-off-by: Eric Dumazet <edumazet@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.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/ipv4/tcp_output.c b/net/ipv4/tcp_output.c index 597dbd749f05..b95aa72d8823 100644 --- a/net/ipv4/tcp_output.c +++ b/net/ipv4/tcp_output.c | |||
@@ -1966,7 +1966,7 @@ static bool tcp_tso_should_defer(struct sock *sk, struct sk_buff *skb, | |||
1966 | head = tcp_rtx_queue_head(sk); | 1966 | head = tcp_rtx_queue_head(sk); |
1967 | if (!head) | 1967 | if (!head) |
1968 | goto send_now; | 1968 | goto send_now; |
1969 | age = tcp_stamp_us_delta(tp->tcp_mstamp, head->skb_mstamp); | 1969 | age = tcp_stamp_us_delta(tp->tcp_mstamp, tcp_skb_timestamp_us(head)); |
1970 | /* If next ACK is likely to come too late (half srtt), do not defer */ | 1970 | /* If next ACK is likely to come too late (half srtt), do not defer */ |
1971 | if (age < (tp->srtt_us >> 4)) | 1971 | if (age < (tp->srtt_us >> 4)) |
1972 | goto send_now; | 1972 | goto send_now; |