[PATCH 1/2] KVM test: Support params for netdev

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Qemu-kvm can config the netdev through its command line parameters,
this patch add the support for it and user could use pass params like
sndbuf to qemu through netdev_extra_params in config file.

Signed-off-by: Jason Wang <jasowang@xxxxxxxxxx>
---
 client/tests/kvm/kvm_vm.py |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/client/tests/kvm/kvm_vm.py b/client/tests/kvm/kvm_vm.py
index 72f5296..fdbaa90 100755
--- a/client/tests/kvm/kvm_vm.py
+++ b/client/tests/kvm/kvm_vm.py
@@ -260,11 +260,11 @@ class VM:
 
         def add_net(help, vlan, mode, ifname=None, script=None,
                     downscript=None, tftp=None, bootfile=None, hostfwd=[],
-                    netdev_id=None, vhost=False):
+                    netdev_id=None, netdev_extra_params=None):
             if has_option(help, "netdev"):
                 cmd = " -netdev %s,id=%s" % (mode, netdev_id)
-                if vhost:
-                    cmd += ",vhost=on"
+                if netdev_extra_params:
+                    cmd += ",%s" % netdev_extra_params
             else:
                 cmd = " -net %s,vlan=%d" % (mode, vlan)
             if mode == "tap":
@@ -420,7 +420,7 @@ class VM:
                                 script, downscript, tftp,
                                 nic_params.get("bootp"), redirs,
                                 self.netdev_id[vlan],
-                                nic_params.get("vhost")=="yes")
+                                nic_params.get("netdev_extra_params"))
             # Proceed to next NIC
             vlan += 1
 

--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux