From mboxrd@z Thu Jan 1 00:00:00 1970 From: Lucas Meneghel Rodrigues Subject: Re: [V2 PATCH 2/2] KVM test: Add vhost-net support Date: Fri, 08 Oct 2010 12:23:50 -0300 Message-ID: <1286551430.2377.71.camel@freedom> References: <20100926022822.5641.15310.stgit@dhcp-91-158.nay.redhat.com> <20100926022830.5641.17750.stgit@dhcp-91-158.nay.redhat.com> <1286551195.2377.67.camel@freedom> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit Cc: autotest@test.kernel.org, kvm@vger.kernel.org, mst@redhat.com To: Jason Wang Return-path: Received: from mx1.redhat.com ([209.132.183.28]:48270 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753715Ab0JHPX4 (ORCPT ); Fri, 8 Oct 2010 11:23:56 -0400 In-Reply-To: <1286551195.2377.67.camel@freedom> Sender: kvm-owner@vger.kernel.org List-ID: On Fri, 2010-10-08 at 12:19 -0300, Lucas Meneghel Rodrigues wrote: > On Sun, 2010-09-26 at 10:28 +0800, Jason Wang wrote: > > Vhost is a kernel-level backend for virtio. This patch add a nic_params named > > "vhost" to enable/disable vhost backend. > > Jason, I had rebased your patches. The patches themselves look good, but > apparently the syntax proposed here is invalid, and I've tried with > different qemu variants: > > - qemu from rhel6 > - qemu-kvm.git HEAD > - qemu.git HEAD > > All of them don't support vhost with netdev: 10:40:01 ERROR| VM could not be created; qemu command failed: /root/autotest/client/tests/kvm/qemu -name 'vm1' -monitor unix:'/tmp/monitor-humanmonitor1-20101008-103957-4nMr',server,nowait -serial unix:'/tmp/serial-20101008-103957-4nMr',server,nowait -drive file='/tmp/kvm_autotest_root/images/f13-64.qcow2',index=0,if=virtio,boot=on -device virtio-net-pci,mac=9a:0b:5d:7a:c1:7b,netdev=idlTBuUt -netdev user,id=idlTBuUt,vhost=on,hostfwd=tcp::5000-:22 -m 512 -smp 2 -drive file='/tmp/kvm_autotest_root/isos/linux/Fedora-13-x86_64-DVD.iso',media=cdrom,index=1 -vnc :0 10:40:01 ERROR| Status: 1 10:40:01 ERROR| Output: qemu: -drive file=/tmp/kvm_autotest_root/images/f13-64.qcow2,index=0,if=virtio,boot=on: Invalid parameter 'boot' qemu: -netdev user,id=idlTBuUt,vhost=on,hostfwd=tcp::5000-:22: Invalid parameter 'vhost' Ok, the 'drive' problem I am going to fix, let's consider only 'vhost'. When I read all the different qemu helps, it seems that vhost is tied to -net: -net tap[,vlan=n][,name=str][,fd=h][,ifname=name][,script=file][,downscript=dfile][,sndbuf=nbytes][,vnet_hdr=on|off][,vhost=on|off][,vhostfd=h] connect the host TAP network interface to VLAN 'n' and use the network scripts 'file' (default=/etc/qemu-ifup) and 'dfile' (default=/etc/qemu-ifdown); use '[down]script=no' to disable script execution; use 'fd=h' to connect to an already opened TAP interface use 'sndbuf=nbytes' to limit the size of the send buffer; the default of 'sndbuf=1048576' can be disabled using 'sndbuf=0' use vnet_hdr=off to avoid enabling the IFF_VNET_HDR tap flag; use vnet_hdr=on to make the lack of IFF_VNET_HDR support an error condition use vhost=on to enable experimental in kernel accelerator use 'vhostfd=h' to connect to an already opened vhost net device I don't think what I am missing here. I'd like to apply this, but since I couldn't verify it working with none of the qemu versions I tried, I am going to hold on for your comments. Cheers, Lucas