Page MenuHomeFreeBSD

tcp: move cc_post_recovery past snd_una update
ClosedPublic

Authored by rscheff on Jan 20 2024, 12:43 AM.
Tags
None
Referenced Files
F82583814: D43520.diff
Tue, Apr 30, 3:35 PM
Unknown Object (File)
Fri, Apr 26, 3:04 AM
Unknown Object (File)
Thu, Apr 4, 8:32 AM
Unknown Object (File)
Thu, Apr 4, 8:31 AM
Unknown Object (File)
Thu, Apr 4, 8:31 AM
Unknown Object (File)
Thu, Apr 4, 8:31 AM
Unknown Object (File)
Thu, Apr 4, 8:30 AM
Unknown Object (File)
Thu, Apr 4, 8:27 AM

Details

Summary

After a loss (or ECN) recovery phase, cwnd is updated
to reflect the current pipe. However, with RFC6675
(sack.revised, enabled by default since D28702),
tcp_compute_pipe() uses snd_max - snd_una, while the
previous default calculates (correctly) from snd_max
to cur_ack (th_ack) - and snd_una is not yet updated
from the incoming ACK.

With other words, cwnd is set not only to the current
amount of data in flight, but to include everything which
is to be partially or fully acked.

At small cwnd and no lost retransmissions / RTOs, this
difference is relatively small and easy to miss.

With lost retransmissions, or RTOs - the difference can
become as large as the receive window (not the congestion
window previously), potentially triggering a massive
burst of new packets.

MFC after 1 week to stable/14 and stable/13

Test Plan

At a large cwnd, induce a lost retransmission. On the
subsequent recovery (3rd transmission of the packet),
cwnd will inflate much larger than expected.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

  • break lines at 80
  • compact two consecutive if statements into one
This revision is now accepted and ready to land.Jan 29 2024, 7:49 AM