Page MenuHomeFreeBSD

tcp: don't send beyond receivers advertised window
Needs ReviewPublic

Authored by glebius on Sun, Dec 29, 12:28 AM.
Tags
None
Referenced Files
Unknown Object (File)
Tue, Jan 7, 7:44 PM
Unknown Object (File)
Tue, Jan 7, 6:21 AM
Unknown Object (File)
Tue, Jan 7, 5:20 AM
Unknown Object (File)
Tue, Jan 7, 2:40 AM
Unknown Object (File)
Mon, Jan 6, 2:23 PM
Unknown Object (File)
Sun, Jan 5, 7:17 PM
Subscribers

Details

Reviewers
rscheff
Group Reviewers
transport
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 Skipped
Unit
Tests Skipped
Build Status
Buildable 61377
Build 58261: arc lint + arc unit

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.