Received: from eggs.gnu.org ([208.118.235.92]:35219) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UQCmN-00033L-D8 for qemu-devel@nongnu.org; Thu, 11 Apr 2013 04:22:51 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UQCmK-0002zw-HY for qemu-devel@nongnu.org; Thu, 11 Apr 2013 04:22:47 -0400 Received: from mx1.redhat.com ([209.132.183.28]:35987) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UQCmK-0002zs-8r for qemu-devel@nongnu.org; Thu, 11 Apr 2013 04:22:44 -0400 Date: Thu, 11 Apr 2013 10:22:40 +0200 From: Stefan Hajnoczi Message-ID: <20130411082240.GF5253@stefanha-thinkpad.redhat.com> References: <20130410120519.GA13514@t430s.nay.redhat.com> <51655AF8.40102@suse.de> <20130410141704.GA4321@t430s.nay.redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline In-Reply-To: <20130410141704.GA4321@t430s.nay.redhat.com> Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] Nic devices' name are wrongly repeated List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Amos Kong Cc: Paolo Bonzini , Gerd Hoffmann , Andreas =?iso-8859-1?Q?F=E4rber?= , Anthony Liguori , qemu-devel On Wed, Apr 10, 2013 at 10:17:04PM +0800, Amos Kong wrote: > 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.= $idx. The $idx are always 0 if we set nic by new style. > > >=20 > > > # qemu-upstream -device virtio-net-pci,netdev=3Dh1 -netdev tap,id=3D= h1 -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,macad= dr=3D52:54:00:12:34:56 > > > \ h1: index=3D0,type=3Dtap,ifname=3Dtap0,script=3D/etc/qemu-ifup,d= ownscript=3D/etc/qemu-ifdown > > > virtio-net-pci.0: index=3D0,type=3Dnic,model=3Dvirtio-net-pci,macad= dr=3D52:54:00:12:34:57 > > > \ h2: index=3D0,type=3Dtap,ifname=3Dtap1,script=3D/etc/qemu-ifup,d= ownscript=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 -dev= ice. >=20 > If we also assigned unique ids for nic devices, it works. I was unaware of this issue. Do you want to send a fix so NICs get unique names? Stefan