qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH] socket: add the support for -netdev socket, lis


From: Stefan Hajnoczi
Subject: Re: [Qemu-devel] [PATCH] socket: add the support for -netdev socket, listen
Date: Sat, 18 Feb 2012 09:52:54 +0000

On Sat, Feb 18, 2012 at 8:54 AM, Zhi Yong Wu <address@hidden> wrote:
> On Fri, Feb 17, 2012 at 6:24 PM, Stefan Hajnoczi
> <address@hidden> wrote:
>> On Fri, Feb 17, 2012 at 12:20:08PM +0800, address@hidden wrote:
>>> From: Zhi Yong Wu <address@hidden>
>>>
>>> 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



reply via email to

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