aboutsummaryrefslogtreecommitdiffstats
path: root/vnfs
diff options
context:
space:
mode:
authorMartin Klozik <martinx.klozik@intel.com>2016-10-12 15:35:13 +0100
committerMartin Klozik <martinx.klozik@intel.com>2016-10-17 09:43:33 +0100
commitc0061038f0dda5f1cfb7341820b12f5cff056097 (patch)
tree7f3345bc645b628c7530f0aeaf0aba4196e86ec7 /vnfs
parenta4e76fdb316d3f7901f24f36e077c6936bd679c2 (diff)
testpmd: Simplify GUEST's testpmd configuration
Testpmd has a lot of parameters and vsperf was able to modify only a few of them through dedicated GUEST's specific configuration options. Old configuration options were replaced by one generic GUEST_TESTPMD_PARAMS, which allows to modify any of existing testpmd parameters. Detection of testpmd execution was changed to be independent on TXQ flags setting. Documentation was modified to reflect GUEST_TESTPMD change. Also doc formatting was fixed at several places. JIRA: VSPERF-380 Change-Id: Ie0bf290320f3b22ef6be6b55ed553235bbcb4aff Signed-off-by: Martin Klozik <martinx.klozik@intel.com> Reviewed-by: Maryam Tahhan <maryam.tahhan@intel.com> Reviewed-by: Al Morton <acmorton@att.com> Reviewed-by: Christian Trautman <ctrautma@redhat.com> Reviewed-by: Bill Michalowski <bmichalo@redhat.com> Reviewed-by: Antonio Fischetti <antonio.fischetti@intel.com>
Diffstat (limited to 'vnfs')
-rw-r--r--vnfs/qemu/qemu.py45
1 files changed, 5 insertions, 40 deletions
diff --git a/vnfs/qemu/qemu.py b/vnfs/qemu/qemu.py
index ae0056dc..67dbfab4 100644
--- a/vnfs/qemu/qemu.py
+++ b/vnfs/qemu/qemu.py
@@ -401,48 +401,13 @@ class IVnfQemu(IVnf):
self.execute_and_wait('make clean')
self.execute_and_wait('make')
- # get multi-queue settings from CLI
- guest_testpmd_txq = int(get_test_param('guest_testpmd_txq', 0))
- if guest_testpmd_txq:
- override_list = [guest_testpmd_txq] * (self._number + 1)
- S.setValue('GUEST_TESTPMD_TXQ', override_list)
-
- guest_testpmd_rxq = int(get_test_param('guest_testpmd_rxq', 0))
- if guest_testpmd_rxq:
- override_list = [guest_testpmd_rxq] * (self._number + 1)
- S.setValue('GUEST_TESTPMD_RXQ', override_list)
-
- guest_testpmd_nb_cores = \
- int(get_test_param('guest_testpmd_nb_cores', 0))
- if guest_testpmd_nb_cores:
- override_list = [guest_testpmd_nb_cores] * (self._number + 1)
- S.setValue('GUEST_TESTPMD_NB_CORES', override_list)
-
- guest_testpmd_cpu_mask = \
- int(get_test_param('guest_testpmd_cpu_mask', 0))
- if guest_testpmd_cpu_mask:
- override_list = [guest_testpmd_cpu_mask] * (self._number + 1)
- S.setValue('GUEST_TESTPMD_CPU_MASK', override_list)
+ # get testpmd settings from CLI
+ testpmd_params = get_test_param('guest_testpmd_params',
+ S.getValue('GUEST_TESTPMD_PARAMS')[self._number])
- if int(S.getValue('GUEST_NIC_QUEUES')[self._number]):
- self.execute_and_wait(
- './testpmd {} -n4 --socket-mem 512 --'.format(
- S.getValue('GUEST_TESTPMD_CPU_MASK')[self._number]) +
- ' --burst=64 -i --txqflags=0xf00 ' +
- '--nb-cores={} --rxq={} --txq={} '.format(
- S.getValue('GUEST_TESTPMD_NB_CORES')[self._number],
- S.getValue('GUEST_TESTPMD_TXQ')[self._number],
- S.getValue('GUEST_TESTPMD_RXQ')[self._number]) +
- '--disable-hw-vlan', 60, "Done")
- else:
- self.execute_and_wait(
- './testpmd {} -n 4 --socket-mem 512 --'.format(
- S.getValue('GUEST_TESTPMD_CPU_MASK')[self._number]) +
- ' --burst=64 -i --txqflags=0xf00 ' +
- '--disable-hw-vlan', 60, "Done")
+ self.execute_and_wait( './testpmd {}'.format(testpmd_params), 60, "Done")
self.execute('set fwd ' + self._testpmd_fwd_mode, 1)
- self.execute_and_wait('start', 20,
- 'TX RS bit threshold=.+ - TXQ flags=0xf00')
+ self.execute_and_wait('start', 20, 'testpmd>')
def _configure_l2fwd(self):
"""