From: Anthony Liguori <anthony@codemonkey.ws>
To: Rusty Russell <rusty@rustcorp.com.au>
Cc: qemu-devel <qemu-devel@nongnu.org>,
Stefan Hajnoczi <stefanha@redhat.com>,
"Michael S. Tsirkin" <mst@redhat.com>
Subject: Re: [Qemu-devel] vhost acceleration broken?
Date: Wed, 24 Jul 2013 21:08:10 -0500 [thread overview]
Message-ID: <CA+aC4ksBr62tX1aiAXnVueixgyvgFu5uq17TEiD8sZRKD_Tp3w@mail.gmail.com> (raw)
In-Reply-To: <87li4v8ktz.fsf@rustcorp.com.au>
On Wed, Jul 24, 2013 at 8:55 PM, Rusty Russell <rusty@rustcorp.com.au> wrote:
> Hi all,
>
> Using latest kernel and master qemu, the following doesn't use
> vhost acceleration:
>
> sudo qemu-system-x86_64 -machine pc,accel=kvm $ARGS -m 1024 -net tap,script=/home/rusty/bin/kvm-ifup,downscript=no,vhost=on -net nic,model=virtio -drive file=$QEMUIMAGE,index=0,media=disk,if=virtio -kernel arch/x86/boot/bzImage -append "root=/dev/vda1 $KARGS $*"
sudo qemu-system-x86_64 -enable-kvm $ARGS -m 1G -netdev
tap,script=/home/rusty/bin/kvm-ifup,vhost=on,id=net0 -device
virtio-net-pci,netdev=net0 -drive file=$QEMUIMAGE,if=virtio -kernel
arch/x86/boot/bzImage -append "root=/dev/vda1 $KARGS $*"
We really ought to strongly deprecate -net because it's misleading. I
suspect we can reasonably add a warning for model=virtio saying
"please don't use this" and eventually remove it entirely.
> Culprit is here:
>
> hw/net/virtio-net.c:virtio_net_vhost_status():
> if (nc->peer->info->type != NET_CLIENT_OPTIONS_KIND_TAP) {
> return;
> }
>
> info->type is NET_CLIENT_OPTIONS_KIND_HUBPORT.
>
> At a glance, it seems like vlan is always enabled, and that means a hub,
> so that change silently disabled vhost acceleration.
>
> It's quite possible that I've screwed up qemu's impenetrable command
> line (-net or -netdev, who knows what's better?).
It is for -net. The whole vlan concept sucks and makes it too hard to
do offload or vhost. It's still around for compatibility.
Regards,
Anthony Liguori
> Frustrated,
> Rusty.
>
next prev parent reply other threads:[~2013-07-25 2:08 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-07-25 1:55 [Qemu-devel] vhost acceleration broken? Rusty Russell
2013-07-25 2:08 ` Anthony Liguori [this message]
2013-07-25 3:07 ` Rusty Russell
2013-07-25 13:28 ` Anthony Liguori
2013-07-25 14:52 ` Michael S. Tsirkin
2013-07-25 14:56 ` Andreas Färber
2013-07-25 15:24 ` Michael S. Tsirkin
2013-07-25 16:16 ` Anthony Liguori
2013-07-25 16:20 ` Peter Maydell
2013-07-25 16:32 ` Michael S. Tsirkin
2013-07-28 23:55 ` Rusty Russell
2013-07-29 2:10 ` Anthony Liguori
2013-07-29 7:33 ` Michael S. Tsirkin
2013-07-29 7:09 ` Michael S. Tsirkin
2013-07-25 14:12 ` Peter Maydell
2013-07-25 14:53 ` Michael S. Tsirkin
2013-07-26 9:25 ` Stefan Hajnoczi
2013-07-26 9:43 ` Peter Maydell
2013-07-28 8:10 ` Michael S. Tsirkin
2013-07-25 5:20 ` Michael S. Tsirkin
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=CA+aC4ksBr62tX1aiAXnVueixgyvgFu5uq17TEiD8sZRKD_Tp3w@mail.gmail.com \
--to=anthony@codemonkey.ws \
--cc=mst@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=rusty@rustcorp.com.au \
--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 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).