From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: passt.top; dmarc=fail (p=quarantine dis=none) header.from=redhat.com 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 43FE75A0269 for ; Mon, 23 Nov 2026 01:27:51 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1795393670; 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=JlaMOF70z2JWNGjifx0QU9iW6HwWtRdncpgbXyO6Aw8=; b=KULAQmKxs5kcAsRHA5b5mp2UbuS60eHhs92YVCAf/cdhueAfEdrA6dyRJP2UW8F3d0Jdl1 /i5JyMJi60ZdFNQKqo6/EVjYkX0u4XfOiBkR/U6BsBqDoKLiD4xIz+jB353Id+UqRO64SE Af2n8Z4vluZ7IpfWzXOAFlGDWz7jDlQ= Received: from mail-wr1-f69.google.com (mail-wr1-f69.google.com [209.85.221.69]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-203-KDz6Iz6cPzKR41r63-K7eA-1; Mon, 23 Nov 2026 00:27:48 +0000 X-MC-Unique: KDz6Iz6cPzKR41r63-K7eA-1 X-Mimecast-MFC-AGG-ID: KDz6Iz6cPzKR41r63-K7eA_1795393667 Received: by mail-wr1-f69.google.com with SMTP id ffacd0b85a97d-4a647e776b4so1941774f8f.1 for ; Sun, 22 Nov 2026 16:27:47 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1795393667; x=1795998467; h=date:content-transfer-encoding:content-type:mime-version :organization:references:in-reply-to:message-id:subject:cc:to:from :x-gm-gg:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to:content-type; bh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3xel53xXlm5EvIUTidB5iSo8wUBXm8MVAh7OfkTdFOK85mrjU08ZMZHyumSm3N2U= X-Received: by 2002:a05:600c:c168:b0:4bb:81b2:c801 with SMTP id 5b1f17b1804b1-4bb889238f1mr202410725e9.20.1795393666649; Sun, 22 Nov 2026 16:27:46 -0800 (PST) X-Received: by 2002:a05:600c:c168:b0:4bb:81b2:c801 with SMTP id 5b1f17b1804b1-4bb889238f1mr202410495e9.20.1795393666106; Sun, 22 Nov 2026 16:27:46 -0800 (PST) Received: from maya.myfinge.rs (ifcgrfdd.trafficplex.cloud. [2a10:fc81:a806:d6a9::1]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4bb85399d52sm297382635e9.6.2026.11.22.16.27.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 22 Nov 2026 16:27:45 -0800 (PST) From: Stefano Brivio To: Ada Urbaniec Subject: Re: [PATCH v3] tcp: Limit fast retransmit to one per loss event Message-ID: <20261123012744.12fa15f7@elisabeth> In-Reply-To: References: <20261120173756.2000624-1-anskuma@redhat.com> <20261120211833.656426f0@elisabeth> Organization: Red Hat X-Mailer: Claws Mail 4.2.0 (GTK 3.24.49; x86_64-pc-linux-gnu) MIME-Version: 1.0 Date: Mon, 23 Nov 2026 01:27:44 +0100 (CET) X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: H8FIxQZysTRPyG-WuJJwkchvFGgBEeImvVSuSvk4pyE_1795393667 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Message-ID-Hash: QRQJKNDRKYBAA5WVRQO64SPHF2ZBLKXB X-Message-ID-Hash: QRQJKNDRKYBAA5WVRQO64SPHF2ZBLKXB 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: Anshu Kumari , passt-dev@passt.top, Jon Maloy 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 Sat, 21 Nov 2026 12:00:38 +0100 Ada Urbaniec wrote: > Hi Stefano, Anshu, > > Thanks! Yes, I would be happy to have a Reported-by tag. Happy to help! > > I tested v3 as sent on my laptop, using source revision 6aa4f88 and Linux > 7.0.0-43. I used an extended version of the reproducer I uploaded to bug > 224 (attachment 73), with added periodic ACKs, delayed ACKs, zero-window > cases and retry timing measurements. Thanks for testing. Would you have a chance to upload that extended version to the ticket, so that we can try further changes against that? > With both directions open, dropping the first data segment stops causing a > retransmission storm. If the segment remains missing, v3 retries after > about two seconds. > > With a half-closed connection (the client sends FIN, then waits for the > response), v3 also stops the storm. Two cases still fail when the client > sends the same ACK every 10 ms: > > * If the missing segment is never accepted, there is no further retry > during the four-second test. > * If the client starts accepting that segment after 100 ms, there is still > no retry, and the transfer does not complete within four seconds. Fixing things for proper compliance with RFC 5681 will need a more involved rework, and this looks relatively minor (it should just take longer), so we could probably ignore this for the moment. On the other hand, I guess I know what's going on, and maybe we can quickly improve this temporary fix without adding much complexity: - in the TAP_FIN_RCVD path, as of v3, as noted by Jon at: https://archives.passt.top/passt-dev/7875d8c3-7d95-4986-a2f5-2c4a8618f328@redhat.com/ we still call tcp_data_from_sock(), which actually comes with the side effect of resetting timers (via conn_flag()) and unnecessarily delay retransmissions. If we skip that on !retr, as suggested by Jon, we should fix a part of this (maybe even all of it, I didn't test) - we now increase conn->retries so that it will start from 1 on a slow retransmit (not preceded by a fast retransmit), affecting (I'm not entirely sure) the timeout calculations in tcp_timer_ctl(). I don't see a simple way to avoid that side effect with the current meaning of conn->retries. But if we *later* introduce one bit indicating that we already started retransmitting, as Anshu's v2 does, then we should be able to account for this and avoid to spuriously increase the timeout (conn->retries could start from 0, and we would just skip fast retransmits if conn->retransmitting is already set). In any case, this needs a more complete implementation, as I pointed out, so I wouldn't change this for the moment being. > Without those repeated ACKs, the half-close recovery case completes after > about two seconds. > > V3 stops the storm, but repeated ACKs can still prevent a half-closed > connection from retrying. The earlier patch with the timer fix does retry > under the same conditions. The only issue I see with that patch is that it introduces further complexity (including a new flag) that we might very likely want to drop at a later point, because RFC 5681 dictates a more complicated implementation compared to what we have now. So I would really try to avoid that if we can fix the most annoying part of the issue with 4-5 lines now (without a new connection flag). -- Stefano