X-Git-Url: https://gerrit.fd.io/r/gitweb?p=csit.git;a=blobdiff_plain;f=resources%2Flibraries%2Fpython%2FQemuUtils.py;h=1e3a8aa6b6db24873dfe781b30f3192a252b68bc;hp=ea1d56a3c05a0a59269742751a1e4ef3fc1476e9;hb=eb38a257f3fbecee93a883ddfc62683e49c649a1;hpb=17deb2dd2c906dd2f674ea433d7310f8db1c6894 diff --git a/resources/libraries/python/QemuUtils.py b/resources/libraries/python/QemuUtils.py index ea1d56a3c0..1e3a8aa6b6 100644 --- a/resources/libraries/python/QemuUtils.py +++ b/resources/libraries/python/QemuUtils.py @@ -39,7 +39,7 @@ class QemuUtils(object): # Daemonize the QEMU process after initialization. Default one # management interface. self._qemu_opt['options'] = '-cpu host -daemonize -enable-kvm ' \ - '-machine pc-1.0,accel=kvm,usb=off,mem-merge=off ' \ + '-machine pc,accel=kvm,usb=off,mem-merge=off ' \ '-net nic,macaddr=52:54:00:00:02:01 -balloon none' self._qemu_opt['ssh_fwd_port'] = 10022 # Default serial console port @@ -60,6 +60,8 @@ class QemuUtils(object): 'password': 'cisco', 'interfaces': {}, } + # Virtio queue count + self._qemu_opt['queues'] = 1 self._vhost_id = 0 self._ssh = None self._node = None @@ -194,15 +196,15 @@ class QemuUtils(object): chardev += ',server' self._qemu_opt['options'] += chardev # Create Vhost-user network backend. - netdev = ' -netdev vhost-user,id=vhost{0},chardev=char{0}'.format( - self._vhost_id) + netdev = ' -netdev vhost-user,id=vhost{0},chardev=char{0},'\ + 'queues={1}'.format(self._vhost_id, self._qemu_opt['queues']) self._qemu_opt['options'] += netdev # If MAC is not specified use autogenerated 52:54:00:00:04: # e.g. vhost1 MAC is 52:54:00:00:04:01 if mac is None: mac = '52:54:00:00:04:{0:02x}'.format(self._vhost_id) - extend_options = 'csum=off,gso=off,guest_tso4=off,guest_tso6=off,'\ - 'guest_ecn=off,mrg_rxbuf=off' + extend_options = 'mq=on,csum=off,gso=off,guest_tso4=off,'\ + 'guest_tso6=off,guest_ecn=off,mrg_rxbuf=off' # Create Virtio network device. device = ' -device virtio-net-pci,netdev=vhost{0},mac={1},{2}'.format( self._vhost_id, mac, extend_options)