From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail.ozlabs.org (gandalf.ozlabs.org [150.107.74.76]) by passt.top (Postfix) with ESMTPS id D43C05A031A for ; Wed, 07 Aug 2024 03:04:26 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gibson.dropbear.id.au; s=202312; t=1722992659; bh=phJ0psqtrmNEfmMWTnJbqZXYelm/EzoPKGlGYOsOwaE=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=M7dJPg1G4ljKo6Kh+7FemhoKhyVDjBqssQH6FCGIqoHDAzoPyjrbRJUTORDJnNPol DLL5g7aI9oJGIrF8pSwgGjmCxqcS7MUy1IORi/RaTR6Am3hTrU3tQeIW9lSFzRW3xI 7K9wzyiOT7VehlqoL4Bysn6pX6tGhD7r9ica2/kSOixGA8babRbR8YyclR04qK/rAM ABWS9hIx9wLN1OHnoOt2EJA+WpQHsadgt4FFm5xldf3Ew0tbOnwmCG8M388+gbWYV4 vpgtETXWL0cPGO7VP9MpEXNNocWgldHm7y6zBseFk12zjHMq0oWrx423f6Sd94qS+O pUgnDOq68s3MQ== Received: by gandalf.ozlabs.org (Postfix, from userid 1007) id 4WdsQC3wgQz4wd6; Wed, 7 Aug 2024 11:04:19 +1000 (AEST) Date: Tue, 6 Aug 2024 22:28:10 +1000 From: David Gibson To: Stefano Brivio Subject: Re: [PATCH] tcp_splice: Fix side in OUT_WAIT flag setting Message-ID: References: <20240806121249.3144030-1-sbrivio@redhat.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="ZyQXQf+ydHd8yJYZ" Content-Disposition: inline In-Reply-To: <20240806121249.3144030-1-sbrivio@redhat.com> Message-ID-Hash: SLDAOBC2MHEDFZ57WHJJ457AWPHLJGRV X-Message-ID-Hash: SLDAOBC2MHEDFZ57WHJJ457AWPHLJGRV 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: passt-dev@passt.top, 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: --ZyQXQf+ydHd8yJYZ Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Aug 06, 2024 at 02:12:49PM +0200, Stefano Brivio wrote: > 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. >=20 > This causes random transfer failures for local TCP connections, > depending if we ever need to wait for output readiness. >=20 > Reported-by: Paul Holzinger > Link: https://github.com/containers/podman/issues/23517 > Signed-off-by: Stefano Brivio Reviewed-by: David Gibson And mea culpa. > --- > tcp_splice.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) >=20 > 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] =3D=3D conn->written[fromsidei]) > break; > =20 > - conn_event(c, conn, OUT_WAIT(fromsidei)); > + conn_event(c, conn, OUT_WAIT(!fromsidei)); > break; > } > =20 --=20 David Gibson (he or they) | I'll have my music baroque, and my code david AT gibson.dropbear.id.au | minimalist, thank you, not the other way | around. http://www.ozlabs.org/~dgibson --ZyQXQf+ydHd8yJYZ Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEO+dNsU4E3yXUXRK2zQJF27ox2GcFAmayFtkACgkQzQJF27ox 2GdYkg/+KrMKAv5umHPa1IiW37Tv7P0lWNHya6MhKZciAhcYtgPS87VIKC6ob/F6 r4cq9BRR5GyJWzjiKFW8osg0uLGUoYGakBk1ZKhJ04eDtaabW9GND6yguwr9jo1I JWk31RZVHyHbCq6CDiwKIorsA1EEAS2O/No2wbQ+H1FGLEtQ8rjPxNMj9MvMhfNS UyxvuPcAXnzvQftmIWF/5qggftICeAzCOrKcZSud0Il6sucn04/Xt3FgqTahGHkK BEAiA/5U3EeF5nhxNgVk6hHORMT12PZDp1Eno24sOxnWTJAdqQ80y57kLvsokIaK cztXtpwmRLigbO654nO+ufbGMDldQWIX5VmeKApFwUskkfBOGo0aWjFPir+Hb1DL n/60TyKL+mEMqFxC40G6jVT6/pq9RUHYRF2VVADljaH1MgtjZDtAsaoWUYcRlmvC dEv0a2gcHfvfAqIMSXvbMHhdH0NLkVchTqCnQ2NpEXTZf4U62PmiGFtErew5SRn7 ixOvV22KCMaeeRbZ+xpzNyXdr3MEPTlHJ31XjBF2SMz5ZZMjvox9pXM+VUqsPYB9 IQdQvKBC4FAR5vKFrnf0Qi2mXA3DZhw20HIvm6pvQW+0Aw+XqPqC3q+bIYV0CIY1 ObkrrX7Lu6FV43hWCed2o1KogBBgf+foRHh5mQ7XTnsSJOO2sIE= =Mxx1 -----END PGP SIGNATURE----- --ZyQXQf+ydHd8yJYZ--