[TCP]: Congestion control API RTT sampling fix
Commit 164891aadf
broke RTT
sampling of congestion control modules. Inaccurate timestamps
could be fed to them without providing any way for them to
identify such cases. Previously RTT sampler was called only if
FLAG_RETRANS_DATA_ACKED was not set filtering inaccurate
timestamps nicely. In addition, the new behavior could give an
invalid timestamp (zero) to RTT sampler if only skbs with
TCPCB_RETRANS were ACKed. This solves both problems.
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@helsinki.fi>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
committed by
David S. Miller
parent
22b1a9203e
commit
b9ce204f0a
@@ -2409,7 +2409,7 @@ static int tcp_clean_rtx_queue(struct sock *sk, __s32 *seq_rtt_p)
|
||||
int acked = 0;
|
||||
int prior_packets = tp->packets_out;
|
||||
__s32 seq_rtt = -1;
|
||||
ktime_t last_ackt = ktime_set(0,0);
|
||||
ktime_t last_ackt = net_invalid_timestamp();
|
||||
|
||||
while ((skb = tcp_write_queue_head(sk)) &&
|
||||
skb != tcp_send_head(sk)) {
|
||||
@@ -2487,6 +2487,10 @@ static int tcp_clean_rtx_queue(struct sock *sk, __s32 *seq_rtt_p)
|
||||
tcp_ack_update_rtt(sk, acked, seq_rtt);
|
||||
tcp_ack_packets_out(sk);
|
||||
|
||||
/* Is the ACK triggering packet unambiguous? */
|
||||
if (acked & FLAG_RETRANS_DATA_ACKED)
|
||||
last_ackt = net_invalid_timestamp();
|
||||
|
||||
if (ca_ops->pkts_acked)
|
||||
ca_ops->pkts_acked(sk, pkts_acked, last_ackt);
|
||||
}
|
||||
|
Reference in New Issue
Block a user