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=C1U0karo; dkim-atps=neutral Received: from mail.ozlabs.org (gandalf.ozlabs.org [150.107.74.76]) by passt.top (Postfix) with ESMTPS id 558015A0269 for ; Thu, 28 May 2026 07:02:18 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gibson.dropbear.id.au; s=202602; t=1779944534; bh=08PFwRobIV7rgAfdbmM9A+CUqn0DU9oBmOpu1K1jL+0=; h=From:To:Cc:Subject:Date:From; b=C1U0karolbT3eGjjqBH39J1k34jtlVAm/56+ctoHX8vWRkxKK9zSFGviyqBL9ct2Z 0+0aLwrPwICfMHjwSxJtlAR9MJMSsu96/YDNx+WK76wWh99bIXjHSuIUrxaXo3V4Ip DhHT8ofzW6IIF7Mc8+y1jDXT9Z8p78uJX+FzDaXIeGx6yybBrADQas2Zq/PdS6BOM/ 4ZQi6MPhYjJlKPn6hwDbzYRFPLQlE6wrbYPEaBodjHXSNaOQBIDUa/f6GuTxcfQZdb fWPTm/zytHI0AEaXGoo8yeTcs61kowNEHec1G11qEZVObCp5jAw7JzxHXJbcoad69y hMjBCZFnvrIag== Received: by gandalf.ozlabs.org (Postfix, from userid 1007) id 4gQvVZ6g98z4wLm; Thu, 28 May 2026 15:02:14 +1000 (AEST) From: David Gibson To: passt-dev@passt.top, Stefano Brivio Subject: [PATCH 0/8] splice() forwarding cleanups Date: Thu, 28 May 2026 15:02:05 +1000 Message-ID: <20260528050213.679685-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: TQGZHBUOBW5D7UAGQJGB4XKFQRMPNCTH X-Message-ID-Hash: TQGZHBUOBW5D7UAGQJGB4XKFQRMPNCTH 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: 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: As we discussed on an earlier call, while fixing bug 202 I noticed a number of warts in the surrounding splice() forwarding code. Most are just things that are longer or harder to follow than they need to be, but in some cases there may be real (if unlikely to trigger) bugs. Here's a collection of fixes. David Gibson (8): tcp_splice: Remove never-invoked SO_RCVLOWAT logic tcp_splice: Simplify EPOLLRDHUP / eof / FIN handling tcp_splice: Improve EOF exit condition for the loop tcp_splice: Remove goto from forwarding loop tcp_splice: Simplify shutdown(2) handling tcp_splice: Simplify / correct OUT_WAIT flag handling tcp_splice: Remove questionable "optimisation" of pending bytes tracking tcp_splice: Exit forwarding earlier when stalled read side tcp_splice.c | 100 ++++++++++++++++----------------------------------- 1 file changed, 31 insertions(+), 69 deletions(-) -- 2.54.0