From: David Gibson <david@gibson.dropbear.id.au>
To: Stefano Brivio <sbrivio@redhat.com>
Cc: passt-dev@passt.top, Paul Holzinger <pholzing@redhat.com>
Subject: Re: [PATCH] tcp_splice: Fix side in OUT_WAIT flag setting
Date: Tue, 6 Aug 2024 22:28:10 +1000 [thread overview]
Message-ID: <ZrIW2j4O0OZf16JQ@zatzit.fritz.box> (raw)
In-Reply-To: <20240806121249.3144030-1-sbrivio@redhat.com>
[-- Attachment #1: Type: text/plain, Size: 1300 bytes --]
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.
>
> This causes random transfer failures for local TCP connections,
> depending if we ever need to wait for output readiness.
>
> Reported-by: Paul Holzinger <pholzing@redhat.com>
> Link: https://github.com/containers/podman/issues/23517
> Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
Reviewed-by: David Gibson <david@gibson.dropbear.id.au>
And mea culpa.
> ---
> 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;
> }
>
--
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
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
next prev parent reply other threads:[~2024-08-07 1:04 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-08-06 12:12 [PATCH] tcp_splice: Fix side in OUT_WAIT flag setting Stefano Brivio
2024-08-06 12:28 ` David Gibson [this message]
2024-08-06 12:33 ` Paul Holzinger
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ZrIW2j4O0OZf16JQ@zatzit.fritz.box \
--to=david@gibson.dropbear.id.au \
--cc=passt-dev@passt.top \
--cc=pholzing@redhat.com \
--cc=sbrivio@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://passt.top/passt
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for IMAP folder(s).