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=WDT3Kjgj; 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 4290D5A0271 for ; Fri, 29 Aug 2025 22:11:26 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1756498285; 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=DDoiINfB0nM57ksZ9oydrzrlZ4ViJyOTl8gBCGMwhRo=; b=WDT3Kjgjbth4YE1OoFvlVOAToSnfREg27x4TvTdvO6aq1rnqaYTppJlsywXLQA6LLS6bOU y19WYkwQ1q81KCb+9r6qfY24ZZ7FlZiHbfd/SGmegasIP3QgoW8AbNrYaHmNRIg395VXN1 MKchJKHNDt0XYexc4AYxH/t8Fb509Ho= Received: from mail-wm1-f72.google.com (mail-wm1-f72.google.com [209.85.128.72]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-319-59a0tawDOYiD852_r5EYKw-1; Fri, 29 Aug 2025 16:11:23 -0400 X-MC-Unique: 59a0tawDOYiD852_r5EYKw-1 X-Mimecast-MFC-AGG-ID: 59a0tawDOYiD852_r5EYKw_1756498282 Received: by mail-wm1-f72.google.com with SMTP id 5b1f17b1804b1-45b7a0d1a71so16265195e9.2 for ; Fri, 29 Aug 2025 13:11:22 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1756498282; x=1757103082; h=content-transfer-encoding:mime-version:organization:references :in-reply-to:message-id:subject:cc:to:from:date:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=DDoiINfB0nM57ksZ9oydrzrlZ4ViJyOTl8gBCGMwhRo=; b=lsVV2dzn4CIj7Ry9NSArv4cw5vc6U3G1Sn7tLiWqHvJ2MWCJrplkqPCFlpMQclLdK0 U9ZTQo89LWToONigPFHBTYhoST4AQbATvzYp9tQZb6p4KBB0sJfwuTl9IWMitzuZFcd4 A2NvoYhWWHzzQsVyDvwhckS1F1G15uRIKU07r3zcGdrFaBzfSEo6o/WVWubX1JNOPZbL H7bTGIpEy7WH7rhzRRpRti1deN+K+Ls/uGWuzJLoWwGdXMa7NJadu0F6wIpTysPKWedU heIq3b4MxdCfZNYg4GdI0HhxD91TtXDB6mRmvW10NFl5hEe9M6IAscrXp4HxUlLna4iW 9wiw== X-Gm-Message-State: AOJu0YyXSIPyPCkmX7IN/EzHAp2a9mKNA9FvER8ll2NFcpAmAw2t6ccf Oj8whe74TBzKwhbO3Wws3vDW441s/WO7u305uWL/YxQ4avjhyr5s1PvWanuc/hHLpJKcd5/a9XN /zpkTkp6hMYYxrunRSr1XgnbLHEw1U8q6zP3mMoGLpxkF5De/fE/7BA== X-Gm-Gg: ASbGncujKQJcOJAqXMEU8FxpnOrLvf4NdyCTIMBJdwFQULLi7NVyz46pNqTDs2eJL0J 3XmKtmHOoOG7r1aiKHb1cHZ/bcTT/Oje79VQLjOxJvoVqCtlf1j1ixxlziOB0XwR4xWaiaekYbM Gw8W+rcUZekOWwicCpH0XpucYJrt7b+pylqxigStat5T0HFgBLZHh8HdBHiF8Uo+Py0pNOiFQrL EydCaGwGun2oFeo/GVwpSDBfODdjEWu1yTxVYkLRkaxqP7Holz9HIttNxHVZF2OkQjJ78G50o+g XhVmeDfwDEnKRr02FoTHuba89J2MaVj2wo646dFWe4gbDa0W+vwrNDs6DxmJBSD5Piwn X-Received: by 2002:a05:600c:4f93:b0:459:ddad:a3bd with SMTP id 5b1f17b1804b1-45b54b63944mr251684195e9.15.1756498281747; Fri, 29 Aug 2025 13:11:21 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHcHCeth5bEqLHwZkJcUiQ7BbpGSP8xpdv8TYefZWjjxRRkkEywLaZHF7L3YAn+eaZaHUNQ8Q== X-Received: by 2002:a05:600c:4f93:b0:459:ddad:a3bd with SMTP id 5b1f17b1804b1-45b54b63944mr251684045e9.15.1756498281293; Fri, 29 Aug 2025 13:11:21 -0700 (PDT) Received: from maya.myfinge.rs (ifcgrfdd.trafficplex.cloud. [176.103.220.4]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-45b6f0c6fe5sm131542925e9.5.2025.08.29.13.11.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 29 Aug 2025 13:11:20 -0700 (PDT) Date: Fri, 29 Aug 2025 22:11:18 +0200 From: Stefano Brivio To: passt-dev@passt.top Subject: Re: [PATCH v2 0/6] tcp: Fixes for issues uncovered by tests with 6.17-rc1 kernels Message-ID: <20250829221118.035a5996@elisabeth> In-Reply-To: <20250820210959.12518e26@elisabeth> References: <20250820165137.2004897-1-sbrivio@redhat.com> <20250820210959.12518e26@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: ONd4SUea4T8P2AEGLUpmhbaYAen7Pf1IVkVbGIiKWWc_1756498282 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Message-ID-Hash: B3PMQGYODYKPWPAIIDIJUBXCIN7NJJXZ X-Message-ID-Hash: B3PMQGYODYKPWPAIIDIJUBXCIN7NJJXZ 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: Jon Maloy , Paul Holzinger , David Gibson 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 Wed, 20 Aug 2025 21:09:59 +0200 Stefano Brivio wrote: > On Wed, 20 Aug 2025 18:51:31 +0200 > Stefano Brivio wrote: > > > Starting from Linux kernel commit 1d2fbaad7cd8 ("tcp: stronger > > sk_rcvbuf checks"), window limits are enforced more aggressively with > > a bigger amount of zero-window updates compared to what happened with > > e2142825c120 ("net: tcp: send zero-window ACK when no memory") alone, > > and occasional duplicate ACKs can now be seen also for local transfers > > with default (208 KiB) socket buffer sizes. > > > > Paul reports that, with 6.17-rc1-ish kernels, Podman tests for the > > pasta integration occasionally fail on the "TCP/IPv4 large transfer, > > tap" case. > > > > While playing with a reproducer that seems to be matching those > > failures: > > > > while true; do ./pasta --trace -l /tmp/pasta.log -p /tmp/pasta.pcap --config-net -t 5555 -- socat TCP-LISTEN:5555 OPEN:/tmp/large.rcv,trunc & (sleep 0.3; socat -T2 OPEN:large.bin TCP:88.198.0.164:5555; ); wait; diff large.bin /tmp/large.rcv || break; done > > > > and a kernel including that commit, I hit a few different failures, > > that should be fixed by this series. > > > > Paul tested v1 of this series and found an additional failure > > (transfer timeout), which I could reproduce with a slightly different > > command: > > > > while true; do ./pasta --trace -l /tmp/pasta.log -p /tmp/pasta.pcap --config-net -t 5555 -- socat TCP-LISTEN:5555 EXEC:./write.sh & (sleep 0.3; socat -T2 OPEN:large.bin TCP:88.198.0.164:5555; ); wait; diff large.bin /tmp/large.rcv || break; done > > > > where write.sh is simply: > > > > #!/bin/sh > > > > cat > /tmp/large.rcv > > > > so that the connection is not half-closed starting from the beginning, > > because socat can't make assumptions about the unidirectional nature > > of the traffic. This should now be fixed as well by the new version of > > patch 3/6. > > > > > > v2: in 3/6, rewind sequence also if the zero-window update comes in > > the middle of a batch with non-zero window updates > > Hmpf, never mind, this broke (on the second run): > > TCP/IPv4: ns to host (via tap): big transfer > > from the main tests (not Podman tests). I still need to look into it. Somewhat embarrassingly, the issue came from this change in 6/6: - if (SEQ_GE(seq_offset, 0) && SEQ_LE(seq + len, seq_from_tap)) + if (SEQ_GE(seq_offset, 0) && SEQ_LE(seq + dlen, seq_from_tap)) where dlen represents the same quantity as len, but is signed, and that throws SEQ_LE off. I'm posting v3 in a bit, with an additional patch fixing (in some sense) sequence comparison macros. -- Stefano