The branch stable/13 has been updated by rscheff: URL: https://cgit.FreeBSD.org/src/commit/?id=76dd854f47f4aea703093647a158f280d383ea6d
commit 76dd854f47f4aea703093647a158f280d383ea6d Author: Richard Scheffenegger <[email protected]> AuthorDate: 2021-01-26 15:06:32 +0000 Commit: Richard Scheffenegger <[email protected]> CommitDate: 2021-01-29 10:57:21 +0000 TCP PRR: Patch div/0 in tcp_prr_partialack Adding a safety net prior to the division in tcp_prr_partialack function, which was missed in D28114. Reviewed-by: tuexen, mm, @transport MFC: 3 days Differential Revision: https://reviews.freebsd.org/D28326 (cherry picked from commit 6a376af0cd212be4e16d013d35a0e2eec1dbb8ae) --- sys/netinet/tcp_input.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/sys/netinet/tcp_input.c b/sys/netinet/tcp_input.c index 4b8f91ed9d0b..459b78cd444a 100644 --- a/sys/netinet/tcp_input.c +++ b/sys/netinet/tcp_input.c @@ -510,7 +510,6 @@ cc_post_recovery(struct tcpcb *tp, struct tcphdr *th) } /* XXXLAS: EXIT_RECOVERY ? */ tp->t_bytes_acked = 0; - tp->sackhint.recover_fs = 0; } /* @@ -3948,10 +3947,13 @@ tcp_prr_partialack(struct tcpcb *tp, struct tcphdr *th) /* * Proportional Rate Reduction */ - if (pipe > tp->snd_ssthresh) + if (pipe > tp->snd_ssthresh) { + if (tp->sackhint.recover_fs == 0) + tp->sackhint.recover_fs = + max(1, tp->snd_nxt - tp->snd_una); snd_cnt = (tp->sackhint.prr_delivered * tp->snd_ssthresh / tp->sackhint.recover_fs) - tp->sackhint.sack_bytes_rexmit; - else { + } else { if (V_tcp_do_prr_conservative) limit = tp->sackhint.prr_delivered - tp->sackhint.sack_bytes_rexmit; _______________________________________________ [email protected] mailing list https://lists.freebsd.org/mailman/listinfo/dev-commits-src-all To unsubscribe, send any mail to "[email protected]"
