aboutsummaryrefslogtreecommitdiffstats
path: root/resources/libraries/python
diff options
context:
space:
mode:
authorPeter Mikus <pmikus@cisco.com>2020-03-12 13:18:18 +0000
committerPeter Mikus <pmikus@cisco.com>2020-03-17 11:55:42 +0000
commit2896038b90897258842a5b8fe9582d84fe532644 (patch)
tree7f2ac1e0f77940fbd3227245bfa9062712662993 /resources/libraries/python
parentc5cca31223146ceaad73de575b05c46d076ad6f4 (diff)
FIX: VHOST vpp
Signed-off-by: Peter Mikus <pmikus@cisco.com> Change-Id: Id0d41a2e62ee6cce212fb2c09a0357d794426a00
Diffstat (limited to 'resources/libraries/python')
-rw-r--r--resources/libraries/python/QemuManager.py6
-rw-r--r--resources/libraries/python/QemuUtils.py20
2 files changed, 10 insertions, 16 deletions
diff --git a/resources/libraries/python/QemuManager.py b/resources/libraries/python/QemuManager.py
index c55e5af762..a9b1b6423e 100644
--- a/resources/libraries/python/QemuManager.py
+++ b/resources/libraries/python/QemuManager.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2019 Cisco and/or its affiliates.
+# Copyright (c) 2020 Cisco and/or its affiliates.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at:
@@ -62,8 +62,8 @@ class QemuManager:
for nf_node in range(1, nf_nodes + 1):
qemu_id = (nf_chain - 1) * nf_nodes + nf_node
name = f"{node}_{qemu_id}"
- sock1 = f"/var/run/vpp/sock-{qemu_id}-1"
- sock2 = f"/var/run/vpp/sock-{qemu_id}-2"
+ sock1 = f"/run/vpp/sock-{qemu_id}-1"
+ sock2 = f"/run/vpp/sock-{qemu_id}-2"
idx1 = (nf_chain - 1) * nf_nodes * 2 + nf_node * 2 - 1
vif1_mac = Topology.get_interface_mac(
self.nodes[node], f"vhost{idx1}"
diff --git a/resources/libraries/python/QemuUtils.py b/resources/libraries/python/QemuUtils.py
index b1b6008f4e..0113dc9e03 100644
--- a/resources/libraries/python/QemuUtils.py
+++ b/resources/libraries/python/QemuUtils.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2019 Cisco and/or its affiliates.
+# Copyright (c) 2020 Cisco and/or its affiliates.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at:
@@ -68,14 +68,10 @@ class QemuUtils:
self._opt[u"machine_args"] = \
u"virt,accel=kvm,usb=off,mem-merge=off,gic-version=3"
self._opt[u"console"] = u"ttyAMA0"
- self._opt[u"unsafe_iommu"] = u"echo Y > /sys/module/vfio/para" \
- u"meters/enable_unsafe_noiommu_mode"
else:
dpdk_target = u"x86_64-native"
self._opt[u"machine_args"] = u"pc,accel=kvm,usb=off,mem-merge=off"
self._opt[u"console"] = u"ttyS0"
- self._opt[u"unsafe_iommu"] = u""
-
self._testpmd_path = f"{Constants.QEMU_VM_DPDK}/" \
f"{dpdk_target}-linux-gcc/app"
self._vm_info = {
@@ -99,11 +95,11 @@ class QemuUtils:
self._opt[u"vnf"] = vnf
# Temporary files.
self._temp = dict()
- self._temp[u"pidfile"] = f"/var/run/qemu_{qemu_id}.pid"
+ self._temp[u"pidfile"] = f"/run/qemu_{qemu_id}.pid"
if img == Constants.QEMU_VM_IMAGE:
self._opt[u"vm_type"] = u"nestedvm"
- self._temp[u"qmp"] = f"/var/run/qmp_{qemu_id}.sock"
- self._temp[u"qga"] = f"/var/run/qga_{qemu_id}.sock"
+ self._temp[u"qmp"] = f"/run/qmp_{qemu_id}.sock"
+ self._temp[u"qga"] = f"/run/qga_{qemu_id}.sock"
elif img == Constants.QEMU_VM_KERNEL:
self._opt[u"img"], _ = exec_cmd_no_error(
node, f"ls -1 {Constants.QEMU_VM_KERNEL}* | tail -1",
@@ -237,8 +233,8 @@ class QemuUtils:
if not kwargs[u"jumbo_frames"]:
vpp_config.add_dpdk_no_multi_seg()
vpp_config.add_dpdk_no_tx_checksum_offload()
- vpp_config.add_plugin(u"disable", [u"default"])
- vpp_config.add_plugin(u"enable", [u"dpdk_plugin.so"])
+ vpp_config.add_plugin(u"disable", u"default")
+ vpp_config.add_plugin(u"enable", u"dpdk_plugin.so")
vpp_config.write_config(startup)
# Create VPP running configuration.
@@ -327,8 +323,7 @@ class QemuUtils:
self.create_kernelvm_config_testpmd_mac(**kwargs)
else:
raise RuntimeError(u"QEMU: Unsupported VNF!")
- self.create_kernelvm_init(vnf_bin=self._opt.get(u"vnf_bin"),
- unsafe_iommu=self._opt.get(u"unsafe_iommu"))
+ self.create_kernelvm_init(vnf_bin=self._opt.get(u"vnf_bin"))
def get_qemu_pids(self):
"""Get QEMU CPU pids.
@@ -430,7 +425,6 @@ class QemuUtils:
f"addr={self._vhost_id+5}.0,mq=on,vectors={2 * queues + 2},"
f"csum={u'on' if csum else u'off'},gso={u'on' if gso else u'off'},"
f"guest_tso4=off,guest_tso6=off,guest_ecn=off,"
- f"mrg_rxbuf={u'on,host_mtu=9200' if jumbo_frames else u'off'},"
f"{queue_size}"
)