From mboxrd@z Thu Jan 1 00:00:00 1970 Received: by passt.top (Postfix, from userid 1000) id 74C605A0319; Tue, 06 Aug 2024 14:12:49 +0200 (CEST) From: Stefano Brivio To: passt-dev@passt.top Subject: [PATCH] tcp_splice: Fix side in OUT_WAIT flag setting Date: Tue, 6 Aug 2024 14:12:49 +0200 Message-ID: <20240806121249.3144030-1-sbrivio@redhat.com> X-Mailer: git-send-email 2.43.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Message-ID-Hash: C5SW4LO7QEEQI6SDXVZHF4YA3IDLT6JG X-Message-ID-Hash: C5SW4LO7QEEQI6SDXVZHF4YA3IDLT6JG X-MailFrom: sbrivio@passt.top 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 , Paul Holzinger 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: If the "from" (input) side for a given transfer is 0, and we can't complete the write right away, what we need to be waiting for is for output readiness on side 1, not 0, and the other way around as well. This causes random transfer failures for local TCP connections, depending if we ever need to wait for output readiness. Reported-by: Paul Holzinger Link: https://github.com/containers/podman/issues/23517 Signed-off-by: Stefano Brivio --- tcp_splice.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tcp_splice.c b/tcp_splice.c index 473562b..483e45d 100644 --- a/tcp_splice.c +++ b/tcp_splice.c @@ -577,7 +577,7 @@ eintr: if (conn->read[fromsidei] == conn->written[fromsidei]) break; - conn_event(c, conn, OUT_WAIT(fromsidei)); + conn_event(c, conn, OUT_WAIT(!fromsidei)); break; } -- 2.43.0