[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] QEMU -netdev vhost=on + -device virtio-net-pci bug
From: |
Michael S. Tsirkin |
Subject: |
Re: [Qemu-devel] QEMU -netdev vhost=on + -device virtio-net-pci bug |
Date: |
Tue, 5 Mar 2013 14:56:14 +0200 |
On Tue, Mar 05, 2013 at 05:55:19PM +1100, Alexey Kardashevskiy wrote:
> Hi!
>
> The patch f56a12475ff1b8aa61210d08522c3c8aaf0e2648 "vhost: backend
> masking support" breaks virtio-net + vhost=on on PPC64 platform.
>
> The problem command line is:
> 1) -netdev tap,id=tapnet,ifname=tap0,script=qemu-ifup.sh,vhost=on \
> -device virtio-net-pci,netdev=tapnet,addr=0.0 \
I think the issue is irqfd in not supported on kvm ppc.
Could you please check this:
+ /* If guest supports masking, set up irqfd now.
+ * Otherwise, delay until unmasked in the frontend.
+ */
+ if (proxy->vdev->guest_notifier_mask) {
+ ret = kvm_virtio_pci_irqfd_use(proxy, queue_no, vector);
+ if (ret < 0) {
+ kvm_virtio_pci_vq_vector_release(proxy, vector);
+ goto undo;
+ }
+ }
Could you please add a printf before "undo" and check whether the
error path above is triggered?
> Without the patch, the eth0 in the guest works fine, with the patch
> it simply does not. The guest's eth0 also works with the following
> configs:
>
> 2) new -netdev interface with vhost=off:
> -netdev tap,id=tapnet,ifname=tap0,script=qemu-ifup.sh \
> -device virtio-net-pci,netdev=tapnet,addr=0.0
>
> 3) old -net interface with vhost=on:
> -net tap,ifname=tap0,script=qemu-ifup.sh,vhost=on \
> -net nic,model=virtio,addr=0:0:0
>
> 4) old -net interface with vhost=off:
> -net tap,ifname=tap0,script=qemu-ifup.sh \
> -net nic,model=virtio,addr=0:0:0
>
> I run http://junkcode.samba.org/ftp/unpacked/junkcode/socklib/ on
> 10Gb ethernet and observe 1020MB/s for 1) (without the patch),
> 800MB/s for 2), 70MB/s for 3) and 4).
>
> The virtio features (cat /sys/bus/virtio/devices/virtio0/features)
> for 1) and 2) are:
> "1100011111111111111100000000110000000000000000000000000000000000"
> and for 3) and 4) they are:
> "0000011000000001111100000000110000000000000000000000000000000000"
>
>
> I guess this is because the old -net interface creates
> an internal hub as "info qtree" shows vlan=0 and netdev=hub0port1
> while the new -netdev interface does not seem to create any internal
> hub (vlan=<null>, netdev=tapnet). btw why are the configs so different?
>
> The network config is below. Both host and guest are running 3.8 kernel.
> The qemu tree from qemu.org/master still has this problem.
>
>
> What am I missing? Thanks.
>
>
> The full command line is like below plus the network config from
> the examples above:
>
> sudo qemu-impreza/ppc64-softmmu/qemu-system-ppc64 -m 1024 -machine
> pseries,kernel_irqchip=on -trace events=trace_events \
> -nographic -vga none -enable-kvm -kernel vml38_64k -initrd 1.cpio
>
>
> This is the host config:
>
> address@hidden ~]$ cat qemu-ifup.sh
> #! /bin/sh
>
> /sbin/ifconfig $1 0.0.0.0 promisc up
> /usr/sbin/brctl addif brtest $1
>
> address@hidden ~]$ brctl show
> bridge name bridge id STP enabled interfaces
> brtest 8000.00145e992e88 no eth0
> address@hidden ~]$ ifconfig eth0
> eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
> inet6 fe80::214:5eff:fe99:2e88 prefixlen 64 scopeid 0x20<link>
> ether 00:14:5e:99:2e:88 txqueuelen 1000 (Ethernet)
> RX packets 1781219 bytes 124692636 (118.9 MiB)
> RX errors 0 dropped 0 overruns 0 frame 0
> TX packets 13734906 bytes 20755102658 (19.3 GiB)
> TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
> device interrupt 49 memory 0x3c0500800000-3c0500800fff
>
> address@hidden ~]$ lspci -vs 1:1:0.0
> 0001:01:00.0 Ethernet controller: Chelsio Communications Inc T310
> 10GbE Single Port Adapter
> Subsystem: IBM Device 038c
> Flags: bus master, fast devsel, latency 0, IRQ 49
> Memory at 3c0500800000 (64-bit, non-prefetchable) [size=4K]
> Memory at 3c0500000000 (64-bit, non-prefetchable) [size=8M]
> Memory at 3c0500801000 (64-bit, non-prefetchable) [size=4K]
> [virtual] Expansion ROM at 3c0500c00000 [disabled] [size=512K]
> Capabilities: <access denied>
> Kernel driver in use: cxgb3
>
> address@hidden ~]$ ls -l /sys/bus/pci/devices/0001\:01\:00.0/net/
> total 0
> drwxr-xr-x. 5 root root 0 Mar 5 12:59 eth0
> address@hidden ~]$ uname -a
> Linux vpl2.ozlabs.ibm.com 3.8.0-kvm-64k-aik+ #239 SMP Tue Mar 5
> 12:50:05 EST 2013 ppc64 ppc64 ppc64 GNU/Linux
>
>
> This is the running guest:
>
> address@hidden:~# lspci -v
> 00:00.0 Ethernet controller: Qumranet, Inc. Virtio network device
> Subsystem: Qumranet, Inc. Device 0001
> Flags: bus master, fast devsel, latency 0, IRQ 19
> I/O ports at 0020 [size=32]
> Memory at 100b0000000 (32-bit, non-prefetchable) [size=4K]
> Expansion ROM at 100b0010000 [disabled] [size=64K]
> Capabilities: [40] MSI-X: Enable+ Count=3 Masked-
> Kernel driver in use: virtio-pci
>
> address@hidden:~# ifconfig -a
> eth0 Link encap:Ethernet HWaddr 52:54:00:12:34:56
> inet addr:172.20.1.2 Bcast:172.20.255.255 Mask:255.255.0.0
> UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
> RX packets:36 errors:0 dropped:6 overruns:0 frame:0
> TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
> collisions:0 txqueuelen:1000
> RX bytes:2268 (2.2 KiB) TX bytes:0 (0.0 B)
>
> lo Link encap:Local Loopback
> inet addr:127.0.0.1 Mask:255.0.0.0
> UP LOOPBACK RUNNING MTU:65536 Metric:1
> RX packets:0 errors:0 dropped:0 overruns:0 frame:0
> TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
> collisions:0 txqueuelen:0
> RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
>
> address@hidden:~# uname -a
> Linux erif_root 3.8.0-aik-guest+ #262 SMP Mon Mar 4 15:58:55 EST
> 2013 ppc64 GNU/Linux
>
>
> --
> Alexey
- [Qemu-devel] QEMU -netdev vhost=on + -device virtio-net-pci bug, Alexey Kardashevskiy, 2013/03/05
- Re: [Qemu-devel] QEMU -netdev vhost=on + -device virtio-net-pci bug,
Michael S. Tsirkin <=
- Re: [Qemu-devel] QEMU -netdev vhost=on + -device virtio-net-pci bug, Alexey Kardashevskiy, 2013/03/05
- Re: [Qemu-devel] QEMU -netdev vhost=on + -device virtio-net-pci bug, Michael S. Tsirkin, 2013/03/05
- Re: [Qemu-devel] QEMU -netdev vhost=on + -device virtio-net-pci bug, Alexey Kardashevskiy, 2013/03/05
- Re: [Qemu-devel] QEMU -netdev vhost=on + -device virtio-net-pci bug, Michael S. Tsirkin, 2013/03/06
- Re: [Qemu-devel] QEMU -netdev vhost=on + -device virtio-net-pci bug, Alexey Kardashevskiy, 2013/03/07
- Re: [Qemu-devel] QEMU -netdev vhost=on + -device virtio-net-pci bug, Michael S. Tsirkin, 2013/03/10
- Re: [Qemu-devel] QEMU -netdev vhost=on + -device virtio-net-pci bug, Alexey Kardashevskiy, 2013/03/10