tcp: fix RTO ssthresh for non-6675 pipe calculation

Follow up on D43768 to properly deal with the non-default
pipe calculation. When CC_RTO is processed, the timeout
will have already pulled back snd_nxt. Further, snd_fack
is not pulled along with snd_una.

Reviewed By:		tuexen, #transport
Sponsored by:		NetApp, Inc.
Differential Revision:	https://reviews.freebsd.org/D43876
This commit is contained in:
Richard Scheffenegger 2024-02-14 14:51:39 +01:00
parent b76ef9a7cb
commit fcea1cc971
6 changed files with 9 additions and 5 deletions

View file

@ -492,7 +492,7 @@ newreno_cc_cong_signal(struct cc_var *ccv, uint32_t type)
if (V_tcp_do_newsack) {
pipe = tcp_compute_pipe(ccv->ccvc.tcp);
} else {
pipe = CCV(ccv, snd_nxt) -
pipe = CCV(ccv, snd_max) -
CCV(ccv, snd_fack) +
CCV(ccv, sackhint.sack_bytes_rexmit);
}

View file

@ -479,7 +479,7 @@ cubic_cong_signal(struct cc_var *ccv, uint32_t type)
if (V_tcp_do_newsack) {
pipe = tcp_compute_pipe(ccv->ccvc.tcp);
} else {
pipe = CCV(ccv, snd_nxt) -
pipe = CCV(ccv, snd_max) -
CCV(ccv, snd_fack) +
CCV(ccv, sackhint.sack_bytes_rexmit);
}

View file

@ -296,7 +296,7 @@ dctcp_cong_signal(struct cc_var *ccv, uint32_t type)
if (V_tcp_do_newsack) {
pipe = tcp_compute_pipe(ccv->ccvc.tcp);
} else {
pipe = CCV(ccv, snd_nxt) -
pipe = CCV(ccv, snd_max) -
CCV(ccv, snd_fack) +
CCV(ccv, sackhint.sack_bytes_rexmit);
}

View file

@ -327,7 +327,7 @@ htcp_cong_signal(struct cc_var *ccv, uint32_t type)
if (V_tcp_do_newsack) {
pipe = tcp_compute_pipe(ccv->ccvc.tcp);
} else {
pipe = CCV(ccv, snd_nxt) -
pipe = CCV(ccv, snd_max) -
CCV(ccv, snd_fack) +
CCV(ccv, sackhint.sack_bytes_rexmit);
}

View file

@ -431,7 +431,7 @@ newreno_cong_signal(struct cc_var *ccv, uint32_t type)
if (V_tcp_do_newsack) {
pipe = tcp_compute_pipe(ccv->ccvc.tcp);
} else {
pipe = CCV(ccv, snd_nxt) -
pipe = CCV(ccv, snd_max) -
CCV(ccv, snd_fack) +
CCV(ccv, sackhint.sack_bytes_rexmit);
}

View file

@ -461,6 +461,10 @@ cc_cong_signal(struct tcpcb *tp, struct tcphdr *th, uint32_t type)
tp->t_badrxtwin = 0;
break;
}
if (SEQ_LT(tp->snd_fack, tp->snd_una) ||
SEQ_GT(tp->snd_fack, tp->snd_max)) {
tp->snd_fack = tp->snd_una;
}
if (CC_ALGO(tp)->cong_signal != NULL) {
if (th != NULL)