qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Michael S. Tsirkin" <mst@redhat.com>
To: Alexey Kardashevskiy <aik@ozlabs.ru>
Cc: rusty@rustcorp.com.au,
	"qemu-devel@nongnu.org" <qemu-devel@nongnu.org>,
	David Gibson <david@gibson.dropbear.id.au>
Subject: Re: [Qemu-devel] QEMU -netdev vhost=on + -device virtio-net-pci bug
Date: Tue, 5 Mar 2013 14:56:14 +0200	[thread overview]
Message-ID: <20130305125614.GA2256@redhat.com> (raw)
In-Reply-To: <513596D7.3060307@ozlabs.ru>

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:
> 
> [aik@vpl2 ~]$ cat qemu-ifup.sh
> #! /bin/sh
> 
> /sbin/ifconfig $1 0.0.0.0 promisc up
> /usr/sbin/brctl addif brtest $1
> 
> [aik@vpl2 ~]$ brctl show
> bridge name	bridge id		STP enabled	interfaces
> brtest		8000.00145e992e88	no		eth0
> [aik@vpl2 ~]$ 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
> 
> [aik@vpl2 ~]$ 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
> 
> [aik@vpl2 ~]$ 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
> [aik@vpl2 ~]$ 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:
> 
> root@erif_root:~# 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
> 
> root@erif_root:~# 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)
> 
> root@erif_root:~# uname -a
> Linux erif_root 3.8.0-aik-guest+ #262 SMP Mon Mar 4 15:58:55 EST
> 2013 ppc64 GNU/Linux
> 
> 
> -- 
> Alexey

  reply	other threads:[~2013-03-05 12:56 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-03-05  6:55 [Qemu-devel] QEMU -netdev vhost=on + -device virtio-net-pci bug Alexey Kardashevskiy
2013-03-05 12:56 ` Michael S. Tsirkin [this message]
2013-03-05 13:21   ` Alexey Kardashevskiy
2013-03-05 14:23     ` Michael S. Tsirkin
2013-03-05 22:57       ` Alexey Kardashevskiy
2013-03-06 10:31         ` Michael S. Tsirkin
2013-03-08  4:48           ` Alexey Kardashevskiy
2013-03-10  9:24             ` Michael S. Tsirkin
2013-03-10 11:25               ` Alexey Kardashevskiy

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=20130305125614.GA2256@redhat.com \
    --to=mst@redhat.com \
    --cc=aik@ozlabs.ru \
    --cc=david@gibson.dropbear.id.au \
    --cc=qemu-devel@nongnu.org \
    --cc=rusty@rustcorp.com.au \
    /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).