From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: passt.top; dmarc=pass (p=quarantine dis=none) header.from=redhat.com Authentication-Results: passt.top; dkim=pass (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=GBts/sg1; dkim-atps=neutral Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by passt.top (Postfix) with ESMTPS id E45365A0271 for ; Mon, 08 Dec 2025 09:11:13 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1765181472; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=L+s76iPfKq6aZ2Wo2sStPfZ0EdDYR4UIqsWG0ucQuLs=; b=GBts/sg1k0awp5mWHHMkiCHi4ZJock7G8Wk5t8I74Dvp7KwGqmMdbLoKwZ+QgHk96iUEQ0 p8tXTe/ZOx+wGiq9OxVFcWeVsn+iLFFnBvBXyYCToMWQ35dK7aB29XUfSsyg8jj1n15qSa c88IRAwthBkRKmIUpXDw/2rg5iFu6bc= Received: from mail-wm1-f70.google.com (mail-wm1-f70.google.com [209.85.128.70]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-515-VeglXh0kM-qJhJpYJF790Q-1; Mon, 08 Dec 2025 03:11:11 -0500 X-MC-Unique: VeglXh0kM-qJhJpYJF790Q-1 X-Mimecast-MFC-AGG-ID: VeglXh0kM-qJhJpYJF790Q_1765181470 Received: by mail-wm1-f70.google.com with SMTP id 5b1f17b1804b1-47788165c97so25300415e9.0 for ; Mon, 08 Dec 2025 00:11:11 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1765181470; x=1765786270; h=content-transfer-encoding:mime-version:organization:references :in-reply-to:message-id:subject:cc:to:from:date:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=L+s76iPfKq6aZ2Wo2sStPfZ0EdDYR4UIqsWG0ucQuLs=; b=coniJK4n+wXBC2Zzf15Gii6n1Eaf8Jjf1idZV+psA29imLEyro0imeFhPhDTS0FXAs FLguCS0DhKSXUOFzEg07cdo6hfukqtPMnGgo5NonScKg2X2lKUnIe/hiRX5y8xAl5RtO 70/xLXmfZ03qF7uVzVvAO2wczVCRSX9JixJ0lxQ1MgeaylzqegqoQHitLLAiKBaeY7IZ 6D+QD9L94xxltpAN0K9eupJCRpYq9U5+HMOM4A2AhaUZUfirUKQrOecHhx0qmTzUk98o XXlic4lMsv2ZxWxVMELb3nVcvVFobsxc0PseRIzjZwbhwcKEXNLB743VP4AJBpd0L1eP jfiA== X-Gm-Message-State: AOJu0YyBkIx68nmlXpy0LrlFMoPp5kRzYAN0EtAbwG9f9qnYBho0fn4C zh48gWL6O493yC49PlyAlXjnZepylE+bMYGtPYNZ0qKVH/Rj2Yo2+Z9t+R/sqSEldjG57byM/Mc hRkTYDUwgM++vRKLbxVzKJ5OVWK+/57rhZ1wlwynKF1THyqkGfcYHRg== X-Gm-Gg: ASbGncuRAgApTM6FuNPzqxnncdy4ydL7X8Oy3vSCjmN/775rLrtmAS4r8cpH0TZaxOD 3t+8qkHdWlEFjK1z7UW29Fn5BzNDSsni+miqcDfuv0NrTGHbw4L0lP0rAY304ibYmDnNHNR/8Uk wcLcx5mKwxtF9nLSWibozVptc/D/aXJVoC3v+ZWE4sDlcvy87oEiloQiB6a9hLj3AJ3CAagSNCE cLZ1kMSFBseJZLFtfZWF772U3S83sdCl74E/V+9Cjab8HjQ8wMazoiY1f+8zXXyVUwrAGsO1VUr 5kQjMgaMaFHvQ1DnOCUDlQ4lPJqI2YmGS0fwWV6/L9FWc/I4UX95qoo4Jtm5JbZ7lWiXvqzzDqZ SNegVl76oW1yEO+DxNP6L X-Received: by 2002:a05:600c:1990:b0:477:73e9:dbe7 with SMTP id 5b1f17b1804b1-47939e4d013mr78240875e9.35.1765181470102; Mon, 08 Dec 2025 00:11:10 -0800 (PST) X-Google-Smtp-Source: AGHT+IEviesjLLTj0Wfgzahxd7oTM971PZY84Yg91wm0+2ZHDTmthgI4gbAunJYNl+zICwrrTh/KYw== X-Received: by 2002:a05:600c:1990:b0:477:73e9:dbe7 with SMTP id 5b1f17b1804b1-47939e4d013mr78240545e9.35.1765181469484; Mon, 08 Dec 2025 00:11:09 -0800 (PST) Received: from maya.myfinge.rs (ifcgrfdd.trafficplex.cloud. [2a10:fc81:a806:d6a9::1]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4792b156604sm115736635e9.16.2025.12.08.00.11.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 08 Dec 2025 00:11:08 -0800 (PST) Date: Mon, 8 Dec 2025 09:11:07 +0100 From: Stefano Brivio To: David Gibson Subject: Re: [PATCH v2 6/9] tcp: Don't limit window to less-than-MSS values, use zero instead Message-ID: <20251208091107.3dfff830@elisabeth> In-Reply-To: References: <20251208002229.391162-1-sbrivio@redhat.com> <20251208002229.391162-7-sbrivio@redhat.com> Organization: Red Hat X-Mailer: Claws Mail 4.2.0 (GTK 3.24.49; x86_64-pc-linux-gnu) MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: Pb06nGSjDKmQk5lTX4xUjPy6cVlyJUQgizEIv7_ln1g_1765181470 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Message-ID-Hash: FFJEWGIT2D7TE3PXYF6ZD7NWVAJ2CT4P X-Message-ID-Hash: FFJEWGIT2D7TE3PXYF6ZD7NWVAJ2CT4P X-MailFrom: sbrivio@redhat.com 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: 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. -- Stefano