summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorQian Xu <qian.q.xu@intel.com>2015-07-20 12:58:44 +0800
committerMarvin Liu <yong.liu@intel.com>2015-07-21 10:19:06 +0800
commit47a04a58a33f12db89724026f74c22713615577c (patch)
tree8ab810dc0f8f0a898bf91cf0ea47c15bf50bfb7a
parent0d98f2ddd4ead9e5db456e67ee525da2f34429fa (diff)
downloaddts-47a04a58a33f12db89724026f74c22713615577c.zip
dts-47a04a58a33f12db89724026f74c22713615577c.tar.gz
dts-47a04a58a33f12db89724026f74c22713615577c.tar.xz
Add vhost-cuse parameters for virtio.
Add vhost-cuse qemu start up parameters interface in the framework. Signed-off-by: Qian Xu <qian.q.xu@intel.com>
-rw-r--r--framework/qemu_kvm.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/framework/qemu_kvm.py b/framework/qemu_kvm.py
index e5da66e..4dd0647 100644
--- a/framework/qemu_kvm.py
+++ b/framework/qemu_kvm.py
@@ -638,6 +638,9 @@ class QEMUKvm(VirtBase):
'opt_id': '%s_net' % cuse_id}
if 'opt_mac' in options.keys() and options['opt_mac']:
opts['opt_mac'] = options['opt_mac']
+ if 'opt_settings' in options.keys() and options['opt_settings']:
+ opts['opt_settings'] = options['opt_settings']
+
self.__add_vm_virtio_net_pci(**opts)
def __add_vm_virtio_net_pci(self, **options):
@@ -648,6 +651,7 @@ class QEMUKvm(VirtBase):
opt_mac: 00:00:00:00:01:03
opt_bus: pci.0
opt_addr: 0x3
+ opt_settings: csum=off,gso=off,guest_csum=off
"""
dev_boot_line = '-device virtio-net-pci'
separator = ','
@@ -666,6 +670,9 @@ class QEMUKvm(VirtBase):
if 'opt_addr' in options.keys() and \
options['opt_addr']:
dev_boot_line += separator + 'addr=%s' % options['opt_addr']
+ if 'opt_settings' in options.keys() and \
+ options['opt_settings']:
+ dev_boot_line += separator + '%s' % options['opt_settings']
if self.__string_has_multi_fields(dev_boot_line, separator):
self.__add_boot_line(dev_boot_line)