diff options
author | 2017-08-30 02:22:07 -0700 | |
---|---|---|
committer | 2017-10-03 11:02:09 -0700 | |
commit | 28688e6866cea5b16870864ced9a6d4751094e6f (patch) | |
tree | 970c752aef2a18ebee3f36ccd9625910904717ba /tests/unit/network_services/vnf_generic/vnf/test_tg_trex.py | |
parent | 57fa65acd7663e38b625b9d46eee4724d8dca5b6 (diff) |
Enable multi-port perf in trex as TG
set TRex -c option for threads per port based on
hardware number of queues.
We can't auto-detect number of queues and we can't
use more than one thread per core on systems with single-queue
interfaces, so move the option to the config file
options:
tg_0:
queues_per_port: 2
also enable trex debug by removing >/dev/null redirection
options:
tg_0:
trex_server_debug: true
Change-Id: I46da187849282bf28f4ef5b333e1ae890e202768
Signed-off-by: Deepak S <deepak.s@linux.intel.com>
Signed-off-by: Ross Brattain <ross.b.brattain@intel.com>
Diffstat (limited to 'tests/unit/network_services/vnf_generic/vnf/test_tg_trex.py')
-rw-r--r-- | tests/unit/network_services/vnf_generic/vnf/test_tg_trex.py | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/tests/unit/network_services/vnf_generic/vnf/test_tg_trex.py b/tests/unit/network_services/vnf_generic/vnf/test_tg_trex.py index eb9f0525b..d08c62e0b 100644 --- a/tests/unit/network_services/vnf_generic/vnf/test_tg_trex.py +++ b/tests/unit/network_services/vnf_generic/vnf/test_tg_trex.py @@ -356,6 +356,17 @@ class TestTrexTrafficGen(unittest.TestCase): trex_traffic_gen = TrexTrafficGen(NAME, vnfd) trex_traffic_gen.ssh_helper = mock.MagicMock() trex_traffic_gen.resource_helper.ssh_helper = mock.MagicMock() + trex_traffic_gen.scenario_helper.scenario_cfg = {} + self.assertIsNone(trex_traffic_gen._start_server()) + + @mock.patch(SSH_HELPER) + def test__start_server_multiple_queues(self, ssh): + mock_ssh(ssh) + vnfd = self.VNFD['vnfd:vnfd-catalog']['vnfd'][0] + trex_traffic_gen = TrexTrafficGen(NAME, vnfd) + trex_traffic_gen.ssh_helper = mock.MagicMock() + trex_traffic_gen.resource_helper.ssh_helper = mock.MagicMock() + trex_traffic_gen.scenario_helper.scenario_cfg = {"options": {NAME: {"queues_per_port": 2}}} self.assertIsNone(trex_traffic_gen._start_server()) @mock.patch(SSH_HELPER) @@ -371,7 +382,6 @@ class TestTrexTrafficGen(unittest.TestCase): self.sut = TrexTrafficGen(NAME, vnfd) self.sut.ssh_helper = mock.Mock() self.sut.ssh_helper.run = mock.Mock() - self.sut._vpci_ascending = ["0000:05:00.0", "0000:05:00.1"] self.sut._connect_client = mock.Mock(autospec=STLClient) self.sut._connect_client.get_stats = mock.Mock(return_value="0") self.sut.resource_helper.RUN_DURATION = 0 |