From c0061038f0dda5f1cfb7341820b12f5cff056097 Mon Sep 17 00:00:00 2001 From: Martin Klozik Date: Wed, 12 Oct 2016 15:35:13 +0100 Subject: 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 Reviewed-by: Maryam Tahhan Reviewed-by: Al Morton Reviewed-by: Christian Trautman Reviewed-by: Bill Michalowski Reviewed-by: Antonio Fischetti --- vnfs/qemu/qemu.py | 45 +++++---------------------------------------- 1 file changed, 5 insertions(+), 40 deletions(-) (limited to 'vnfs/qemu') 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): """ -- cgit 1.2.3-korg