Commit 932eb763 authored by Kenneth Klette Jonassen's avatar Kenneth Klette Jonassen Committed by David S. Miller

tcp: use SACK RTTs for CC

Current behavior only passes RTTs from sequentially acked data to CC.

If sender gets a combined ACK for segment 1 and SACK for segment 3, then the
computed RTT for CC is the time between sending segment 1 and receiving SACK
for segment 3.

Pass the minimum computed RTT from any acked data to CC, i.e. time between
sending segment 3 and receiving SACK for segment 3.
Signed-off-by: default avatarKenneth Klette Jonassen <kennetkl@ifi.uio.no>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent a994a090
...@@ -3183,8 +3183,10 @@ static int tcp_clean_rtx_queue(struct sock *sk, int prior_fackets, ...@@ -3183,8 +3183,10 @@ static int tcp_clean_rtx_queue(struct sock *sk, int prior_fackets,
tp->fackets_out -= min(pkts_acked, tp->fackets_out); tp->fackets_out -= min(pkts_acked, tp->fackets_out);
if (ca_ops->pkts_acked) if (ca_ops->pkts_acked) {
ca_ops->pkts_acked(sk, pkts_acked, ca_seq_rtt_us); long rtt_us = min_t(ulong, ca_seq_rtt_us, sack_rtt_us);
ca_ops->pkts_acked(sk, pkts_acked, rtt_us);
}
} else if (skb && rtt_update && sack_rtt_us >= 0 && } else if (skb && rtt_update && sack_rtt_us >= 0 &&
sack_rtt_us > skb_mstamp_us_delta(&now, &skb->skb_mstamp)) { sack_rtt_us > skb_mstamp_us_delta(&now, &skb->skb_mstamp)) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment