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)
Sun, Oct 12, 12:21 AM
Unknown Object (File)
Sat, Oct 11, 5:04 AM
Unknown Object (File)
Mon, Oct 6, 8:36 PM
Unknown Object (File)
Fri, Oct 3, 7:02 PM
Unknown Object (File)
Sun, Sep 28, 11:53 PM
Unknown Object (File)
Sat, Sep 27, 9:38 PM
Unknown Object (File)
Sat, Sep 27, 9:28 PM
Unknown Object (File)
Sun, Sep 21, 5:03 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