Hi, RFC 5681 Section 3.1 has an Implementation Note that covers the bug fixed by the following patch. I ran into this bug testing on a high latency link. My congestion window was pinned to a specific value and could not open further, causing a lack of bandwidth utilization.
I chose if/assign rather than max(9) for clarity with the RFC; however, both work fine. Cheers, Brian Index: tcp_input.c =================================================================== RCS file: /home/brian/cvs/src/sys/netinet/tcp_input.c,v retrieving revision 1.364 diff -u -r1.364 tcp_input.c --- tcp_input.c 6 Dec 2019 14:43:14 -0000 1.364 +++ tcp_input.c 1 Jun 2020 21:16:26 -0000 @@ -1707,8 +1707,11 @@ u_int cw = tp->snd_cwnd; u_int incr = tp->t_maxseg; - if (cw > tp->snd_ssthresh) + if (cw > tp->snd_ssthresh) { incr = incr * incr / cw; + if (incr == 0) + incr = 1; + } if (tp->t_dupacks < tcprexmtthresh) tp->snd_cwnd = ulmin(cw + incr, TCP_MAXWIN << tp->snd_scale);