qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Stefan Hajnoczi <stefanha@redhat.com>
To: Amos Kong <akong@redhat.com>
Cc: "Paolo Bonzini" <pbonzini@redhat.com>,
	"Gerd Hoffmann" <kraxel@redhat.com>,
	"Andreas Färber" <afaerber@suse.de>,
	"Anthony Liguori" <anthony@codemonkey.ws>,
	qemu-devel <qemu-devel@nongnu.org>
Subject: Re: [Qemu-devel] Nic devices' name are wrongly repeated
Date: Thu, 11 Apr 2013 10:22:40 +0200	[thread overview]
Message-ID: <20130411082240.GF5253@stefanha-thinkpad.redhat.com> (raw)
In-Reply-To: <20130410141704.GA4321@t430s.nay.redhat.com>

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ärber 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.$idx. The $idx are always 0 if we set nic by new style.
> > > 
> > > # qemu-upstream -device virtio-net-pci,netdev=h1 -netdev tap,id=h1 -device virtio-net-pci,netdev=h2 -netdev tap,id=h2 ...
> > > (qemu) info network
> > > virtio-net-pci.0: index=0,type=nic,model=virtio-net-pci,macaddr=52:54:00:12:34:56
> > >  \ h1: index=0,type=tap,ifname=tap0,script=/etc/qemu-ifup,downscript=/etc/qemu-ifdown
> > > virtio-net-pci.0: index=0,type=nic,model=virtio-net-pci,macaddr=52:54:00:12:34:57
> > >  \ h2: index=0,type=tap,ifname=tap1,script=/etc/qemu-ifup,downscript=/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=youruniqueid to -device.
> 
> 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

  reply	other threads:[~2013-04-11  8:22 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-04-10 12:05 [Qemu-devel] Nic devices' name are wrongly repeated Amos Kong
2013-04-10 12:28 ` Andreas Färber
2013-04-10 14:17   ` Amos Kong
2013-04-11  8:22     ` Stefan Hajnoczi [this message]
2013-04-11 11:58       ` [Qemu-devel] [PATCH] net: make nic name unique Amos Kong
2013-04-12  9:06         ` Stefan Hajnoczi
2013-04-12 10:50           ` Markus Armbruster
2013-04-15 10:55         ` [Qemu-devel] [PATCH v2] net: make network client " Amos Kong
2013-04-18 11:25           ` Stefan Hajnoczi
2013-04-18  8:19   ` [Qemu-devel] 'id' assigned to -device could not be set as net-client name (was Re: Nic devices' name are wrongly repeated) Amos Kong
2013-04-18  9:12     ` KONRAD Frédéric
2013-04-18  9:47       ` Amos Kong
2013-04-18 10:03         ` KONRAD Frédéric

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20130411082240.GF5253@stefanha-thinkpad.redhat.com \
    --to=stefanha@redhat.com \
    --cc=afaerber@suse.de \
    --cc=akong@redhat.com \
    --cc=anthony@codemonkey.ws \
    --cc=kraxel@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).