On Sat, Feb 18, 2012 at 8:54 AM, Zhi Yong Wu <zwu.ker...@gmail.com> wrote: > On Fri, Feb 17, 2012 at 6:24 PM, Stefan Hajnoczi > <stefa...@linux.vnet.ibm.com> wrote: >> On Fri, Feb 17, 2012 at 12:20:08PM +0800, zwu.ker...@gmail.com wrote: >>> From: Zhi Yong Wu <wu...@linux.vnet.ibm.com> >>> >>> As you have known, QEMU upstream currently doesn't support for -netdev >>> socket,listen; This patch makes it work now. >> >> This commit description does not give any context. Please explain what >> the bug is so readers know what this patch fixes. >> >> I tried the following test: >> >> $ x86_64-softmmu/qemu-system-x86_64 -enable-kvm -m 1024 \ >> -drive if=virtio,file=vm1.img,cache=none \ >> -netdev socket,listen=127.0.0.1:1234,id=socket0 \ >> -device virtio-net-pci,netdev=socket0 >> >> $ x86_64-softmmu/qemu-system-x86_64 -enable-kvm -m 1024 \ >> -drive if=virtio,file=vm2.img,cache=none \ >> -netdev socket,connect=127.0.0.1:1234,id=socket0 \ >> -device virtio-net-pci,netdev=socket0 >> >> The first thing I noticed was that the output of "info network" in vm1 >> looks wrong. It should show the virtio-net-pci NIC peered with a socket >> fd connection. Instead it shows it peered with a dummy VLANClientState >> and I see two socket fds with no peers. > By the way, Can you see socket file descriptioner? Where and How did > you see them?
s->nc.info_str is set to "socket: ...". For net_socket_fd_init_stream() you will have "socket: fd=%d". The info_str is displayed by "info network". Stefan