qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH for 2.6] wxx: Fix broken TCP networking (regress


From: Daniel P. Berrange
Subject: Re: [Qemu-devel] [PATCH for 2.6] wxx: Fix broken TCP networking (regression)
Date: Fri, 15 Apr 2016 10:11:35 +0100
User-agent: Mutt/1.5.24 (2015-08-30)

On Thu, Apr 14, 2016 at 07:46:17PM +0200, Stefan Weil wrote:
> It is broken since commit c619644067f98098dcdbc951e2dda79e97560afa.
> 
> Reported-by: Michael Fritscher <address@hidden>
> Signed-off-by: Stefan Weil <address@hidden>
> ---
> 
> Networking with QEMU for Windows is currently not usable,
> see bug report https://bugs.launchpad.net/qemu/+bug/1569988.
> 
> With this patch, it seems to work again at least partially.
> Michael Fritscher reported that it is still slow, so
> more fixes might be needed.
> 
> Would it be better to add conditional compilation to
> slirp/tcp_input.c again (then the changes would only
> be for Windows, so no new risk for QEMU 2.6)?
> 
> Peter, I'd appreciate to get Windows networking fixed
> for 2.6, so feel free to modify and apply this patch as
> needed if time is too short for reviews and my pull request.
> 
> Regards,
> Stefan
> 
>  slirp/slirp.h     | 5 -----
>  slirp/tcp_input.c | 1 +
>  2 files changed, 1 insertion(+), 5 deletions(-)
> 
> diff --git a/slirp/slirp.h b/slirp/slirp.h
> index c99ebb9..203deec 100644
> --- a/slirp/slirp.h
> +++ b/slirp/slirp.h
> @@ -347,9 +347,4 @@ struct tcpcb *tcp_drop(struct tcpcb *tp, int err);
>  #define max(x,y) ((x) > (y) ? (x) : (y))
>  #endif
>  
> -#ifdef _WIN32
> -#undef errno
> -#define errno (WSAGetLastError())
> -#endif
> -
>  #endif
> diff --git a/slirp/tcp_input.c b/slirp/tcp_input.c
> index 5433e7f..e2b5d4e 100644
> --- a/slirp/tcp_input.c
> +++ b/slirp/tcp_input.c
> @@ -659,6 +659,7 @@ findso:
>         }
>  
>         if ((tcp_fconnect(so, so->so_ffamily) == -1) &&
> +              (errno != EAGAIN) &&
>                (errno != EINPROGRESS) && (errno != EWOULDBLOCK)
>            ) {
>           uint8_t code;

Reviewed-by: Daniel P. Berrange <address@hidden>


Technically you can also kill that EWOULDBLOCK check there and in
other files since we gaurantee you'll always get EAGAIN now.


Unrelated to the problm you describe, I notice in socket.c there are
also a couple of places which call WSASetLastError which should be
removed, so it just sets errno unconditionally. These merely affect
error reporting quality though so not critical.


Also unrelated, we should probably kill the WSAStartup() call in slirp.c
because QEMU vl.c ensures that's called already

Regards,
Daniel
-- 
|: http://berrange.com      -o-    http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org              -o-             http://virt-manager.org :|
|: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org       -o-       http://live.gnome.org/gtk-vnc :|



reply via email to

[Prev in Thread] Current Thread [Next in Thread]