public inbox for passt-dev@passt.top
 help / color / mirror / code / Atom feed
From: Paul Holzinger <pholzing@redhat.com>
To: Stefano Brivio <sbrivio@redhat.com>, passt-dev@passt.top
Cc: David Gibson <david@gibson.dropbear.id.au>
Subject: Re: [PATCH] tcp_splice: Fix side in OUT_WAIT flag setting
Date: Tue, 6 Aug 2024 14:33:02 +0200	[thread overview]
Message-ID: <f844d337-6133-4dde-b135-53646206eddf@redhat.com> (raw)
In-Reply-To: <20240806121249.3144030-1-sbrivio@redhat.com>


On 06/08/2024 14:12, 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>
Tested-by: Paul Holzinger <pholzing@redhat.com>
> ---
>   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;
>   		}
>   

-- 
Paul Holzinger


      parent reply	other threads:[~2024-08-06 12:33 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
2024-08-06 12:33 ` Paul Holzinger [this message]

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=f844d337-6133-4dde-b135-53646206eddf@redhat.com \
    --to=pholzing@redhat.com \
    --cc=david@gibson.dropbear.id.au \
    --cc=passt-dev@passt.top \
    --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).