From: Paolo Bonzini <pbonzini@redhat.com>
To: TeLeMan <geleman@gmail.com>
Cc: Stefan Hajnoczi <stefanha@gmail.com>,
qemu-devel <qemu-devel@nongnu.org>,
Fabien Chouteau <chouteau@adacore.com>,
Bug 1179731 <1179731@bugs.launchpad.net>
Subject: Re: [Qemu-devel] [Bug 1179731] [NEW] is networking broken on windows hosts?
Date: Tue, 14 May 2013 13:48:52 +0200 [thread overview]
Message-ID: <519224A4.4000800@redhat.com> (raw)
In-Reply-To: <CAETRQWmwXjLJpJZ3D1Rf5iK=2+ZBxzXPcqGep-LFz5vwmDK44A@mail.gmail.com>
Il 14/05/2013 13:39, TeLeMan ha scritto:
> On Tue, May 14, 2013 at 6:46 PM, Paolo Bonzini <pbonzini@redhat.com> wrote:
>> Il 14/05/2013 12:24, TeLeMan ha scritto:
>>> On Tue, May 14, 2013 at 3:51 PM, Stefan Hajnoczi <stefanha@gmail.com> wrote:
>>>> On Tue, May 14, 2013 at 12:02:24AM -0000, therock247uk wrote:
>>>>> just wondering as i just compiled the latest git and qemu goes into none
>>>>> responding mode when i try to do any networking stuff on guests (both
>>>>> linux and windows)
>>>>
>>>> Works for me on qemu.git/master on Linux:
>>>>
>>>> $ git rev-parse HEAD
>>>> b087143b4d010451208264b7c841436aafe1cbb1
>>>> $ x86_64-softmmu/qemu-system-x86_64 -m 1024 -enable-kvm -cpu host \
>>>> -drive if=virtio,cache=none,file=test.img
>>>>
>>>> Please include more information, like the QEMU command-line and commit
>>>> ID.
>>>>
>>>> Stefan
>>>>
>>>
>>> This regression occurs on the Windows host. SLIRP hangs in sorecvfrom().
>>
>> Can you bisect it?
>>
>> Paolo
>>
> The first break is the commit
> 5e3bc735d93dd23f074b5116fd11e1ad8cd4962f. But it need more packets
> than HEAD to reproduce this regression.
Please check if this partial revert of that commit fixes it:
diff --git a/main-loop.c b/main-loop.c
index f46aece..79c45b8 100644
--- a/main-loop.c
+++ b/main-loop.c
@@ -394,6 +394,20 @@ static int os_host_main_loop_wait(uint32_t timeout)
return ret;
}
+ FD_ZERO(&rfds);
+ FD_ZERO(&wfds);
+ FD_ZERO(&xfds);
+ nfds = pollfds_fill(gpollfds, &rfds, &wfds, &xfds);
+ if (nfds >= 0) {
+ select_ret = select(nfds + 1, &rfds, &wfds, &xfds, &tv0);
+ if (select_ret != 0) {
+ timeout = 0;
+ }
+ if (select_ret > 0) {
+ pollfds_poll(gpollfds, nfds, &rfds, &wfds, &xfds);
+ }
+ }
+
g_main_context_prepare(context, &max_priority);
n_poll_fds = g_main_context_query(context, max_priority, &poll_timeout,
poll_fds, ARRAY_SIZE(poll_fds));
@@ -426,24 +440,11 @@ static int os_host_main_loop_wait(uint32_t timeout)
g_main_context_dispatch(context);
}
- /* Call select after g_poll to avoid a useless iteration and therefore
- * improve socket latency.
+ /* If an edge-triggered socket event occurred, select will return a
+ * positive result on the next iteration. We do not need to do anything
+ * here.
*/
- FD_ZERO(&rfds);
- FD_ZERO(&wfds);
- FD_ZERO(&xfds);
- nfds = pollfds_fill(gpollfds, &rfds, &wfds, &xfds);
- if (nfds >= 0) {
- select_ret = select(nfds + 1, &rfds, &wfds, &xfds, &tv0);
- if (select_ret != 0) {
- timeout = 0;
- }
- if (select_ret > 0) {
- pollfds_poll(gpollfds, nfds, &rfds, &wfds, &xfds);
- }
- }
-
return select_ret || g_poll_ret;
}
#endif
next prev parent reply other threads:[~2013-05-14 11:49 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-05-14 0:02 [Qemu-devel] [Bug 1179731] [NEW] is networking broken on windows hosts? therock247uk
2013-05-14 7:51 ` Stefan Hajnoczi
2013-05-14 10:24 ` TeLeMan
2013-05-14 10:46 ` Paolo Bonzini
2013-05-14 11:39 ` TeLeMan
2013-05-14 11:48 ` Paolo Bonzini [this message]
2013-05-14 11:55 ` Paolo Bonzini
2013-05-15 1:38 ` TeLeMan
2013-05-15 8:37 ` Paolo Bonzini
2013-05-16 5:52 ` TeLeMan
2013-05-16 8:59 ` Paolo Bonzini
2013-05-16 9:32 ` TeLeMan
2013-05-16 10:33 ` Fabien Chouteau
2013-05-14 16:28 ` [Qemu-devel] [Bug 1179731] " therock247uk
2013-05-14 16:50 ` therock247uk
2013-05-14 21:11 ` Paolo Bonzini
2013-05-14 23:37 ` therock247uk
2016-10-19 16:35 ` T. Huth
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=519224A4.4000800@redhat.com \
--to=pbonzini@redhat.com \
--cc=1179731@bugs.launchpad.net \
--cc=chouteau@adacore.com \
--cc=geleman@gmail.com \
--cc=qemu-devel@nongnu.org \
--cc=stefanha@gmail.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.
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.