Re: [PATCH net 2/2] tcp_metrics: use ssthresh value from dst if there is no metrics
From: Petr Tesarik
Date: Tue Jun 17 2025 - 07:56:32 EST
On Tue, 17 Jun 2025 12:48:30 +0200
Paolo Abeni <pabeni@xxxxxxxxxx> wrote:
> On 6/13/25 12:20 PM, Petr Tesarik wrote:
> > @@ -537,6 +537,9 @@ void tcp_init_metrics(struct sock *sk)
> >
> > inet_csk(sk)->icsk_rto = TCP_TIMEOUT_FALLBACK;
> > }
> > +
> > + if (tp->snd_ssthresh > tp->snd_cwnd_clamp)
> > + tp->snd_ssthresh = tp->snd_cwnd_clamp;
>
> I don't think we can do this unconditionally, as other parts of the TCP
> stack check explicitly for TCP_INFINITE_SSTHRESH.
Good catch! I noticed that the condition can never be true unless the
congestion window is explicitly clamped, but you're right that it is a
valid combination to lock the maximum cwnd but keep the initial TCP Slow
Start.
I'll fix that in v2.
Thank you,
Petr T