From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:33400) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RyhpR-0001lR-11 for qemu-devel@nongnu.org; Sat, 18 Feb 2012 05:47:45 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RyhpP-0000MB-So for qemu-devel@nongnu.org; Sat, 18 Feb 2012 05:47:45 -0500 Received: from mail-pz0-f45.google.com ([209.85.210.45]:43846) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RyhpP-0000M5-OA for qemu-devel@nongnu.org; Sat, 18 Feb 2012 05:47:43 -0500 Received: by dadp14 with SMTP id p14so5054603dad.4 for ; Sat, 18 Feb 2012 02:47:42 -0800 (PST) MIME-Version: 1.0 In-Reply-To: References: <1329452408-13526-1-git-send-email-zwu.kernel@gmail.com> <20120217102414.GA24722@stefanha-thinkpad.localdomain> Date: Sat, 18 Feb 2012 18:47:42 +0800 Message-ID: From: Zhi Yong Wu Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH] socket: add the support for -netdev socket, listen List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Stefan Hajnoczi Cc: aliguori@us.ibm.com, Zhi Yong Wu , srini@cisco.com, Stefan Hajnoczi , qemu-devel@nongnu.org On Sat, Feb 18, 2012 at 5:52 PM, Stefan Hajnoczi wrote= : > On Sat, Feb 18, 2012 at 8:54 AM, Zhi Yong Wu wrote= : >> On Fri, Feb 17, 2012 at 6:24 PM, Stefan Hajnoczi >> wrote: >>> On Fri, Feb 17, 2012 at 12:20:08PM +0800, zwu.kernel@gmail.com wrote: >>>> From: Zhi Yong Wu >>>> >>>> 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. =A0Please explain wh= at >>> 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 \ >>> =A0-drive if=3Dvirtio,file=3Dvm1.img,cache=3Dnone \ >>> =A0-netdev socket,listen=3D127.0.0.1:1234,id=3Dsocket0 \ >>> =A0-device virtio-net-pci,netdev=3Dsocket0 >>> >>> $ x86_64-softmmu/qemu-system-x86_64 -enable-kvm -m 1024 \ >>> =A0-drive if=3Dvirtio,file=3Dvm2.img,cache=3Dnone \ >>> =A0-netdev socket,connect=3D127.0.0.1:1234,id=3Dsocket0 \ >>> =A0-device virtio-net-pci,netdev=3Dsocket0 >>> >>> The first thing I noticed was that the output of "info network" in vm1 >>> looks wrong. =A0It should show the virtio-net-pci NIC peered with a soc= ket >>> fd connection. =A0Instead it shows it peered with a dummy VLANClientSta= te >>> 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: ...". =A0For > net_socket_fd_init_stream() you will have "socket: fd=3D%d". =A0The This fd is displayed only for udp type. But in your test command, i don't see that you specifiy if it is udp or tcp type. > info_str is displayed by "info network". > > Stefan --=20 Regards, Zhi Yong Wu