diff options
author | stephen hemminger <shemminger@vyatta.com> | 2011-03-14 03:52:12 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2011-03-14 18:54:38 -0400 |
commit | febf081987ec445f071ed10b73e9707a88cc5cc4 (patch) | |
tree | 2afd0d3fba79620b889935b678ac8c024e10c19d | |
parent | a23c37f1110d8912d4d0a66e78197e9195bb36d4 (diff) |
tcp: fix RTT for quick packets in congestion control
In the congestion control interface, the callback for each ACK
includes an estimated round trip time in microseconds.
Some algorithms need high resolution (Vegas style) but most only
need jiffie resolution. If RTT is not accurate (like a retransmission)
-1 is used as a flag value.
When doing coarse resolution if RTT is less than a a jiffie
then 0 should be returned rather than no estimate. Otherwise algorithms
that expect good ack's to trigger slow start (like CUBIC Hystart)
will be confused.
Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r-- | net/ipv4/tcp_input.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c index 65f6c0406245..e16b17efcf57 100644 --- a/net/ipv4/tcp_input.c +++ b/net/ipv4/tcp_input.c | |||
@@ -3350,7 +3350,7 @@ static int tcp_clean_rtx_queue(struct sock *sk, int prior_fackets, | |||
3350 | net_invalid_timestamp())) | 3350 | net_invalid_timestamp())) |
3351 | rtt_us = ktime_us_delta(ktime_get_real(), | 3351 | rtt_us = ktime_us_delta(ktime_get_real(), |
3352 | last_ackt); | 3352 | last_ackt); |
3353 | else if (ca_seq_rtt > 0) | 3353 | else if (ca_seq_rtt >= 0) |
3354 | rtt_us = jiffies_to_usecs(ca_seq_rtt); | 3354 | rtt_us = jiffies_to_usecs(ca_seq_rtt); |
3355 | } | 3355 | } |
3356 | 3356 | ||