diff options
author | David S. Miller <davem@davemloft.net> | 2020-06-26 02:08:47 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2020-06-26 02:08:47 +0300 |
commit | 3b0e7dc0be62c6de0dbda68ac2961f27796919fb (patch) | |
tree | 49c330b281928a72db56ed5c0841426e1e78bda8 /tools | |
parent | 29a30bac564252d732f6c387617a3456e038bdf6 (diff) | |
parent | 7d21d54d624777358ab6c7be7ff778808fef70ba (diff) | |
download | linux-3b0e7dc0be62c6de0dbda68ac2961f27796919fb.tar.xz |
Merge branch 'tcp_cubic-fix-spurious-HYSTART_DELAY-on-RTT-decrease'
Neal Cardwell says:
====================
tcp_cubic: fix spurious HYSTART_DELAY on RTT decrease
This series fixes a long-standing bug in the TCP CUBIC
HYSTART_DELAY mechanim recently reported by Mirja Kuehlewind. The
code can cause a spurious exit of slow start in some particular
cases: upon an RTT decrease that happens on the 9th or later ACK
in a round trip. This series fixes the original Hystart code and
also the recent BPF implementation.
====================
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'tools')
-rw-r--r-- | tools/testing/selftests/bpf/progs/bpf_cubic.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/tools/testing/selftests/bpf/progs/bpf_cubic.c b/tools/testing/selftests/bpf/progs/bpf_cubic.c index 7897c8f4d363..ef574087f1e1 100644 --- a/tools/testing/selftests/bpf/progs/bpf_cubic.c +++ b/tools/testing/selftests/bpf/progs/bpf_cubic.c @@ -480,10 +480,9 @@ static __always_inline void hystart_update(struct sock *sk, __u32 delay) if (hystart_detect & HYSTART_DELAY) { /* obtain the minimum delay of more than sampling packets */ + if (ca->curr_rtt > delay) + ca->curr_rtt = delay; if (ca->sample_cnt < HYSTART_MIN_SAMPLES) { - if (ca->curr_rtt > delay) - ca->curr_rtt = delay; - ca->sample_cnt++; } else { if (ca->curr_rtt > ca->delay_min + |