On Sat, Dec 13, 2025 at 03:24:06PM +0100, Stefano Brivio wrote: > On Mon, 8 Dec 2025 09:11:07 +0100 > Stefano Brivio wrote: > > > On Mon, 8 Dec 2025 17:43:14 +1100 > > David Gibson wrote: > > > > > On Mon, Dec 08, 2025 at 01:22:14AM +0100, Stefano Brivio wrote: > > > > If the sender uses data clumping (including Nagle's algorithm) for > > > > Silly Window Syndrome (SWS) avoidance, advertising less than a MSS > > > > means the sender might stop sending altogether, and window updates > > > > after a low window condition are just as important as they are in > > > > a zero-window condition. > > > > > > > > For simplicity, approximate that limit to zero, as we have an > > > > implementation forcing window updates after zero-sized windows. > > > > This matches the suggestion from RFC 813, section 4. > > > > > > > > Signed-off-by: Stefano Brivio > > > > Reviewed-by: David Gibson > > > > > > Looking at this again, I'm worrying if it might allow a pathalogical > > > case here: unlikely to hit, but very bad if it did. > > > > > > Suppose we have: > > > 1. A receiver that wants to consume its input in fixed largish > > > (~64kiB) records > > > 2. The receiver has locked its SO_RCVBUF to that record length, or > > > only slightly more > > > 3. The receive buf is near full - but not quite a full record's > > > worth > > > > > > The receiver doesn't consume anything, because it doesn't have a full > > > record. Its rcvbuf is near full, so its kernel advertises only a > > > small window. We approximate that to zero, so the sender can't send > > > anything. So, the record never gets completed and we stall > > > completely. > > > > I don't think it can be a problem because the receiver shouldn't > > advertise less than a MSS in that case anyway, but I need to look up > > normative references for this. > > As you predicted, I just got a report of a similar stall, which is > pretty bad and easy to reproduce. Sometimes I hate being right :). -- David Gibson (he or they) | I'll have my music baroque, and my code david AT gibson.dropbear.id.au | minimalist, thank you, not the other way | around. http://www.ozlabs.org/~dgibson