diff options
Diffstat (limited to 'net/ipv4/tcp_input.c')
-rw-r--r-- | net/ipv4/tcp_input.c | 21 |
1 files changed, 16 insertions, 5 deletions
diff --git a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c index fec8a7a4dbaf..4b255fe999d9 100644 --- a/net/ipv4/tcp_input.c +++ b/net/ipv4/tcp_input.c | |||
@@ -2490,12 +2490,23 @@ static int tcp_clean_rtx_queue(struct sock *sk, __s32 *seq_rtt_p) | |||
2490 | tcp_ack_update_rtt(sk, acked, seq_rtt); | 2490 | tcp_ack_update_rtt(sk, acked, seq_rtt); |
2491 | tcp_ack_packets_out(sk); | 2491 | tcp_ack_packets_out(sk); |
2492 | 2492 | ||
2493 | /* Is the ACK triggering packet unambiguous? */ | 2493 | if (ca_ops->pkts_acked) { |
2494 | if (acked & FLAG_RETRANS_DATA_ACKED) | 2494 | s32 rtt_us = -1; |
2495 | last_ackt = net_invalid_timestamp(); | 2495 | |
2496 | /* Is the ACK triggering packet unambiguous? */ | ||
2497 | if (!(acked & FLAG_RETRANS_DATA_ACKED)) { | ||
2498 | /* High resolution needed and available? */ | ||
2499 | if (ca_ops->flags & TCP_CONG_RTT_STAMP && | ||
2500 | !ktime_equal(last_ackt, | ||
2501 | net_invalid_timestamp())) | ||
2502 | rtt_us = ktime_us_delta(ktime_get_real(), | ||
2503 | last_ackt); | ||
2504 | else if (seq_rtt > 0) | ||
2505 | rtt_us = jiffies_to_usecs(seq_rtt); | ||
2506 | } | ||
2496 | 2507 | ||
2497 | if (ca_ops->pkts_acked) | 2508 | ca_ops->pkts_acked(sk, pkts_acked, rtt_us); |
2498 | ca_ops->pkts_acked(sk, pkts_acked, last_ackt); | 2509 | } |
2499 | } | 2510 | } |
2500 | 2511 | ||
2501 | #if FASTRETRANS_DEBUG > 0 | 2512 | #if FASTRETRANS_DEBUG > 0 |