diff options
| author | eunhhu <[email protected]> | 2026-09-29 16:41:24 +0100 |
|---|---|---|
| committer | eunhhu <[email protected]> | 2026-09-29 16:41:24 +0100 |
| commit | 3bd9b6c924c801dc5033510391ac251a7309219f (patch) | |
| tree | d0465bb16850b822e4b2a09a73cf370993fd4f16 /link/link-protocol.c | |
| parent | 590cbb9d0c73c9e48ac4a637c2e88a7e99c7965f (diff) | |
| download | pure-3bd9b6c924c801dc5033510391ac251a7309219f.tar.gz pure-3bd9b6c924c801dc5033510391ac251a7309219f.zip | |
Take no send larger than a receiver holds: 16 MiB, not 64
A sender took sends up to 64 MiB, but a receiver holds 16 MiB of a
stream not yet stored, so a send between the two went again forever.
The most a send may be is now PURE_LINK_RECORD_MOST, what a receiver
holds; test-link sends one that large whole and is refused one byte more.
Diffstat (limited to 'link/link-protocol.c')
| -rw-r--r-- | link/link-protocol.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/link/link-protocol.c b/link/link-protocol.c index 7bc4b00..62def6f 100644 --- a/link/link-protocol.c +++ b/link/link-protocol.c @@ -51,9 +51,10 @@ static const double CUBIC_C = 0.4, CUBIC_BETA = 0.7, RENO_PACE = 3 * (1 - 0.7) / #define MS UINT64_C(1000000) /* RFC 9002's values, but a first RTT of 100 ms (a LAN's, not the 333 ms of * the Internet at large); a probe at least every second while a receiver is - * away; a record received but not stored after a second is sent again. */ + * away; a record received but not stored after a second is sent again. A + * receiver holds as much of a stream not yet stored as a record may be. */ static const uint64_t FIRST_RTT = 100 * MS, ACK_DELAY_MOST = 25 * MS, GRANULARITY = 1 * MS, PTO_MOST = 1000 * MS, - STORED_WAIT = 1000 * MS, RECORD_MOST = UINT64_C(64) << 20, HELD_MOST = UINT64_C(16) << 20, + STORED_WAIT = 1000 * MS, RECORD_MOST = PURE_LINK_RECORD_MOST, HELD_MOST = RECORD_MOST, REACH_AGAIN = 1000 * MS, REACH_RARELY = 600000 * MS; /* An epoch lasts an hour or a GiB sent; a sender that hears nothing for 2 s * with packets out, and four probes, takes its epoch for lost. */ |
