aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/tools
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2020-06-25 16:08:47 -0700
committerDavid S. Miller <davem@davemloft.net>2020-06-25 16:08:47 -0700
commit3b0e7dc0be62c6de0dbda68ac2961f27796919fb (patch)
tree49c330b281928a72db56ed5c0841426e1e78bda8 /tools
parentMerge branch 'Fixes-for-SJA1105-DSA-tc-gate-action' (diff)
parentbpf: tcp: bpf_cubic: fix spurious HYSTART_DELAY exit upon drop in min RTT (diff)
downloadwireguard-linux-3b0e7dc0be62c6de0dbda68ac2961f27796919fb.tar.xz
wireguard-linux-3b0e7dc0be62c6de0dbda68ac2961f27796919fb.zip
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.c5
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 +