* [dts] [PATCH V1] tests/pvp_multi_paths_virtio_single_core_performance:remove vectorized=0 by default in test case 9 and optimize code
@ 2021-03-03 10:13 Ling Wei
0 siblings, 0 replies; only message in thread
From: Ling Wei @ 2021-03-03 10:13 UTC (permalink / raw)
To: dts; +Cc: Ling Wei
Remove vectorized=0 by default in test case 9 and
use pmd.start_testpmd() to replace session.send_expect()
to start and quit testpmd.
Signed-off-by: Ling Wei <weix.ling@intel.com>
---
...ti_paths_virtio_single_core_performance.py | 39 +++++++++----------
1 file changed, 19 insertions(+), 20 deletions(-)
diff --git a/tests/TestSuite_pvp_multi_paths_virtio_single_core_performance.py b/tests/TestSuite_pvp_multi_paths_virtio_single_core_performance.py
index ea48b069..dd349fae 100644
--- a/tests/TestSuite_pvp_multi_paths_virtio_single_core_performance.py
+++ b/tests/TestSuite_pvp_multi_paths_virtio_single_core_performance.py
@@ -43,6 +43,7 @@ from packet import Packet
from pktgen import PacketGeneratorHelper
from settings import UPDATE_EXPECTED, load_global_setting
from copy import deepcopy
+from pmd_output import PmdOutput
class TestPVPMultiPathVirtioPerformance(TestCase):
@@ -68,8 +69,10 @@ class TestPVPMultiPathVirtioPerformance(TestCase):
self.tester.send_expect('mkdir -p %s' % self.out_path, '# ')
# create an instance to set stream field setting
self.pktgen_helper = PacketGeneratorHelper()
- self.vhost_user = self.dut.new_session(suite="user")
- self.vhost = self.dut.new_session(suite="vhost")
+ self.vhost_user = self.dut.new_session(suite="vhost-user")
+ self.virtio_user0 = self.dut.new_session(suite="virtio-user0")
+ self.vhost_user_pmd = PmdOutput(self.dut, self.vhost_user)
+ self.virtio_user0_pmd = PmdOutput(self.dut, self.virtio_user0)
self.save_result_flag = True
self.json_obj = {}
self.path=self.dut.apps_name['test-pmd']
@@ -163,30 +166,26 @@ class TestPVPMultiPathVirtioPerformance(TestCase):
self.dut.send_expect("rm -rf ./vhost-net*", "#")
self.dut.send_expect("killall -s INT %s" % self.testpmd_name , "#")
self.dut.send_expect("killall -s INT qemu-system-x86_64", "#")
- eal_param = self.dut.create_eal_parameters(socket=self.ports_socket, cores=self.core_list_host, prefix='vhost',
- ports=[self.dut.ports_info[self.dut_ports[0]]['pci']],
- vdevs=['net_vhost0,iface=vhost-net,queues=1,client=0'])
- command_line_client = self.path + eal_param + \
- ' -- -i --nb-cores=2 --txd=%d --rxd=%d' % (self.nb_desc, self.nb_desc)
- self.vhost.send_expect(command_line_client, "testpmd> ", 120)
- self.vhost.send_expect("set fwd io", "testpmd> ", 120)
- self.vhost.send_expect("start", "testpmd> ", 120)
+ vdevs = ['net_vhost0,iface=vhost-net,queues=1,client=0']
+ param = "--nb-cores=2 --txd=%d --rxd=%d" % (self.nb_desc, self.nb_desc)
+ self.vhost_user_pmd.start_testpmd(cores=self.core_list_host, param=param, vdevs=vdevs, ports=[0], prefix="vhost")
+ self.vhost_user_pmd.execute_cmd("set fwd mac")
+ self.vhost_user_pmd.execute_cmd("start")
def start_virtio_testpmd(self, args):
"""
start testpmd on virtio
"""
- eal_param = self.dut.create_eal_parameters(socket=self.ports_socket, cores=self.core_list_user, prefix='virtio', no_pci=True, vdevs=['net_virtio_user0,mac=00:01:02:03:04:05,path=./vhost-net,%s' % args["version"]])
+ eal_param = ""
if self.check_2M_env:
eal_param += " --single-file-segments"
if 'virtio11_vectorized' in self.running_case:
eal_param += " --force-max-simd-bitwidth=512"
- command_line_user = self.path + eal_param + \
- " -- -i %s --rss-ip --nb-cores=1 --txd=%d --rxd=%d" % (
- args["path"], self.nb_desc, self.nb_desc)
- self.vhost_user.send_expect(command_line_user, "testpmd> ", 120)
- self.vhost_user.send_expect("set fwd mac", "testpmd> ", 120)
- self.vhost_user.send_expect("start", "testpmd> ", 120)
+ vdevs = ['net_virtio_user0,mac=00:01:02:03:04:05,path=./vhost-net,%s' % args["version"]]
+ param = "%s --rss-ip --nb-cores=1 --txd=%d --rxd=%d" % (args["path"], self.nb_desc, self.nb_desc)
+ self.virtio_user0_pmd.start_testpmd(cores=self.core_list_user, eal_param=eal_param, param=param, vdevs=vdevs, no_pci=True, prefix='virtio')
+ self.virtio_user0_pmd.execute_cmd("set fwd mac")
+ self.virtio_user0_pmd.execute_cmd("start")
def handle_expected(self):
"""
@@ -287,8 +286,8 @@ class TestPVPMultiPathVirtioPerformance(TestCase):
"""
close all testpmd of vhost and virtio
"""
- self.vhost.send_expect("quit", "#", 60)
- self.vhost_user.send_expect("quit", "#", 60)
+ self.vhost_user_pmd.execute_cmd("quit", "# ")
+ self.virtio_user0_pmd.execute_cmd("quit", "# ")
def close_all_session(self):
"""
@@ -354,7 +353,7 @@ class TestPVPMultiPathVirtioPerformance(TestCase):
"""
self.test_target = self.running_case
self.expected_throughput = self.get_suite_cfg()['expected_throughput'][self.test_target]
- virtio_pmd_arg = {"version": "packed_vq=1,in_order=1,mrg_rxbuf=0,vectorized=0",
+ virtio_pmd_arg = {"version": "packed_vq=1,in_order=1,mrg_rxbuf=0",
"path": "--enable-hw-vlan-strip"}
self.start_vhost_testpmd()
self.start_virtio_testpmd(virtio_pmd_arg)
--
2.25.1
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2021-03-03 10:14 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-03 10:13 [dts] [PATCH V1] tests/pvp_multi_paths_virtio_single_core_performance:remove vectorized=0 by default in test case 9 and optimize code Ling Wei
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).