tcp cc: use tcp_compute_pipe() for pipe in xx_post_recovery() directly

This follows up with commit 67787d2004, and obsoletes the non-default
pipe calculation from commit 46f5848237 nearly 25 years ago.

Reviewed by: rscheff
Differential Revision: https://reviews.freebsd.org/D49247
This commit is contained in:
Cheng Cui 2025-03-05 11:35:20 -05:00
parent b0375f78e3
commit a8d2bccb87
No known key found for this signature in database
GPG key ID: F9BE886D1486EF98
3 changed files with 3 additions and 20 deletions

View file

@ -401,13 +401,8 @@ newreno_cc_post_recovery(struct cc_var *ccv)
* approximately snd_ssthresh outstanding data. But in case we
* would be inclined to send a burst, better to do it via the
* slow start mechanism.
*
* XXXLAS: Find a way to do this without needing curack
*/
if (V_tcp_do_newsack)
pipe = tcp_compute_pipe(ccv->tp);
else
pipe = CCV(ccv, snd_max) - ccv->curack;
pipe = tcp_compute_pipe(ccv->tp);
if (pipe < CCV(ccv, snd_ssthresh))
/*
* Ensure that cwnd does not collapse to 1 MSS under

View file

@ -530,14 +530,8 @@ cubic_post_recovery(struct cc_var *ccv)
* If inflight data is less than ssthresh, set cwnd
* conservatively to avoid a burst of data, as suggested in
* the NewReno RFC. Otherwise, use the CUBIC method.
*
* XXXLAS: Find a way to do this without needing curack
*/
if (V_tcp_do_newsack)
pipe = tcp_compute_pipe(ccv->tp);
else
pipe = CCV(ccv, snd_max) - ccv->curack;
pipe = tcp_compute_pipe(ccv->tp);
if (pipe < CCV(ccv, snd_ssthresh))
/*
* Ensure that cwnd does not collapse to 1 MSS under

View file

@ -375,14 +375,8 @@ htcp_post_recovery(struct cc_var *ccv)
* If inflight data is less than ssthresh, set cwnd
* conservatively to avoid a burst of data, as suggested in the
* NewReno RFC. Otherwise, use the HTCP method.
*
* XXXLAS: Find a way to do this without needing curack
*/
if (V_tcp_do_newsack)
pipe = tcp_compute_pipe(ccv->tp);
else
pipe = CCV(ccv, snd_max) - ccv->curack;
pipe = tcp_compute_pipe(ccv->tp);
if (pipe < CCV(ccv, snd_ssthresh))
/*
* Ensure that cwnd down not collape to 1 MSS under