From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: passt.top; dmarc=none (p=none dis=none) header.from=gibson.dropbear.id.au Authentication-Results: passt.top; dkim=pass (2048-bit key; secure) header.d=gibson.dropbear.id.au header.i=@gibson.dropbear.id.au header.a=rsa-sha256 header.s=202512 header.b=U5zacvEN; dkim-atps=neutral Received: from mail.ozlabs.org (gandalf.ozlabs.org [150.107.74.76]) by passt.top (Postfix) with ESMTPS id 634975A0653 for ; Mon, 15 Dec 2025 03:03:14 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gibson.dropbear.id.au; s=202512; t=1765764191; bh=0BXTGmcBWRsXaRfKURXA2o2av4Wsx2pDpfxaeZZdhl0=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=U5zacvENrekv+sdIqj1rLS9UhW+I9vv4ZcUgYP4k59uolLgqeSc2CSM6cMzAH8le3 aofalPyc4X1hjmvPpuSpnLI7MUUKutGyzRK845L4ryM5Kmn6iaZGcg+OGN3MqpqHzl 0HevrxCk504TUuheUyodDhA04CqPqW8MmCHePpAslJdjArdJcSEg14qSfK6Yl8FY1I th4jzyIxl33V8LkZz1KBdgoiqestpRBZPd1tCMTlZt0YlvrNo6mzFFBzESkcj2JKmg vA4G/BrOTcwny0VX/WPJkALxDL5gYJCXO6DMxl9/BkcjXVXBPlHc7Pms7ja0/H9Kng VEbdAq51YWlmw== Received: by gandalf.ozlabs.org (Postfix, from userid 1007) id 4dV3Hf75bjz4w23; Mon, 15 Dec 2025 13:03:10 +1100 (AEDT) Date: Mon, 15 Dec 2025 13:03:06 +1100 From: David Gibson To: Stefano Brivio Subject: Re: [PATCH v2 6/9] tcp: Don't limit window to less-than-MSS values, use zero instead Message-ID: References: <20251208002229.391162-1-sbrivio@redhat.com> <20251208002229.391162-7-sbrivio@redhat.com> <20251208091107.3dfff830@elisabeth> <20251213152406.5269b64d@elisabeth> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="h2ldhNkgNCiz84FR" Content-Disposition: inline In-Reply-To: <20251213152406.5269b64d@elisabeth> Message-ID-Hash: A5QWDNVYDTYTPA2AJMADOB55LU5COQFK X-Message-ID-Hash: A5QWDNVYDTYTPA2AJMADOB55LU5COQFK X-MailFrom: dgibson@gandalf.ozlabs.org X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: passt-dev@passt.top, Max Chernoff X-Mailman-Version: 3.3.8 Precedence: list List-Id: Development discussion and patches for passt Archived-At: Archived-At: List-Archive: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: --h2ldhNkgNCiz84FR Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable 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: >=20 > > On Mon, 8 Dec 2025 17:43:14 +1100 > > David Gibson wrote: > >=20 > > > On Mon, Dec 08, 2025 at 01:22:14AM +0100, Stefano Brivio wrote: =20 > > > > 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. > > > >=20 > > > > 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. > > > >=20 > > > > Signed-off-by: Stefano Brivio > > > > Reviewed-by: David Gibson =20 > > >=20 > > > Looking at this again, I'm worrying if it might allow a pathalogical > > > case here: unlikely to hit, but very bad if it did. > > >=20 > > > 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 > > >=20 > > > 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. =20 > >=20 > > 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. >=20 > 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 :). --=20 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 --h2ldhNkgNCiz84FR Content-Type: application/pgp-signature; name=signature.asc -----BEGIN PGP SIGNATURE----- iQIzBAEBCgAdFiEEO+dNsU4E3yXUXRK2zQJF27ox2GcFAmk/bFkACgkQzQJF27ox 2Gdhcw/+JkiFgCyhlnpxTVazuGaYd8AgglMvZYNuydjgbsmt+MGZmqsqaU5lKUBs uO7xCPToF0aR3+Imyk/yZKXp3DQHFSKdP8LG3d2Q6nzFlAg2PxD6kXYClwh1iW5J l+FYVwS1pj9zQCPTte6kG5u5eozMXvYdn6gJejjH4h9IQt2qglUTljjd57tTwnFs atahxK6tFmJVhjDa7eViaKX9pUGcWzbXZz+GLw8Mm7jp0fJA0nM+XbdB3S9IQ6ea qbiYbnIIRXaihVsR0URD5LNkL0zhyig+L5ckjaHm0nDNyNNAl///oIOy+0T2kaM2 imS5+WthUccEcCAbsn9CvdP+GLHY7AYUO+pRFI48EnozvNwHmFYwemyYc8ZWd8kn RB+JSkyJz8XujTp1gMKKpPo0K4hN+MO6gSNKJX0mI9l/WDRrtTD+RcHFMz11pc1s MIqjUZpXEWHteOYa/FIJ2oGACN7RBPeckyk95LuyfA3OQjl01sUYUxhemD8ymYVI Reati0VQhMgSttQNu68s+YNa6lRrkXOUG0kQe09e5h79nnuQEt6/SbFZ+x1AcRpL WQv/zvfxlPhlapJVz/PPpc4tBXOmDFTDPqhVmjsV95gIIFFpn08fb8GPwQWt5j2G q1F/aiBNLf7H8YY2wZlmeks4kEJuGnfmJm+jj1UP2JvKenx0o/Q= =veOJ -----END PGP SIGNATURE----- --h2ldhNkgNCiz84FR--