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:19:55 -0300 Message-ID: <1286551195.2377.67.camel@freedom> References: <20100926022822.5641.15310.stgit@dhcp-91-158.nay.redhat.com> <20100926022830.5641.17750.stgit@dhcp-91-158.nay.redhat.com> 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]:14502 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753715Ab0JHPT7 (ORCPT ); Fri, 8 Oct 2010 11:19:59 -0400 In-Reply-To: <20100926022830.5641.17750.stgit@dhcp-91-158.nay.redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: 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: > Signed-off-by: Jason Wang > --- > client/tests/kvm/kvm_vm.py | 7 +++++-- > client/tests/kvm/tests_base.cfg.sample | 2 ++ > 2 files changed, 7 insertions(+), 2 deletions(-) > > diff --git a/client/tests/kvm/kvm_vm.py b/client/tests/kvm/kvm_vm.py > index 644903b..f448684 100755 > --- a/client/tests/kvm/kvm_vm.py > +++ b/client/tests/kvm/kvm_vm.py > @@ -258,9 +258,11 @@ class VM: > > def add_net(help, vlan, mode, ifname=None, script=None, > downscript=None, tftp=None, bootfile=None, hostfwd=[], > - netdev_id=None): > + netdev_id=None, vhost=False): > if has_option(help, "netdev"): > cmd = " -netdev %s,id=%s" % (mode, netdev_id) > + if vhost: > + cmd +=",vhost=on" > else: > cmd = " -net %s,vlan=%d" % (mode, vlan) > if mode == "tap": > @@ -417,7 +419,8 @@ class VM: > nic_params.get("nic_ifname"), > script, downscript, tftp, > nic_params.get("bootp"), redirs, > - self.netdev_id[vlan]) > + self.netdev_id[vlan], > + nic_params.get("vhost")=="yes") > # Proceed to next NIC > vlan += 1 > > diff --git a/client/tests/kvm/tests_base.cfg.sample b/client/tests/kvm/tests_base.cfg.sample > index 89e6f45..14e85af 100644 > --- a/client/tests/kvm/tests_base.cfg.sample > +++ b/client/tests/kvm/tests_base.cfg.sample > @@ -620,6 +620,8 @@ variants: > nic_model = virtio > # you can add advanced attributes here > # nic_extra_params = > + # you can uncomment the following line to enable vhost-net backend > + # vhost = yes > > > # Guests > > -- > To unsubscribe from this list: send the line "unsubscribe kvm" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html