Page MenuHomeFreeBSD

tcp: don't send beyond receivers advertised window
ClosedPublic

Authored by glebius on Dec 29 2024, 12:28 AM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, Jun 4, 2:33 PM
Unknown Object (File)
Sun, May 31, 11:01 PM
Unknown Object (File)
Sat, May 30, 11:36 PM
Unknown Object (File)
Wed, May 13, 1:59 AM
Unknown Object (File)
Tue, May 12, 1:09 PM
Unknown Object (File)
Tue, May 12, 11:33 AM
Unknown Object (File)
Tue, May 12, 10:58 AM
Unknown Object (File)
Tue, May 12, 8:55 AM
Subscribers

Details

Summary

When calculating length of data to be sent, we may do some congestion
calculations, but we shall never send a byte beyond (snd_una + snd_wnd).
In 7dc78150c730e we started to use tcp_compute_pipe() instead of
(snd_wnd - off). This function makes an estimate of how much data is in flight. It
can return a value smaller and larger than (snd_nxt - snd_una). It will
return a value larger when we have retransmitted some data from SACK
holes, and smaller once those retransmitted SACK holes are acked.

We may use tcp_compute_pipe() for length calculation, but always capped
by the send offset 'off', which (snd_nxt - snd_una).

Fixes: 7dc78150c730e90fa2afdaba3aa645932b30c429
PR: 283649

Diff Detail

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

Event Timeline

In the sack_rxmit block there is another cwin calculation that uses tcp_compute_pipe() without capping with off. Later this cwin is used to calculate len. However, I have never caught such condition, so this revision leaves the above tcp_compute_pipe() use untouched.

This revision is now accepted and ready to land.Jan 13 2025, 10:21 AM