All of lore.kernel.org
 help / color / mirror / Atom feed
From: "KONRAD Frédéric" <fred.konrad@greensocs.com>
To: Amos Kong <akong@redhat.com>
Cc: "Anthony Liguori" <anthony@codemonkey.ws>,
	qemu-devel <qemu-devel@nongnu.org>,
	"Gerd Hoffmann" <kraxel@redhat.com>,
	"Stefan Hajnoczi" <stefanha@redhat.com>,
	"Paolo Bonzini" <pbonzini@redhat.com>,
	"Andreas Färber" <afaerber@suse.de>
Subject: Re: [Qemu-devel] 'id' assigned to -device could not be set as net-client name (was Re: Nic devices' name are wrongly repeated)
Date: Thu, 18 Apr 2013 11:12:56 +0200	[thread overview]
Message-ID: <516FB918.3010206@greensocs.com> (raw)
In-Reply-To: <20130418081957.GB8913@t430s.nay.redhat.com>

On 18/04/2013 10:19, 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.
>
> 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=ndev1,id=id1 -netdev tap,id=ndev1 \
>                -device e1000,netdev=ndev2,id=id2 -netdev tap,id=ndev2
>
> (qemu) info network
> virtio-net-device.0: index=0,type=nic,model=virtio-net-device,macaddr=52:54:00:12:34:56
>   \ ndev1: index=0,type=tap,ifname=tap0,script=/etc/qemu-ifup,downscript=/etc/qemu-ifdown
> id2: index=0,type=nic,model=e1000,macaddr=52:54:00:12:34:57
>   \ ndev2: index=0,type=tap,ifname=tap1,script=/etc/qemu-ifup,downscript=/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
>
>
> ===============================================
> commit 1773d9ee6e7138e3956081670215e8bc0ae14828
> Author: KONRAD Frederic <fred.konrad@greensocs.com>
> Date:   Thu Apr 11 16:30:02 2013 +0200
>
>      virtio-net: cleanup: init and exit function.
>      
>      This remove old init and exit function as they are no longer needed.
>      
>      Signed-off-by: KONRAD Frederic <fred.konrad@greensocs.com>
>      Tested-by: Cornelia Huck <cornelia.huck@de.ibm.com>
>      Message-id: 1365690602-22729-8-git-send-email-fred.konrad@greensocs.com
>      Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
>
> commit 17a0ca55657114c055cb407291c1163e09b29973
> Author: KONRAD Frederic <fred.konrad@greensocs.com>
> Date:   Thu Apr 11 16:30:01 2013 +0200
>
>      virtio-net: cleanup: use QOM cast.
>      
>      As the virtio-net-pci and virtio-net-s390 are switched to the new API,
>      we can use QOM casts.
>      
>      Signed-off-by: KONRAD Frederic <fred.konrad@greensocs.com>
>      Tested-by: Cornelia Huck <cornelia.huck@de.ibm.com>
>      Message-id: 1365690602-22729-7-git-send-email-fred.konrad@greensocs.com
>      Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
>
> commit 89334c8b6baebb1e84cd9bb6e796683e53391769
> Author: KONRAD Frederic <fred.konrad@greensocs.com>
> Date:   Thu Apr 11 16:30:00 2013 +0200
>
>      virtio-net-ccw: switch to the new API.
>      
>      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.
>      
>      Signed-off-by: KONRAD Frederic <fred.konrad@greensocs.com>
>      Tested-by: Cornelia Huck <cornelia.huck@de.ibm.com>
>      Message-id: 1365690602-22729-6-git-send-email-fred.konrad@greensocs.com
>      Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
>
> commit 74b4fe3d79098b72813e461af565557bb5d35649
> Author: KONRAD Frederic <fred.konrad@greensocs.com>
> Date:   Thu Apr 11 16:29:59 2013 +0200
>
>      virtio-net-s390: switch to the new API.
>      
>      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.
>      
>      Signed-off-by: KONRAD Frederic <fred.konrad@greensocs.com>
>      Tested-by: Cornelia Huck <cornelia.huck@de.ibm.com>
>      Message-id: 1365690602-22729-5-git-send-email-fred.konrad@greensocs.com
>      Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
>
> commit e37da3945fa2fde161e1b217f937fc318c4b7639
> Author: KONRAD Frederic <fred.konrad@greensocs.com>
> Date:   Thu Apr 11 16:29:58 2013 +0200
>
>      virtio-net-pci: switch to the new API.
>      
>      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.
>      
>      Signed-off-by: KONRAD Frederic <fred.konrad@greensocs.com>
>      Tested-by: Cornelia Huck <cornelia.huck@de.ibm.com>
>      Message-id: 1365690602-22729-4-git-send-email-fred.konrad@greensocs.com
>      Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
>
> commit 17ec5a8686143da66208273d355f2eeb09807614
> Author: KONRAD Frederic <fred.konrad@greensocs.com>
> Date:   Thu Apr 11 16:29:57 2013 +0200
>
>      virtio-net: add the virtio-net device.
>      
>      Create virtio-net-device which extends virtio-device, so it can be connected on
>      virtio-bus.
>      
>      Signed-off-by: KONRAD Frederic <fred.konrad@greensocs.com>
>      Tested-by: Cornelia Huck <cornelia.huck@de.ibm.com>
>      Message-id: 1365690602-22729-3-git-send-email-fred.konrad@greensocs.com
>      Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
>
> commit 6a87acf7df4b31ca0896b95b86dac9698420a9ed
> Author: KONRAD Frederic <fred.konrad@greensocs.com>
> Date:   Thu Apr 11 16:29:56 2013 +0200
>
>      virtio: add two functions to VirtioDeviceClass.
>      
>      Recent changes need two functions to VirtioDevice. This just add them
>      into VirtioDeviceClass.
>      
>      Signed-off-by: KONRAD Frederic <fred.konrad@greensocs.com>
>      Tested-by: Cornelia Huck <cornelia.huck@de.ibm.com>
>      Message-id: 1365690602-22729-2-git-send-email-fred.konrad@greensocs.com
>      Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
>
>

  reply	other threads:[~2013-04-18  9:13 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
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 [this message]
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=516FB918.3010206@greensocs.com \
    --to=fred.konrad@greensocs.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 \
    --cc=stefanha@redhat.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.