From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:59320) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V2DxG-0007y1-7Y for qemu-devel@nongnu.org; Thu, 25 Jul 2013 01:19:13 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1V2DxD-00008P-NV for qemu-devel@nongnu.org; Thu, 25 Jul 2013 01:19:10 -0400 Received: from mx1.redhat.com ([209.132.183.28]:57106) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V2DxD-000084-GS for qemu-devel@nongnu.org; Thu, 25 Jul 2013 01:19:07 -0400 Date: Thu, 25 Jul 2013 08:20:26 +0300 From: "Michael S. Tsirkin" Message-ID: <20130725052026.GA21106@redhat.com> References: <87li4v8ktz.fsf@rustcorp.com.au> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <87li4v8ktz.fsf@rustcorp.com.au> Subject: Re: [Qemu-devel] vhost acceleration broken? List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Rusty Russell Cc: qemu-devel@nongnu.org, Stefan Hajnoczi On Thu, Jul 25, 2013 at 11:25:20AM +0930, Rusty Russell 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 $*" > > 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?). > > Frustrated, > Rusty. That's just it. Replace -net with -netdev, and things will work.