qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH] VLAN and Tap for win32


From: Kazu
Subject: Re: [Qemu-devel] [PATCH] VLAN and Tap for win32
Date: Mon, 15 May 2006 23:03:51 +0900

Monday, May 15, 2006 3:35 AM Fabrice Bellard wrote:

> Kazu wrote:
>> Hi,
>>
>> VLAN and Tap patches for win32 are updated. I added handling for wait
>> objects.
>>
>> http://www.h7.dion.ne.jp/~qemu-win/download/qemu-0.8.1-vlan.patch
>
> I don't undertand this patch: the connect() is meant to be non blocking
> so the 'socket_wait_event' just after is not correct. The wait for the
> connection must be done inside the QEMU main loop as it is done on the
> Unix target (connect() on Unix in non blocking mode usually return
> EINPROGRESS and we can wait for the connection using select()).
>

connect() usually retruns with WSAEWOULDBLOCK and second time it becomes
WSAEINVAL. It doesn't become WSAEINPROGRESS.
Winsock FAQ says that WSAEWOULDBLOCK has a little different meaning with
Unix socket and a header in MinGW says that WSAEINPROGRESS is deprecated in
Winsock2.
MS says that connect() should not be called again for asynchronous socket.
This patch would be better.

http://www.h7.dion.ne.jp/~qemu-win/download/qemu-20060515-vlan.patch


>> http://www.h7.dion.ne.jp/~qemu-win/download/qemu-0.8.1-tap.patch
>
> OK for this one. Suppressing all the remaning polling in the win32
> version would be good. In particular, it would be good to be able to
> wait for network events while waiting for other events.
>

I heard that WSAWaitForMultipleEvents is the same as WaitForMultipleObjects
in winsock 2 mailing list. I used it.
I think supressing polling means using win32 thread. Is it OK? I will try to
use threads.

http://www.h7.dion.ne.jp/~qemu-win/download/qemu-20060515-tap.patch

Regards,
Kazu






reply via email to

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