All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Daniel P. Berrangé" <berrange@redhat.com>
To: Hafiz Abid Qadeer <abidh@codesourcery.com>
Cc: Samuel Thibault <samuel.thibault@ens-lyon.org>,
	qemu-devel@nongnu.org, Hafiz Abid Qadeer <abid_qadeer@mentor.com>
Subject: Re: [PATCH] Fix a typo that can cause slow socket response on Windows.
Date: Fri, 29 Jan 2021 15:05:30 +0000	[thread overview]
Message-ID: <20210129150530.GG4008275@redhat.com> (raw)
In-Reply-To: <20210129143149.493012-1-abidh@codesourcery.com>

On Fri, Jan 29, 2021 at 02:31:49PM +0000, Hafiz Abid Qadeer wrote:
> We observed slow responses on a host forwarded port on Windows. Investigation revealed that qemu_fd_register was being called with fd=-1 and this caused g_poll in qemu_poll_ns timing out. I tracked this behavior to following commit:
> 748f8f4 slirp: replace qemu_set_nonblock()
> 
> @@ -482,7 +483,8 @@ void tcp_connect(struct socket *inso)
>          tcp_close(sototcpcb(so)); /* This will sofree() as well */
>          return;
>      }
> -    qemu_set_nonblock(s);
> +    slirp_set_nonblock(s);
> +    so->slirp->cb->register_poll_fd(so->s);
> 
> It seems that calling register_poll_fd with so->s instead of s may be a typo. Changing it back to s solves this issue. The commit 748f8f4 made similar change in tcp_fconnect but I have not touched it.
> 
> Signed-off-by: Hafiz Abid Qadeer <abidh@codesourcery.com>
> ---
>  src/tcp_subr.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Thanks for your suggested patch, however, slirp is now spun off into its
own standalone project. You can submit patches using merge requests at

  https://gitlab.freedesktop.org/slirp/libslirp

QEMU will periodically pull in updates from slirp.

Regards,
Daniel
-- 
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|



      reply	other threads:[~2021-01-29 15:09 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-29 14:31 [PATCH] Fix a typo that can cause slow socket response on Windows Hafiz Abid Qadeer
2021-01-29 15:05 ` Daniel P. Berrangé [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=20210129150530.GG4008275@redhat.com \
    --to=berrange@redhat.com \
    --cc=abid_qadeer@mentor.com \
    --cc=abidh@codesourcery.com \
    --cc=qemu-devel@nongnu.org \
    --cc=samuel.thibault@ens-lyon.org \
    /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.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.