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.kon...@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.kon...@greensocs.com>
Tested-by: Cornelia Huck <cornelia.h...@de.ibm.com>
Message-id: 1365690602-22729-8-git-send-email-fred.kon...@greensocs.com
Signed-off-by: Anthony Liguori <aligu...@us.ibm.com>
commit 17a0ca55657114c055cb407291c1163e09b29973
Author: KONRAD Frederic <fred.kon...@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.kon...@greensocs.com>
Tested-by: Cornelia Huck <cornelia.h...@de.ibm.com>
Message-id: 1365690602-22729-7-git-send-email-fred.kon...@greensocs.com
Signed-off-by: Anthony Liguori <aligu...@us.ibm.com>
commit 89334c8b6baebb1e84cd9bb6e796683e53391769
Author: KONRAD Frederic <fred.kon...@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.kon...@greensocs.com>
Tested-by: Cornelia Huck <cornelia.h...@de.ibm.com>
Message-id: 1365690602-22729-6-git-send-email-fred.kon...@greensocs.com
Signed-off-by: Anthony Liguori <aligu...@us.ibm.com>
commit 74b4fe3d79098b72813e461af565557bb5d35649
Author: KONRAD Frederic <fred.kon...@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.kon...@greensocs.com>
Tested-by: Cornelia Huck <cornelia.h...@de.ibm.com>
Message-id: 1365690602-22729-5-git-send-email-fred.kon...@greensocs.com
Signed-off-by: Anthony Liguori <aligu...@us.ibm.com>
commit e37da3945fa2fde161e1b217f937fc318c4b7639
Author: KONRAD Frederic <fred.kon...@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.kon...@greensocs.com>
Tested-by: Cornelia Huck <cornelia.h...@de.ibm.com>
Message-id: 1365690602-22729-4-git-send-email-fred.kon...@greensocs.com
Signed-off-by: Anthony Liguori <aligu...@us.ibm.com>
commit 17ec5a8686143da66208273d355f2eeb09807614
Author: KONRAD Frederic <fred.kon...@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.kon...@greensocs.com>
Tested-by: Cornelia Huck <cornelia.h...@de.ibm.com>
Message-id: 1365690602-22729-3-git-send-email-fred.kon...@greensocs.com
Signed-off-by: Anthony Liguori <aligu...@us.ibm.com>
commit 6a87acf7df4b31ca0896b95b86dac9698420a9ed
Author: KONRAD Frederic <fred.kon...@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.kon...@greensocs.com>
Tested-by: Cornelia Huck <cornelia.h...@de.ibm.com>
Message-id: 1365690602-22729-2-git-send-email-fred.kon...@greensocs.com
Signed-off-by: Anthony Liguori <aligu...@us.ibm.com>