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)
Mon, Apr 7, 12:05 AM
Unknown Object (File)
Mon, Mar 31, 11:00 PM
Unknown Object (File)
Tue, Mar 25, 6:35 PM
Unknown Object (File)
Tue, Mar 25, 1:57 AM
Unknown Object (File)
Mar 3 2025, 8:48 PM
Unknown Object (File)
Feb 28 2025, 8:58 AM
Unknown Object (File)
Feb 25 2025, 8:35 PM
Unknown Object (File)
Feb 23 2025, 5:13 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