From 3bd9b6c924c801dc5033510391ac251a7309219f Mon Sep 17 00:00:00 2001 From: eunhhu Date: Tue, 29 Sep 2026 16:41:24 +0100 Subject: 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. --- link/link-protocol.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'link/link-protocol.c') 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. */ -- cgit v1.2.3