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=KuJ8X8wC; dkim-atps=neutral Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by passt.top (Postfix) with ESMTPS id A7B9E5A027A for ; Mon, 01 Sep 2025 12:02:44 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1756720963; 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=yVybsAZqDxHb1qfOAFa3njuibBiNDUoHYP7ebn8MOu0=; b=KuJ8X8wC8Oh00iQ3ket6AzwbATQAJNSgyUSEQAiokWPZmKOYEg8mUuaj2zB05AANFhh2KI OgXBxa/tj0L6PJg7q1DZl4Pg728fa/L2CzRxttzU+R3MVr0HvhZ2w/USbu8AmBRkrcrsJS 4vrYx2w7BXuFLMM5h27sqiJCr0bQjRU= Received: from mail-qv1-f69.google.com (mail-qv1-f69.google.com [209.85.219.69]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-376-67Cg38Q6PlSskzpSqLq71Q-1; Mon, 01 Sep 2025 06:02:42 -0400 X-MC-Unique: 67Cg38Q6PlSskzpSqLq71Q-1 X-Mimecast-MFC-AGG-ID: 67Cg38Q6PlSskzpSqLq71Q_1756720962 Received: by mail-qv1-f69.google.com with SMTP id 6a1803df08f44-70de47323ddso111123116d6.3 for ; Mon, 01 Sep 2025 03:02:42 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1756720962; x=1757325762; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=yVybsAZqDxHb1qfOAFa3njuibBiNDUoHYP7ebn8MOu0=; b=lmhKV6GznoNkwIa9Nq2cbiFI/oAyz9KPG4M8qItvPgvf9fm0gqxXLjQoegI3LPE3Va 6YtYjQ6GTC1bvXQocbOiiME6GgLryxAPVc6ZNUiDtdAGKaii0bZ2lLeFKfjWW4UNuLK6 e63+ZF/7sePp8z8XPPJ4kz2Fui6jlmNygV7MB7kXa8L5w3rP3xZJTs+HR9x7+8ew1THY omS583624tGSnzENIufHbFDOrCNAK9DbEkmZED7ijsQEB2o0P4HcBr2/yxbjlt2FecRn 0IpiIGNK2i0qcgKE/ExvcdBgr54qrx0N6BL6AFcyW26EN1V/+1F2YV0tMR5FaugyZ+MR VN8A== X-Forwarded-Encrypted: i=1; AJvYcCW2zHg2FcHX5vz+s6RH1inZAXUU68rZazVQdd7RF+tQBpR0bshYAn5qJgn4qoRjGFQadx3JnQZOJ/k=@passt.top X-Gm-Message-State: AOJu0YwRVdYYcHxyhpBv8K0xHWDaiB+DvIn7ZOSOTPgFZark2JxDQBzn 8MU8lwNQGDadGrl0UJWNVJiUR1HaqdyLNqxoH+kWGx9evkmSeU11Znew/BjDPqwG7F50DqCVCmo W+d4ZaHxDP6v9it/YK5CGKoIxBsd82bQ5WjYSstzc0I0NFQEaiHPkkw== X-Gm-Gg: ASbGncuag07+M1AtaAovFTCekcXvmD9CUpOatpQOi2woYT1Ht3kl3IORqNSnJmpKTHm eZFoR/T3mikbP7U4zVkUgz1QqXQDBbnoaWvaQXDBsLnEDO2uGzNsEBb10NLm6X3yP9JYCPMKW19 FP3EI2PXoxaVayGXMzztR53UY7LDiSbFw3eJhgbhUtUykVxBsuemzZfVgNRR8t7ZlYsx1UCzX27 Zi2i3wj9L/4mjgUlQB9HYPGLqTr8Ib50wDitMbC/XHjlD7bSYsp6q2hLoK0y/GJRUmDmKjn7v7z VbJHVU4cr8LYj38ZEqoh/pjIqTULjnUfCXOVU9OawD7emw== X-Received: by 2002:ad4:5d47:0:b0:71d:bc7d:4dca with SMTP id 6a1803df08f44-71dbc7d55c3mr4636936d6.65.1756720961728; Mon, 01 Sep 2025 03:02:41 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHWcM3UjR7ysY13u5l0KJ+SqTqybxP3VqcQpuJpHzXBfbD0tfa6FXBgJIV+uAtVaB7iG+R7JQ== X-Received: by 2002:ad4:5d47:0:b0:71d:bc7d:4dca with SMTP id 6a1803df08f44-71dbc7d55c3mr4636606d6.65.1756720961287; Mon, 01 Sep 2025 03:02:41 -0700 (PDT) Received: from [192.168.188.22] ([80.243.52.136]) by smtp.gmail.com with ESMTPSA id 6a1803df08f44-70fb2831b57sm37554956d6.47.2025.09.01.03.02.39 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 01 Sep 2025 03:02:40 -0700 (PDT) Message-ID: <4a234ba5-90bb-40e3-b479-b65ffedc6fd7@redhat.com> Date: Mon, 1 Sep 2025 12:02:37 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v3 0/7] tcp: Fixes for issues uncovered by tests with 6.17-rc1 kernels To: Stefano Brivio , passt-dev@passt.top References: <20250829201132.1561650-1-sbrivio@redhat.com> From: Paul Holzinger In-Reply-To: <20250829201132.1561650-1-sbrivio@redhat.com> X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: m8tdpMaV30Rv8flfJl4cAR1fRhdKG4xR49k0GDe9cro_1756720962 X-Mimecast-Originator: redhat.com Content-Language: en-US Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Message-ID-Hash: HN3AJJKP6D4RF7ZCVDGRAJ4BVWCZYGV3 X-Message-ID-Hash: HN3AJJKP6D4RF7ZCVDGRAJ4BVWCZYGV3 X-MailFrom: pholzing@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 , 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: Hi, On 29/08/2025 22:11, 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/7. > > v3: > - add patch 6/7 > - in 7/7, check dlen <= 1 for keep-alive segments, instead of len <= 1 > > v2: in 3/6, rewind sequence also if the zero-window update comes in > the middle of a batch with non-zero window updates > > Stefano Brivio (7): > tcp: FIN flags have to be retransmitted as well > tcp: Factor sequence rewind for retransmissions into a new function > tcp: Rewind sequence when guest shrinks window to zero > tcp: Fix closing logic for half-closed connections > tcp: Don't try to transmit right after the peer shrank the window to > zero > tcp: Cast operands of sequence comparison macros to uint32_t before > using them > tcp: Fast re-transmit if half-closed, make TAP_FIN_RCVD path > consistent > > tcp.c | 181 ++++++++++++++++++++++++++++++++++--------------- > tcp_internal.h | 12 ++-- > 2 files changed, 136 insertions(+), 57 deletions(-) I am afraid I have to give bad news that it is still broken. My reproducer failed after 70 mins (without logs) which means it took longer this time but I only have one run so far so hard to tell. I can enable logs again and see how long it takes then. -- Paul Holzinger