diff options
author | Peter Mikus <pmikus@cisco.com> | 2018-10-09 09:36:47 +0000 |
---|---|---|
committer | Peter Mikus <pmikus@cisco.com> | 2019-01-02 08:32:13 +0000 |
commit | ff8ba5fd5fd066332b4b109caad09e5dbb86b853 (patch) | |
tree | 427007b97c5454da551a9dc946ef273c1febdb45 /resources/libraries/python/QemuUtils.py | |
parent | 08fc34b6ba780d227a1327274d434823118a4c77 (diff) |
VHOST vectors.
Change-Id: I5e17c5ab5cb99af0ac3d063ffc911bf95457d3e4
Signed-off-by: Peter Mikus <pmikus@cisco.com>
Diffstat (limited to 'resources/libraries/python/QemuUtils.py')
-rw-r--r-- | resources/libraries/python/QemuUtils.py | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/resources/libraries/python/QemuUtils.py b/resources/libraries/python/QemuUtils.py index a61a11d37a..ff3a00f730 100644 --- a/resources/libraries/python/QemuUtils.py +++ b/resources/libraries/python/QemuUtils.py @@ -251,17 +251,20 @@ class QemuUtils(object): format(qemu_id=self._qemu_id, vhost_id=self._vhost_id))\ if mac is None else mac - queue_size = (',rx_queue_size={queue_size},tx_queue_size={queue_size}'. + queue_size = ('rx_queue_size={queue_size},tx_queue_size={queue_size}'. format(queue_size=self._qemu_opt.get('queue_size')))\ if self._qemu_opt.get('queue_size') else '' + vector_size = ('vectors={vectors}'. + format(vectors=2*self._qemu_opt.get('queue_count')+2))\ + if self._qemu_opt.get('queue_count') else '' # Create Virtio network device. device = (' -device virtio-net-pci,netdev=vhost{vhost_id},mac={mac},' - 'mq=on,csum=off,gso=off,guest_tso4=off,guest_tso6=off,' - 'guest_ecn=off,mrg_rxbuf={mbuf}{queue_size}'. + 'mq=on,{vector_size},csum=off,gso=off,guest_tso4=off,' + 'guest_tso6=off,guest_ecn=off,mrg_rxbuf={mbuf},{queue_size}'. format(vhost_id=self._vhost_id, mac=mac, mbuf='on,host_mtu=9200' if jumbo_frames else 'off', - queue_size=queue_size)) + queue_size=queue_size, vector_size=vector_size)) self._qemu_opt['options'] += device # Add interface MAC and socket to the node dict if_data = {'mac_address': mac, 'socket': socket} |