aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv4
diff options
authorPaolo Abeni <pabeni@redhat.com>2025-01-21 10:24:33 +0100
committerPaolo Abeni <pabeni@redhat.com>2025-01-21 10:24:33 +0100
commitcf33d96f50903214226b379b3f10d1f262dae018 (patch)
tree8b64282d8c569760d2e2e53eb4011b6d3755017e /net/ipv4
parentb1754a69e7be48a64b3cdb0df60a96d97959da73 (diff)
parentd640627663bfe7d8963c7615316d7d4ef60f3b0b (diff)
downloadath-cf33d96f50903214226b379b3f10d1f262dae018.tar.gz
Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net
No conflicts and no adjacent changes. Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Diffstat (limited to 'net/ipv4')
-rw-r--r--net/ipv4/tcp_cubic.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/net/ipv4/tcp_cubic.c b/net/ipv4/tcp_cubic.c
index 5dbed91c61782..76c23675ae50a 100644
--- a/net/ipv4/tcp_cubic.c
+++ b/net/ipv4/tcp_cubic.c
@@ -392,6 +392,10 @@ static void hystart_update(struct sock *sk, u32 delay)
if (after(tp->snd_una, ca->end_seq))
bictcp_hystart_reset(sk);
+ /* hystart triggers when cwnd is larger than some threshold */
+ if (tcp_snd_cwnd(tp) < hystart_low_window)
+ return;
+
if (hystart_detect & HYSTART_ACK_TRAIN) {
u32 now = bictcp_clock_us(sk);
@@ -467,9 +471,7 @@ __bpf_kfunc static void cubictcp_acked(struct sock *sk, const struct ack_sample
if (ca->delay_min == 0 || ca->delay_min > delay)
ca->delay_min = delay;
- /* hystart triggers when cwnd is larger than some threshold */
- if (!ca->found && tcp_in_slow_start(tp) && hystart &&
- tcp_snd_cwnd(tp) >= hystart_low_window)
+ if (!ca->found && tcp_in_slow_start(tp) && hystart)
hystart_update(sk, delay);
}