Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 26 Feb 2021 10:16:50 GMT
From:      Richard Scheffenegger <rscheff@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org
Subject:   git: c3aa4ba5dfc0 - stable/13 - Ensure cwnd doesn't shrink to zero with PRR
Message-ID:  <202102261016.11QAGoGr040608@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch stable/13 has been updated by rscheff:

URL: https://cgit.FreeBSD.org/src/commit/?id=c3aa4ba5dfc084e40e4151b25a0d5f8d24a036ba

commit c3aa4ba5dfc084e40e4151b25a0d5f8d24a036ba
Author:     Richard Scheffenegger <rscheff@FreeBSD.org>
AuthorDate: 2021-02-19 12:52:06 +0000
Commit:     Richard Scheffenegger <rscheff@FreeBSD.org>
CommitDate: 2021-02-26 07:39:55 +0000

    Ensure cwnd doesn't shrink to zero with PRR
    
    Under some circumstances, PRR may end up with a fully
    collapsed cwnd when finalizing the loss recovery.
    
    Reviewed By:    #transport, kbowling
    Reported by:    Liang Tian
    MFC after:      5 days
    Sponsored by:   NetApp, Inc.
    Differential Revision:  https://reviews.freebsd.org/D28780
    
    (cherry picked from commit 853fd7a2e39802e46bd3d6476529796ac22412d9)
---
 sys/netinet/tcp_input.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/sys/netinet/tcp_input.c b/sys/netinet/tcp_input.c
index 459b78cd444a..08d000611407 100644
--- a/sys/netinet/tcp_input.c
+++ b/sys/netinet/tcp_input.c
@@ -3972,8 +3972,8 @@ tcp_prr_partialack(struct tcpcb *tp, struct tcphdr *th)
 	 * If there is going to be a SACK retransmission, adjust snd_cwnd
 	 * accordingly.
 	 */
-	tp->snd_cwnd = tp->snd_nxt - tp->snd_recover +
-		tp->sackhint.sack_bytes_rexmit + (snd_cnt * maxseg);
+	tp->snd_cwnd = max(maxseg, (int64_t)tp->snd_nxt - tp->snd_recover +
+		tp->sackhint.sack_bytes_rexmit + (snd_cnt * maxseg));
 	tp->t_flags |= TF_ACKNOW;
 	(void) tcp_output(tp);
 }



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202102261016.11QAGoGr040608>