Skip to contentSkip to conversation

VLAN and Tap for win32

PATCH In review Kazu 2 participants 4 messages May 12, 2006 – May 16, 2006

lore
Share & tools
lore
#1 lore raw
Quoted 6 lines · Kazu

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()).

Quoted 1 line

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.

Regards,

Fabrice.

author
#2 lore raw
Quoted 6 lines · Fabrice Bellard
Quoted 5 lines · Kazu

Hi,

VLAN and Tap patches for win32 are updated. I added handling for wait objects.

Quoted 8 lines
Quoted 1 line

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

Quoted 6 lines
Quoted 1 line

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

author
#3 lore raw
Quoted 2 lines · Kazu

I heard that WSAWaitForMultipleEvents is the same as

WaitForMultipleObjects

Quoted 2 lines

in winsock 2 mailing list. I used it.
I think supressing polling means using win32 thread. Is it OK? I will try

to

Quoted 4 lines

use threads.

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

WSAWaitForMultipleEvents needs WSAStartup. WaitForMultipleObjects can wait for network events. WaitForMultipleObjects is better.

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

Regards,
Kazu