aboutsummaryrefslogtreecommitdiffstats
path: root/resources
diff options
context:
space:
mode:
Diffstat (limited to 'resources')
-rw-r--r--resources/libraries/python/QemuUtils.py16
-rw-r--r--resources/libraries/robot/performance.robot18
2 files changed, 24 insertions, 10 deletions
diff --git a/resources/libraries/python/QemuUtils.py b/resources/libraries/python/QemuUtils.py
index 675f074570..f926d63caf 100644
--- a/resources/libraries/python/QemuUtils.py
+++ b/resources/libraries/python/QemuUtils.py
@@ -26,10 +26,10 @@ from resources.libraries.python.topology import NodeType
class QemuUtils(object):
"""QEMU utilities."""
- __QEMU_BIN = '/usr/bin/qemu-system-x86_64'
-
def __init__(self, qemu_id=1):
self._qemu_id = qemu_id
+ # Path to QEMU binary
+ self._qemu_bin = '/usr/bin/qemu-system-x86_64'
# QEMU Machine Protocol socket
self._qmp_sock = '/tmp/qmp{0}.sock'.format(self._qemu_id)
# QEMU Guest Agent socket
@@ -69,8 +69,16 @@ class QemuUtils(object):
self._node = None
self._socks = [self._qmp_sock, self._qga_sock]
+ def qemu_set_bin(self, path):
+ """Set binary path for QEMU.
+
+ :param path: Absolute path in filesystem.
+ :type path: str
+ """
+ self._qemu_bin = path
+
def qemu_set_smp(self, cpus, cores, threads, sockets):
- """Set SMP option for QEMU
+ """Set SMP option for QEMU.
:param cpus: Number of CPUs.
:param cores: Number of CPU cores on one socket.
@@ -520,7 +528,7 @@ class QemuUtils(object):
# Run QEMU
cmd = '{0} {1} {2} {3} {4} {5} {6} {7} {8} {9}'.format(
- self.__QEMU_BIN, self._qemu_opt.get('smp'), mem, ssh_fwd,
+ self._qemu_bin, self._qemu_opt.get('smp'), mem, ssh_fwd,
self._qemu_opt.get('options'),
drive, qmp, serial, qga, graphic)
(ret_code, _, stderr) = self._ssh.exec_command_sudo(cmd, timeout=300)
diff --git a/resources/libraries/robot/performance.robot b/resources/libraries/robot/performance.robot
index 707b266d5e..47c43d2a5c 100644
--- a/resources/libraries/robot/performance.robot
+++ b/resources/libraries/robot/performance.robot
@@ -1689,6 +1689,7 @@
| | ... | skip_cnt=${skip_cnt} | cpu_cnt=${count} | smt_used=${False}
| | Run keyword | ${vm_name}.Qemu Add Vhost User If | ${sock1}
| | Run keyword | ${vm_name}.Qemu Add Vhost User If | ${sock2}
+| | Run keyword | ${vm_name}.Qemu Set Bin | ${perf_qemu_bin}
| | Run keyword | ${vm_name}.Qemu Set Node | ${dut_node}
| | Run keyword | ${vm_name}.Qemu Set Smp | ${count} | ${count} | 1 | 1
| | Run keyword | ${vm_name}.Qemu Set Mem Size | 2048
@@ -1697,8 +1698,8 @@
| | Run keyword | ${vm_name}.Qemu Set Affinity | @{qemu_cpus}
| | Run keyword | ${vm_name}.Qemu Set Scheduler Policy
| | Dpdk Testpmd Start | ${vm} | eal_coremask=0x1f | eal_mem_channels=4
-| | ... | pmd_fwd_mode=io | pmd_disable_hw_vlan=${True} | pmd_txd=${256}
-| | ... | pmd_rxd=${256}
+| | ... | pmd_fwd_mode=io | pmd_disable_hw_vlan=${True}
+| | ... | pmd_txd=${perf_qemu_qsz} | pmd_rxd=${perf_qemu_qsz}
| | Return From Keyword | ${vm}
| '${nr}' Guest VMs with dpdk-testpmd connected via vhost-user is setup in a 3-node circular topology
@@ -1765,6 +1766,7 @@
| | ... | skip_cnt=${skip} | cpu_cnt=${count} | smt_used=${True}
| | Run keyword | ${vm_name}.Qemu Add Vhost User If | ${sock1}
| | Run keyword | ${vm_name}.Qemu Add Vhost User If | ${sock2}
+| | Run keyword | ${vm_name}.Qemu Set Bin | ${perf_qemu_bin}
| | Run keyword | ${vm_name}.Qemu Set Node | ${dut_node}
| | Run keyword | ${vm_name}.Qemu Set Smp | ${count} | ${count} | 1 | 1
| | Run keyword | ${vm_name}.Qemu Set Mem Size | 2048
@@ -1773,8 +1775,8 @@
| | Run keyword | ${vm_name}.Qemu Set Affinity | @{qemu_cpus}
| | Run keyword | ${vm_name}.Qemu Set Scheduler Policy
| | Dpdk Testpmd Start | ${vm} | eal_coremask=0x1f | eal_mem_channels=4
-| | ... | pmd_fwd_mode=io | pmd_disable_hw_vlan=${True} | pmd_txd=${256}
-| | ... | pmd_rxd=${256}
+| | ... | pmd_fwd_mode=io | pmd_disable_hw_vlan=${True}
+| | ... | pmd_txd=${perf_qemu_qsz} | pmd_rxd=${perf_qemu_qsz}
| | Return From Keyword | ${vm}
| Guest VM with dpdk-testpmd-mac connected via vhost-user is setup
@@ -1825,6 +1827,7 @@
| | ... | skip_cnt=${skip_cnt} | cpu_cnt=${count} | smt_used=${False}
| | Run keyword | ${vm_name}.Qemu Add Vhost User If | ${sock1}
| | Run keyword | ${vm_name}.Qemu Add Vhost User If | ${sock2}
+| | Run keyword | ${vm_name}.Qemu Set Bin | ${perf_qemu_bin}
| | Run keyword | ${vm_name}.Qemu Set Node | ${dut_node}
| | Run keyword | ${vm_name}.Qemu Set Smp | ${count} | ${count} | 1 | 1
| | Run keyword | ${vm_name}.Qemu Set Mem Size | 2048
@@ -1835,7 +1838,7 @@
| | Dpdk Testpmd Start | ${vm} | eal_coremask=0x1f
| | ... | eal_mem_channels=4 | pmd_fwd_mode=mac | pmd_eth_peer_0=0,${eth0_mac}
| | ... | pmd_eth_peer_1=1,${eth1_mac} | pmd_disable_hw_vlan=${True}
-| | ... | pmd_txd=${256} | pmd_rxd=${256}
+| | ... | pmd_txd=${perf_qemu_qsz} | pmd_rxd=${perf_qemu_qsz}
| | Return From Keyword | ${vm}
| '${nr}' Guest VMs with dpdk-testpmd-mac connected via vhost-user is setup in a 3-node circular topology
@@ -1909,6 +1912,7 @@
| | ... | skip_cnt=${skip} | cpu_cnt=${count} | smt_used=${True}
| | Run keyword | ${vm_name}.Qemu Add Vhost User If | ${sock1}
| | Run keyword | ${vm_name}.Qemu Add Vhost User If | ${sock2}
+| | Run keyword | ${vm_name}.Qemu Set Bin | ${perf_qemu_bin}
| | Run keyword | ${vm_name}.Qemu Set Node | ${dut_node}
| | Run keyword | ${vm_name}.Qemu Set Smp | ${count} | ${count} | 1 | 1
| | Run keyword | ${vm_name}.Qemu Set Mem Size | 2048
@@ -1919,7 +1923,7 @@
| | Dpdk Testpmd Start | ${vm} | eal_coremask=0x1f
| | ... | eal_mem_channels=4 | pmd_fwd_mode=mac | pmd_eth_peer_0=0,${eth0_mac}
| | ... | pmd_eth_peer_1=1,${eth1_mac} | pmd_disable_hw_vlan=${True}
-| | ... | pmd_txd=${256} | pmd_rxd=${256}
+| | ... | pmd_txd=${perf_qemu_qsz} | pmd_rxd=${perf_qemu_qsz}
| | Return From Keyword | ${vm}
| Guest VM with Linux Bridge connected via vhost-user is setup
@@ -1952,6 +1956,7 @@
| | ... | skip_cnt=${skip} | cpu_cnt=${count} | smt_used=${False}
| | Run keyword | ${vm_name}.Qemu Add Vhost User If | ${sock1}
| | Run keyword | ${vm_name}.Qemu Add Vhost User If | ${sock2}
+| | Run keyword | ${vm_name}.Qemu Set Bin | ${perf_qemu_bin}
| | Run keyword | ${vm_name}.Qemu Set Node | ${dut_node}
| | Run keyword | ${vm_name}.Qemu Set Smp | ${count} | ${count} | 1 | 1
| | Run keyword | ${vm_name}.Qemu Set Mem Size | 2048
@@ -1998,6 +2003,7 @@
| | ... | skip_cnt=${skip} | cpu_cnt=${count} | smt_used=${True}
| | Run keyword | ${vm_name}.Qemu Add Vhost User If | ${sock1}
| | Run keyword | ${vm_name}.Qemu Add Vhost User If | ${sock2}
+| | Run keyword | ${vm_name}.Qemu Set Bin | ${perf_qemu_bin}
| | Run keyword | ${vm_name}.Qemu Set Node | ${dut_node}
| | Run keyword | ${vm_name}.Qemu Set Smp | ${count} | ${count} | 1 | 1
| | Run keyword | ${vm_name}.Qemu Set Mem Size | 2048