From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: passt.top; dmarc=none (p=none dis=none) header.from=gibson.dropbear.id.au Authentication-Results: passt.top; dkim=pass (2048-bit key; secure) header.d=gibson.dropbear.id.au header.i=@gibson.dropbear.id.au header.a=rsa-sha256 header.s=202602 header.b=A74vMBDo; dkim-atps=neutral Received: from mail.ozlabs.org (gandalf.ozlabs.org [150.107.74.76]) by passt.top (Postfix) with ESMTPS id C3C445A0265 for ; Thu, 21 May 2026 08:37:51 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gibson.dropbear.id.au; s=202602; t=1779345468; bh=U31NQVnEZ6S+FSkB8eodUwgoGBzyewE6SnWVXtDohYk=; h=From:To:Cc:Subject:Date:From; b=A74vMBDoxGICpwJ8h/mJGSU4ZAbB3b9dBpGSYGNmNktknv2fCEQyNqdmhBEX083Ko cMgkp+iBonjMoj9OQnU4rjRyck+63pEPFapgv3GZYZzifw5My+dXaLGjmf+0yV3gyF oobHPf5SMzEGx6r959SZR7XKDfUEhyVGMA7iy+lzRbj13Z4dip7XrQVjF2PwbuofDB h5g00xXWsiT61Bs+Wg48nBl46XJDA/0Q4gQKhnM+AMB2/haS/EDdtcvET2pZ8dqsad 5OQrvbCkVfTbVlG8HhzwfeOYJ1G7ES7iBDdaVaYcL9aoTCp89mdQ7MKW+B7yaV4M87 AdyyXkD0KfdYg== Received: by gandalf.ozlabs.org (Postfix, from userid 1007) id 4gLdy44475z4wJG; Thu, 21 May 2026 16:37:48 +1000 (AEST) From: David Gibson To: passt-dev@passt.top, Stefano Brivio Subject: [PATCH v2 0/4] Fix race condition while closing spliced connections Date: Thu, 21 May 2026 16:37:41 +1000 Message-ID: <20260521063745.1211215-1-david@gibson.dropbear.id.au> X-Mailer: git-send-email 2.54.0 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Message-ID-Hash: UQWHFV7IGSHMC5OBAX53UVYUPMYM5L6S X-Message-ID-Hash: UQWHFV7IGSHMC5OBAX53UVYUPMYM5L6S X-MailFrom: dgibson@gandalf.ozlabs.org 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: 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: Fix bug 202, where a race condition could cause connections to be incorrectly reset in certain circumstances. Patch 2/4 is the bug fix proper. 1/4 improves error reporting and debugging messages in the vicinity. Patches 3..4/4 are some small cleanups I noticed in the area while working on the fix. Link: https://bugs.passt.top/show_bug.cgi?id=202 v2: * Formatting and comment fixes, per Stefano's review * Dropped patches 5 & 6 for now. I still think they're worthwhile, but are closely related to other oddities that need some work. I didn't want to delay the bugfix itself. David Gibson (4): tcp_splice: Improve error reporting tcp_splice: Avoid missing EOF recognition while forwarding tcp_splice: Clean up flow control path for splice forwarding tcp_splice: Simplify tracking of read/written bytes flow.h | 7 ++ log.h | 19 +++--- passt.c | 2 +- tcp_conn.h | 6 +- tcp_splice.c | 185 ++++++++++++++++++++++++++++++--------------------- tcp_splice.h | 2 +- 6 files changed, 129 insertions(+), 92 deletions(-) -- 2.54.0