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=KkoY5WnJ; 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 EACB55A0626 for ; Sat, 13 Dec 2025 15:24:14 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1765635853; 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=//pbiwfpGrD+aVX0yjqMPOmEdbZE28e9g+miTUiG3J8=; b=KkoY5WnJcIrvOf6voUCqNYsvNJFybAePnWAO2ZcUypAxCKSLiMoAUtJLhNhREX+/kxBjPl va0LWSyltybs4OtWIRsjDyVU4PWRixohCj2gmC48razdPlpHYDapflrNQDCRX/0o9hbXr8 aoEiXeZ3uSqfgDV3Lbnt9MIo7V4CmEc= Received: from mail-wr1-f71.google.com (mail-wr1-f71.google.com [209.85.221.71]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-241-Jj0E0QQBOtSxbZJdCswtHA-1; Sat, 13 Dec 2025 09:24:11 -0500 X-MC-Unique: Jj0E0QQBOtSxbZJdCswtHA-1 X-Mimecast-MFC-AGG-ID: Jj0E0QQBOtSxbZJdCswtHA_1765635850 Received: by mail-wr1-f71.google.com with SMTP id ffacd0b85a97d-42b366a76ffso968304f8f.1 for ; Sat, 13 Dec 2025 06:24:10 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1765635849; x=1766240649; 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=//pbiwfpGrD+aVX0yjqMPOmEdbZE28e9g+miTUiG3J8=; b=B4VhMLiaDbABVRnhiXIJsFg8K5UOvMwZkaTHLxKO3fSdM+pvoSaFyLZfFLitHnkQ9K 58fSjLvAYEJYbzJNiF9xWwqMFQVR4x1uanmlBPQGwqp3570NG5mn68OQvVph+ECBNldj 033jb57qiyXoDnVngkP0/4G7lb49E9cgJbxZ102O/eDrJKFaJuOgg3HvJJsyGm+pGzDV FfuZy6i5nOj6gkTdvw/gFWDMk3C0FaJ+pMH26bUMiedicJTILT741rjQylL4bZUcHGpO oW8j4esmn82bvD5VDC/NEF3GaxzT4SY7zdQ1vbdVA19g4hPLxHX1exLBBCsl8tv5wDB5 t4HA== X-Gm-Message-State: AOJu0YzkpebwR+9qzA14RY7h+Pwo17xleZ0imrZkP9XrBJkLm9bjKZXw GktSQAmMcgFoxR+H9khGqagHr1DyBvRcRx7QEtCsVEct2YliOIeaLjxVyhYv0fe/Qx//PLfCHat woWWFMjiTju+UmmLdXQYSKFh8s6ww97gR6TkkiyGwRX4wKAYxV0okoUjPOeHo5g== X-Gm-Gg: AY/fxX4cQT2WwkfZY2shO3IS5Jyo+myV7rDlyEap2NlyX0DNkagqf4OdeyZFiQBSldC q3j7WvLqcTA8dgEv0TbezJWN+ZqxM6f/Hj3h9svC8oZiCZunNOItHmFGLv9/CFp+eLkOgkNOCao nhG343bUoKmaluHHd+jqslf1ZSMl6NNPTkgkv5C9PzQam+QFHF4WkI8O4MyaNZ8S53hWI/sOPGS YE8pYjqhTMTDhDHQ6tEp4OCDreYICeb8hYNRteKaup4emfgmVgAXdoUUXT6tLRIWZK8ZcO2wpgT RhqUBr8MnoSKU/nPpRhVMPbKKTlHOsJllQMWFlyVt/rrJzh3XaNzwl26Ks/fcZt/w4T4nbPC1TI 10E86bitC9iNqKArUSHx4dHZX66qiHtb8cqDMRA== X-Received: by 2002:adf:feca:0:b0:42f:b649:6dc9 with SMTP id ffacd0b85a97d-42fb6496ebdmr4460463f8f.58.1765635849016; Sat, 13 Dec 2025 06:24:09 -0800 (PST) X-Google-Smtp-Source: AGHT+IFWrYHa4qsUwGwUskw/Ec3RA785DUbWU9jZhGjDUVIcHrqT+LOMWV4qntqy+LLVVhYYGIosYw== X-Received: by 2002:adf:feca:0:b0:42f:b649:6dc9 with SMTP id ffacd0b85a97d-42fb6496ebdmr4460447f8f.58.1765635848445; Sat, 13 Dec 2025 06:24:08 -0800 (PST) Received: from maya.myfinge.rs (ifcgrfdd.trafficplex.cloud. [176.103.220.4]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-42fa8b8a9efsm19272864f8f.33.2025.12.13.06.24.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 13 Dec 2025 06:24:07 -0800 (PST) Date: Sat, 13 Dec 2025 15:24:06 +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: <20251213152406.5269b64d@elisabeth> In-Reply-To: <20251208091107.3dfff830@elisabeth> References: <20251208002229.391162-1-sbrivio@redhat.com> <20251208002229.391162-7-sbrivio@redhat.com> <20251208091107.3dfff830@elisabeth> 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: tpCoq0Ckqu2VerL5vEoSxeLelDajdRQkZUB2qq-8e1g_1765635850 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Message-ID-Hash: EGJQANKCK4QQN72M4H6C4COXB4CTG6KN X-Message-ID-Hash: EGJQANKCK4QQN72M4H6C4COXB4CTG6KN 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 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. Meanwhile I didn't find any normative references covering this particular case (peer advertising less than MSS), but that didn't actually happen. More details in https://bugs.passt.top/show_bug.cgi?id=183 and in the patch I'm posting right now. -- Stefano