From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:51989) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aqlSk-0000JW-H3 for qemu-devel@nongnu.org; Thu, 14 Apr 2016 13:53:55 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aqlSh-0002eZ-97 for qemu-devel@nongnu.org; Thu, 14 Apr 2016 13:53:54 -0400 Received: from mifritscher.de ([188.40.170.105]:52336 helo=mail.mifritscher.vserverkompetenz.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aqlSh-0002eD-2b for qemu-devel@nongnu.org; Thu, 14 Apr 2016 13:53:51 -0400 Message-ID: In-Reply-To: <1460655977-436-1-git-send-email-sw@weilnetz.de> References: <1460655977-436-1-git-send-email-sw@weilnetz.de> Date: Thu, 14 Apr 2016 19:53:48 +0200 From: "Michael Fritscher" MIME-Version: 1.0 Content-Type: text/plain;charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH for 2.6] wxx: Fix broken TCP networking (regression) List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Stefan Weil Cc: QEMU Developer , "Daniel P. Berrange" , Paolo Bonzini , Jan Kiszka , Samuel Thibault , Peter Maydell , Michael Fritscher > It is broken since commit c619644067f98098dcdbc951e2dda79e97560afa. > > Reported-by: Michael Fritscher > Signed-off-by: Stefan Weil > --- > > 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) =3D=3D -1) && > + (errno !=3D EAGAIN) && > (errno !=3D EINPROGRESS) && (errno !=3D EWOULDBLOCK) > ) { > uint8_t code; Hi, I tested it, works again (albeit being slow) :-) Many thanks! Tested-by: Michael Fritscher Best regards, Michael Fritscher