HomeFreeBSD

tcp: don't send beyond receivers advertised window

Description

tcp: don't send beyond receivers advertised window

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).

PR: 283649
Reviewed by: rscheff
Differential Revision: https://reviews.freebsd.org/D48237
Fixes: 7dc78150c730e90fa2afdaba3aa645932b30c429

Details

Provenance
glebiusAuthored on Mon, Jan 13, 6:13 PM
Reviewer
rscheff
Differential Revision
D48237: tcp: don't send beyond receivers advertised window
Parents
rGb84f41b4e82d: tcp: properly reset sackhint values when SACK recovery is done
Branches
Unknown
Tags
Unknown