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
Unknown Object (File)
Mon, Nov 11, 2:02 AM
Unknown Object (File)
Thu, Nov 7, 4:05 PM
Unknown Object (File)
Thu, Nov 7, 12:44 AM
Unknown Object (File)
Tue, Nov 5, 3:21 PM
Unknown Object (File)
Tue, Oct 22, 11:12 PM
Unknown Object (File)
Tue, Oct 22, 11:12 PM
Unknown Object (File)
Tue, Oct 22, 5:14 AM
Unknown Object (File)
Tue, Oct 22, 5:14 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