From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:33487) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1USktx-0004Nl-3l for qemu-devel@nongnu.org; Thu, 18 Apr 2013 05:13:12 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1USktt-0003bf-GY for qemu-devel@nongnu.org; Thu, 18 Apr 2013 05:13:08 -0400 Received: from greensocs.com ([87.106.252.221]:43819 helo=s15328186.onlinehome-server.info) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1USktt-0003b4-6Z for qemu-devel@nongnu.org; Thu, 18 Apr 2013 05:13:05 -0400 Message-ID: <516FB918.3010206@greensocs.com> Date: Thu, 18 Apr 2013 11:12:56 +0200 From: =?ISO-8859-1?Q?KONRAD_Fr=E9d=E9ric?= MIME-Version: 1.0 References: <20130410120519.GA13514@t430s.nay.redhat.com> <51655AF8.40102@suse.de> <20130418081957.GB8913@t430s.nay.redhat.com> In-Reply-To: <20130418081957.GB8913@t430s.nay.redhat.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: quoted-printable Subject: Re: [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: Amos Kong Cc: Anthony Liguori , qemu-devel , Gerd Hoffmann , Stefan Hajnoczi , Paolo Bonzini , =?ISO-8859-1?Q?Andreas_F=E4rber?= On 18/04/2013 10:19, Amos Kong wrote: > On Wed, Apr 10, 2013 at 02:28:40PM +0200, Andreas F=E4rber wrote: >> Hi, >> >> 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. >>> >>> # 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,do= wnscript=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,do= wnscript=3D/etc/qemu-ifdown >>> >>> it's introduced by commit d33d93b2 >> I can see that's inconvenient, but... >> >>> 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? >> As you would do for all devices? I.e., add ,id=3Dyouruniqueid to -devi= ce. > > Hi KONRAD, > > Your following patch just introduced a regression, 'id' assigned to -= device > could not be set as net-client name. A regression from "net: make nic name unique" ? > > qemu -device virtio-net-pci,netdev=3Dndev1,id=3Did1 -netdev tap,id=3Dnd= ev1 \ > -device e1000,netdev=3Dndev2,id=3Did2 -netdev tap,id=3Dn= dev2 > > (qemu) info network > virtio-net-device.0: index=3D0,type=3Dnic,model=3Dvirtio-net-device,mac= addr=3D52:54:00:12:34:56 > \ ndev1: index=3D0,type=3Dtap,ifname=3Dtap0,script=3D/etc/qemu-ifup,d= ownscript=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,d= ownscript=3D/etc/qemu-ifdown yes :/, that seems to be the side effect of cutting virtio-net-pci in virtio-net-pci + virtio-net-device. Here virtio-net-device is the network device as you see in info network. virtio-net-pci isn't anymore. I wonder how to solve that as we can't duplicate the id. I will take a look. Fred > > > =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 neede= d. > =20 > Signed-off-by: KONRAD Frederic > Tested-by: Cornelia Huck > Message-id: 1365690602-22729-8-git-send-email-fred.konrad@greensoc= s.com > 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@greensoc= s.com > 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 n= ot modified. > =20 > Signed-off-by: KONRAD Frederic > Tested-by: Cornelia Huck > Message-id: 1365690602-22729-6-git-send-email-fred.konrad@greensoc= s.com > 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 a= nd > connects a virtio-net-device during the init. The properties are n= ot modified. > =20 > Signed-off-by: KONRAD Frederic > Tested-by: Cornelia Huck > Message-id: 1365690602-22729-5-git-send-email-fred.konrad@greensoc= s.com > 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@greensoc= s.com > 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= connected on > virtio-bus. > =20 > Signed-off-by: KONRAD Frederic > Tested-by: Cornelia Huck > Message-id: 1365690602-22729-3-git-send-email-fred.konrad@greensoc= s.com > 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 t= hem > into VirtioDeviceClass. > =20 > Signed-off-by: KONRAD Frederic > Tested-by: Cornelia Huck > Message-id: 1365690602-22729-2-git-send-email-fred.konrad@greensoc= s.com > Signed-off-by: Anthony Liguori > >