Received: from eggs.gnu.org ([208.118.235.92]:47410) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1USk4q-0003z6-J4 for qemu-devel@nongnu.org; Thu, 18 Apr 2013 04:20:22 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1USk4o-0001v2-IF for qemu-devel@nongnu.org; Thu, 18 Apr 2013 04:20:20 -0400 Received: from mx1.redhat.com ([209.132.183.28]:56232) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1USk4o-0001t7-AH for qemu-devel@nongnu.org; Thu, 18 Apr 2013 04:20:18 -0400 Date: Thu, 18 Apr 2013 16:19:57 +0800 From: Amos Kong Message-ID: <20130418081957.GB8913@t430s.nay.redhat.com> References: <20130410120519.GA13514@t430s.nay.redhat.com> <51655AF8.40102@suse.de> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline In-Reply-To: <51655AF8.40102@suse.de> Content-Transfer-Encoding: quoted-printable Subject: [Qemu-devel] 'id' assigned to -device could not be set as net-client name (was Re: Nic devices' name are wrongly repeated) List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Andreas =?iso-8859-1?Q?F=E4rber?= , fred.konrad@greensocs.com Cc: Paolo Bonzini , Stefan Hajnoczi , qemu-devel , Anthony Liguori , Gerd Hoffmann On Wed, Apr 10, 2013 at 02:28:40PM +0200, Andreas F=E4rber wrote: > Hi, >=20 > Am 10.04.2013 14:05, schrieb Amos Kong: > > If we don't assign 'id' for nic device, device name will be $model.$i= dx. The $idx are always 0 if we set nic by new style. > >=20 > > # qemu-upstream -device virtio-net-pci,netdev=3Dh1 -netdev tap,id=3Dh= 1 -device virtio-net-pci,netdev=3Dh2 -netdev tap,id=3Dh2 ... > > (qemu) info network > > virtio-net-pci.0: index=3D0,type=3Dnic,model=3Dvirtio-net-pci,macaddr= =3D52:54:00:12:34:56 > > \ h1: index=3D0,type=3Dtap,ifname=3Dtap0,script=3D/etc/qemu-ifup,dow= nscript=3D/etc/qemu-ifdown > > virtio-net-pci.0: index=3D0,type=3Dnic,model=3Dvirtio-net-pci,macaddr= =3D52:54:00:12:34:57 > > \ h2: index=3D0,type=3Dtap,ifname=3Dtap1,script=3D/etc/qemu-ifup,dow= nscript=3D/etc/qemu-ifdown > >=20 > > it's introduced by commit d33d93b2 >=20 > I can see that's inconvenient, but... >=20 > > If we set links down by 'set_link virtio-net-pci.0', the first nic > > will be set down. But how to set the second link down by id? >=20 > As you would do for all devices? I.e., add ,id=3Dyouruniqueid to -devic= e. Hi KONRAD, Your following patch just introduced a regression, 'id' assigned to -dev= ice could not be set as net-client name. qemu -device virtio-net-pci,netdev=3Dndev1,id=3Did1 -netdev tap,id=3Dndev= 1 \ -device e1000,netdev=3Dndev2,id=3Did2 -netdev tap,id=3Dndev= 2 (qemu) info network virtio-net-device.0: index=3D0,type=3Dnic,model=3Dvirtio-net-device,macad= dr=3D52:54:00:12:34:56 \ ndev1: index=3D0,type=3Dtap,ifname=3Dtap0,script=3D/etc/qemu-ifup,down= script=3D/etc/qemu-ifdown id2: index=3D0,type=3Dnic,model=3De1000,macaddr=3D52:54:00:12:34:57 \ ndev2: index=3D0,type=3Dtap,ifname=3Dtap1,script=3D/etc/qemu-ifup,down= script=3D/etc/qemu-ifdown =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D commit 1773d9ee6e7138e3956081670215e8bc0ae14828 Author: KONRAD Frederic Date: Thu Apr 11 16:30:02 2013 +0200 virtio-net: cleanup: init and exit function. =20 This remove old init and exit function as they are no longer needed. =20 Signed-off-by: KONRAD Frederic Tested-by: Cornelia Huck Message-id: 1365690602-22729-8-git-send-email-fred.konrad@greensocs.c= om Signed-off-by: Anthony Liguori commit 17a0ca55657114c055cb407291c1163e09b29973 Author: KONRAD Frederic Date: Thu Apr 11 16:30:01 2013 +0200 virtio-net: cleanup: use QOM cast. =20 As the virtio-net-pci and virtio-net-s390 are switched to the new API= , we can use QOM casts. =20 Signed-off-by: KONRAD Frederic Tested-by: Cornelia Huck Message-id: 1365690602-22729-7-git-send-email-fred.konrad@greensocs.c= om Signed-off-by: Anthony Liguori commit 89334c8b6baebb1e84cd9bb6e796683e53391769 Author: KONRAD Frederic Date: Thu Apr 11 16:30:00 2013 +0200 virtio-net-ccw: switch to the new API. =20 Here the virtio-net-ccw is modified for the new API. The device virtio-net-ccw extends virtio-ccw-device as before. It creates and connects a virtio-net-device during the init. The properties are not = modified. =20 Signed-off-by: KONRAD Frederic Tested-by: Cornelia Huck Message-id: 1365690602-22729-6-git-send-email-fred.konrad@greensocs.c= om Signed-off-by: Anthony Liguori commit 74b4fe3d79098b72813e461af565557bb5d35649 Author: KONRAD Frederic Date: Thu Apr 11 16:29:59 2013 +0200 virtio-net-s390: switch to the new API. =20 Here the virtio-net-s390 is modified for the new API. The device virtio-net-s390 extends virtio-s390-device as before. It creates and connects a virtio-net-device during the init. The properties are not = modified. =20 Signed-off-by: KONRAD Frederic Tested-by: Cornelia Huck Message-id: 1365690602-22729-5-git-send-email-fred.konrad@greensocs.c= om Signed-off-by: Anthony Liguori commit e37da3945fa2fde161e1b217f937fc318c4b7639 Author: KONRAD Frederic Date: Thu Apr 11 16:29:58 2013 +0200 virtio-net-pci: switch to the new API. =20 Here the virtio-net-pci is modified for the new API. The device virtio-net-pci extends virtio-pci. It creates and connects a virtio-net-device during the init. The properties are not changed. =20 Signed-off-by: KONRAD Frederic Tested-by: Cornelia Huck Message-id: 1365690602-22729-4-git-send-email-fred.konrad@greensocs.c= om Signed-off-by: Anthony Liguori commit 17ec5a8686143da66208273d355f2eeb09807614 Author: KONRAD Frederic Date: Thu Apr 11 16:29:57 2013 +0200 virtio-net: add the virtio-net device. =20 Create virtio-net-device which extends virtio-device, so it can be co= nnected on virtio-bus. =20 Signed-off-by: KONRAD Frederic Tested-by: Cornelia Huck Message-id: 1365690602-22729-3-git-send-email-fred.konrad@greensocs.c= om Signed-off-by: Anthony Liguori commit 6a87acf7df4b31ca0896b95b86dac9698420a9ed Author: KONRAD Frederic Date: Thu Apr 11 16:29:56 2013 +0200 virtio: add two functions to VirtioDeviceClass. =20 Recent changes need two functions to VirtioDevice. This just add them into VirtioDeviceClass. =20 Signed-off-by: KONRAD Frederic Tested-by: Cornelia Huck Message-id: 1365690602-22729-2-git-send-email-fred.konrad@greensocs.c= om Signed-off-by: Anthony Liguori --=20 Amos.