From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:51079) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1c6hZb-0007M3-A7 for qemu-devel@nongnu.org; Tue, 15 Nov 2016 12:31:08 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1c6hZX-0002Le-2u for qemu-devel@nongnu.org; Tue, 15 Nov 2016 12:31:07 -0500 Received: from indium.canonical.com ([91.189.90.7]:51626) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1c6hZW-0002L6-UQ for qemu-devel@nongnu.org; Tue, 15 Nov 2016 12:31:03 -0500 Received: from loganberry.canonical.com ([91.189.90.37]) by indium.canonical.com with esmtp (Exim 4.76 #1 (Debian)) id 1c6hZV-0005JC-7Z for ; Tue, 15 Nov 2016 17:31:01 +0000 Received: from loganberry.canonical.com (localhost [127.0.0.1]) by loganberry.canonical.com (Postfix) with ESMTP id D053D2E80DE for ; Tue, 15 Nov 2016 17:30:57 +0000 (UTC) MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Date: Tue, 15 Nov 2016 17:25:39 -0000 From: Pierre Labastie <1640525@bugs.launchpad.net> Reply-To: Bug 1640525 <1640525@bugs.launchpad.net> Sender: bounces@canonical.com References: <20161109161632.21072.79812.malonedeb@gac.canonical.com> Message-Id: <20161115172539.2735.30478.malone@wampee.canonical.com> Errors-To: bounces@canonical.com Subject: [Qemu-devel] [Bug 1640525] Re: -net socket, connect/listen does not work in 2.7.0 List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Great. Thanks to you both. -- = You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1640525 Title: -net socket,connect/listen does not work in 2.7.0 Status in QEMU: Fix Committed Bug description: Using 2.7.0 release on Debian Sid. What I did: start one VM with: ---- /home/pierre/build/qemu/build/x86_64-softmmu/qemu-system-x86_64 \ -smp 4 \ -cpu Nehalem \ -soundhw ac97 \ -k fr \ -localtime \ -enable-kvm \ -m 4099 \ -drive file=3D/mnt/virtualMachines/qemu/lfs-7.10-porg.qcow2,cache=3Dwrite= back \ -cdrom /mnt/virtualMachines/qemu/grub-img.iso \ -boot order=3Dc,once=3Dd,menu=3Don \ -vga std \ -serial mon:stdio \ -net nic,vlan=3D0,model=3De1000,macaddr=3D52:54:00:12:34:58 \ -net user,vlan=3D0,hostfwd=3Dtcp::2223-10.0.2.9:22 \ -net nic,vlan=3D1,model=3De1000,macaddr=3D52:54:00:12:34:56 \ -net socket,vlan=3D1,listen=3D:4321 ---- Start another one with: ---- /home/pierre/build/qemu/build/x86_64-softmmu/qemu-system-x86_64 \ -smp 4 \ -cpu Nehalem \ -soundhw ac97 \ -k fr \ -localtime \ -enable-kvm \ -m 4099 \ -drive file=3D/mnt/virtualMachines/qemu/lfs-7.10-october.qcow2,cache=3Dwr= iteback \ -cdrom /mnt/virtualMachines/qemu/grub-img.iso \ -boot order=3Dc \ -serial mon:stdio \ -vga std \ -net nic,vlan=3D0,model=3De1000,macaddr=3D52:54:00:12:34:57 \ -net socket,vlan=3D0,connect=3Dlocalhost:4321 ---- The network settings of the first machine are: ---- 1: lo: mtu 65536 qdisc noqueue state UNKNOWN group= default qlen 1 link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00 inet 127.0.0.1/8 scope host lo valid_lft forever preferred_lft forever 2: enp0s3: mtu 1500 qdisc pfifo_fast ma= ster br0 state UP group default qlen 1000 link/ether 52:54:00:12:34:58 brd ff:ff:ff:ff:ff:ff 3: enp0s4: mtu 1500 qdisc pfifo_fast ma= ster br0 state UP group default qlen 1000 link/ether 52:54:00:12:34:56 brd ff:ff:ff:ff:ff:ff 4: br0: mtu 1500 qdisc noqueue state UP= group default qlen 1000 link/ether 52:54:00:12:34:56 brd ff:ff:ff:ff:ff:ff inet 10.0.2.9/24 brd 10.0.2.255 scope global br0 valid_lft forever preferred_lft forever ---- The network settings on the second machine are: ---- 1: lo: mtu 65536 qdisc noqueue state UNKNOWN group= default qlen 1 link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00 inet 127.0.0.1/8 scope host lo valid_lft forever preferred_lft forever 2: enp0s3: mtu 1500 qdisc pfifo_fast st= ate UP group default qlen 1000 link/ether 52:54:00:12:34:57 brd ff:ff:ff:ff:ff:ff inet 10.0.2.10/24 brd 10.0.2.255 scope global enp0s3 valid_lft forever preferred_lft forever ---- typing "ping -c 1 10.0.2.10" on the first machine returns: ---- PING 10.0.2.10 (10.0.2.10): 56 data bytes 92 bytes from virtuallfs (10.0.2.9): Destination Host Unreachable --- 10.0.2.10 ping statistics --- 1 packets transmitted, 0 packets received, 100% packet loss ---- and something similar when typing "ping -c 1 10.0.2.9" on the second mach= ine. This very same setting works as expected in version 2.6.0. I could bisect= , and the offending commit is 16a3df403b1: ---- commit 16a3df403b10c4ac347159e39005fd520b2648bb Author: Zhang Chen Date: Fri May 13 15:35:19 2016 +0800 net/net: Add SocketReadState for reuse codes = This function is from net/socket.c, move it to net.c and net.h. Add SocketReadState to make others reuse net_fill_rstate(). suggestion from jason. = v4: - move 'rs->finalize =3D finalize' to rs_init() = v3: - remove SocketReadState init callback - put finalize callback to net_fill_rstate() = v2: - rename ReadState to SocketReadState - add SocketReadState init and finalize callback = v1: - init patch = Signed-off-by: Zhang Chen Signed-off-by: Li Zhijian Signed-off-by: Wen Congyang Signed-off-by: Jason Wang ---- BTW, the systems on both VM are built from http://www.linuxfromscratch.org. But I do not think this is important, since I could do the bisect. Of course, I'll be happy to try other VMs, if you point me to some. To manage notifications about this bug go to: https://bugs.launchpad.net/qemu/+bug/1640525/+subscriptions