* [dts] [PATCH V1 01/11]tests/TestSuite_dpdk_gro_lib: optimize testpmd eal parameters
@ 2020-02-17 12:05 Xiao Qimai
2020-02-17 12:05 ` [dts] [PATCH V1 02/11]tests/TestSuite_dpdk_gso_lib: " Xiao Qimai
` (10 more replies)
0 siblings, 11 replies; 12+ messages in thread
From: Xiao Qimai @ 2020-02-17 12:05 UTC (permalink / raw)
To: dts; +Cc: Xiao Qimai
Signed-off-by: Xiao Qimai <qimaix.xiao@intel.com>
---
tests/TestSuite_dpdk_gro_lib.py | 10 +++-------
1 file changed, 3 insertions(+), 7 deletions(-)
diff --git a/tests/TestSuite_dpdk_gro_lib.py b/tests/TestSuite_dpdk_gro_lib.py
index f9b7d76..2f89207 100644
--- a/tests/TestSuite_dpdk_gro_lib.py
+++ b/tests/TestSuite_dpdk_gro_lib.py
@@ -81,9 +81,8 @@ class TestDPDKGROLib(TestCase):
self.verify(self.dut.number_of_cores >= 3,
"There has not enought cores to test this case %s" % self.suite_name)
cores_list = self.dut.get_core_list("1S/3C/1T", socket=self.socket)
- vhost_list = cores_list[0:2]
+ self.vhost_list = cores_list[0:2]
self.qemu_cpupin = cores_list[2:3][0]
- self.core_mask_vhost = utils.create_mask(vhost_list)
# Set the params for VM
self.virtio_ip1 = "1.1.1.2"
@@ -112,11 +111,8 @@ class TestDPDKGROLib(TestCase):
# mode 2 : tcp traffic heavy mode
# mode 3 : vxlan traffic light mode
# mode 4 : tcp traffic flush 4
- self.testcmd = self.target + "/app/testpmd -c %s -n %d --socket-mem %s --legacy-mem" \
- + " --vdev 'net_vhost0,iface=%s/vhost-net,queues=1' -- -i --enable-hw-vlan-strip --tx-offloads=0x00" \
- + " --txd=1024 --rxd=1024"
- self.testcmd_start = self.testcmd % (
- self.core_mask_vhost, self.memory_channel, self.socket_mem, self.base_dir)
+ eal_param = self.dut.create_eal_parameters(cores=self.vhost_list, vdevs=['net_vhost0,iface=%s/vhost-net,queues=1' % self.base_dir])
+ self.testcmd_start = self.target + "/app/testpmd " + eal_param + " -- -i --enable-hw-vlan-strip --tx-offloads=0x00 --txd=1024 --rxd=1024"
self.vhost_user = self.dut.new_session(suite="user")
self.vhost_user.send_expect(self.testcmd_start, "testpmd> ", 120)
self.vhost_user.send_expect("set fwd csum", "testpmd> ", 120)
--
1.8.3.1
^ permalink raw reply [flat|nested] 12+ messages in thread
* [dts] [PATCH V1 02/11]tests/TestSuite_dpdk_gso_lib: optimize testpmd eal parameters
2020-02-17 12:05 [dts] [PATCH V1 01/11]tests/TestSuite_dpdk_gro_lib: optimize testpmd eal parameters Xiao Qimai
@ 2020-02-17 12:05 ` Xiao Qimai
2020-02-17 12:05 ` [dts] [PATCH V1 03/11]tests/TestSuite_loopback_multi_paths_port_restart: " Xiao Qimai
` (9 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: Xiao Qimai @ 2020-02-17 12:05 UTC (permalink / raw)
To: dts; +Cc: Xiao Qimai
Signed-off-by: Xiao Qimai <qimaix.xiao@intel.com>
---
tests/TestSuite_dpdk_gso_lib.py | 10 +++-------
1 file changed, 3 insertions(+), 7 deletions(-)
diff --git a/tests/TestSuite_dpdk_gso_lib.py b/tests/TestSuite_dpdk_gso_lib.py
index 28258f6..4839ab2 100644
--- a/tests/TestSuite_dpdk_gso_lib.py
+++ b/tests/TestSuite_dpdk_gso_lib.py
@@ -82,9 +82,8 @@ class TestDPDKGsoLib(TestCase):
self.verify(self.dut.number_of_cores >= 3,
"There has not enought cores to test this case %s" % self.suite_name)
cores_list = self.dut.get_core_list("1S/3C/1T", socket=self.socket)
- vhost_list = cores_list[0:2]
+ self.vhost_list = cores_list[0:2]
self.qemu_cpupin = cores_list[2:3][0]
- self.core_mask_vhost = utils.create_mask(vhost_list)
# Set the params for VM
self.virtio_ip1 = "1.1.1.2"
@@ -113,11 +112,8 @@ class TestDPDKGsoLib(TestCase):
# mode = 2: DPDK GSO for Vxlan/GRE Traffic
# mode = 3: TSO
# mode = others: NO DPDK GSO/TSO
- self.testcmd = self.target + "/app/testpmd -c %s -n %d --socket-mem %s --legacy-mem" \
- + " --vdev 'net_vhost0,iface=%s/vhost-net,queues=1' -- -i --tx-offloads=0x00 "\
- + " --txd=1024 --rxd=1024"
- self.testcmd_start = self.testcmd % (
- self.core_mask_vhost, self.memory_channel, self.socket_mem, self.base_dir)
+ eal_param = self.dut.create_eal_parameters(cores=self.vhost_list, vdevs=['net_vhost0,iface=%s/vhost-net,queues=1' % self.base_dir])
+ self.testcmd_start = self.target + "/app/testpmd " + eal_param + " -- -i --tx-offloads=0x00 --txd=1024 --rxd=1024"
self.vhost_user = self.dut.new_session(suite="user")
self.vhost_user.send_expect(self.testcmd_start, "testpmd> ", 120)
self.vhost_user.send_expect("set fwd csum", "testpmd> ", 120)
--
1.8.3.1
^ permalink raw reply [flat|nested] 12+ messages in thread
* [dts] [PATCH V1 03/11]tests/TestSuite_loopback_multi_paths_port_restart: optimize testpmd eal parameters
2020-02-17 12:05 [dts] [PATCH V1 01/11]tests/TestSuite_dpdk_gro_lib: optimize testpmd eal parameters Xiao Qimai
2020-02-17 12:05 ` [dts] [PATCH V1 02/11]tests/TestSuite_dpdk_gso_lib: " Xiao Qimai
@ 2020-02-17 12:05 ` Xiao Qimai
2020-02-17 12:05 ` [dts] [PATCH V1 04/11]tests/TestSuite_loopback_multi_queues: " Xiao Qimai
` (8 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: Xiao Qimai @ 2020-02-17 12:05 UTC (permalink / raw)
To: dts; +Cc: Xiao Qimai
Signed-off-by: Xiao Qimai <qimaix.xiao@intel.com>
---
tests/TestSuite_loopback_multi_paths_port_restart.py | 20 ++++----------------
1 file changed, 4 insertions(+), 16 deletions(-)
diff --git a/tests/TestSuite_loopback_multi_paths_port_restart.py b/tests/TestSuite_loopback_multi_paths_port_restart.py
index b1bd32f..0b54b8d 100644
--- a/tests/TestSuite_loopback_multi_paths_port_restart.py
+++ b/tests/TestSuite_loopback_multi_paths_port_restart.py
@@ -57,8 +57,6 @@ class TestLoopbackPortRestart(TestCase):
self.core_config, socket=self.ports_socket)
self.core_list_user = self.core_list[0:2]
self.core_list_host = self.core_list[2:5]
- self.core_mask_user = utils.create_mask(self.core_list_user)
- self.core_mask_host = utils.create_mask(self.core_list_host)
def set_up(self):
"""
@@ -81,13 +79,8 @@ class TestLoopbackPortRestart(TestCase):
"""
self.dut.send_expect("killall -s INT testpmd", "#")
self.dut.send_expect("rm -rf ./vhost-net*", "#")
- command_client = self.dut.target + "/app/testpmd " + \
- " -n %d -c %s --socket-mem 1024,1024 " + \
- " --legacy-mem --no-pci --file-prefix=vhost " + \
- " --vdev 'net_vhost0,iface=vhost-net,queues=1,client=0' " + \
- " -- -i --nb-cores=1 --txd=1024 --rxd=1024"
- command_line_client = command_client % (
- self.dut.get_memory_channels(), self.core_mask_host)
+ eal_param = self.dut.create_eal_parameters(cores=self.core_list_host, prefix='vhost', no_pci=True, vdevs=['net_vhost0,iface=vhost-net,queues=1,client=0'])
+ command_line_client = self.dut.target + "/app/testpmd " + eal_param + " -- -i --nb-cores=1 --txd=1024 --rxd=1024"
self.vhost.send_expect(command_line_client, "testpmd> ", 120)
self.vhost.send_expect("set fwd mac", "testpmd> ", 120)
@@ -95,13 +88,8 @@ class TestLoopbackPortRestart(TestCase):
"""
start testpmd of vhost user
"""
- command_line_user = self.dut.target + "/app/testpmd -n %d -c %s --socket-mem 1024,1024 " + \
- "--legacy-mem --no-pci --file-prefix=virtio " + \
- "--vdev=net_virtio_user0,mac=00:01:02:03:04:05,path=./vhost-net,%s " + \
- " -- -i %s --rss-ip --nb-cores=1 --txd=1024 --rxd=1024"
- command_line_user = command_line_user % (self.dut.get_memory_channels(),
- self.core_mask_user,
- pmd_arg["version"], pmd_arg["path"])
+ eal_param = self.dut.create_eal_parameters(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' % pmd_arg["version"]])
+ command_line_user = self.dut.target + "/app/testpmd " + eal_param + " -- -i %s --rss-ip --nb-cores=1 --txd=1024 --rxd=1024" % pmd_arg["path"]
self.virtio_user.send_expect(command_line_user, "testpmd> ", 120)
self.virtio_user.send_expect("set fwd mac", "testpmd> ", 120)
self.virtio_user.send_expect("start", "testpmd> ", 120)
--
1.8.3.1
^ permalink raw reply [flat|nested] 12+ messages in thread
* [dts] [PATCH V1 04/11]tests/TestSuite_loopback_multi_queues: optimize testpmd eal parameters
2020-02-17 12:05 [dts] [PATCH V1 01/11]tests/TestSuite_dpdk_gro_lib: optimize testpmd eal parameters Xiao Qimai
2020-02-17 12:05 ` [dts] [PATCH V1 02/11]tests/TestSuite_dpdk_gso_lib: " Xiao Qimai
2020-02-17 12:05 ` [dts] [PATCH V1 03/11]tests/TestSuite_loopback_multi_paths_port_restart: " Xiao Qimai
@ 2020-02-17 12:05 ` Xiao Qimai
2020-02-17 12:05 ` [dts] [PATCH V1 05/11]tests/TestSuite_loopback_virtio_user_server_mode: " Xiao Qimai
` (7 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: Xiao Qimai @ 2020-02-17 12:05 UTC (permalink / raw)
To: dts; +Cc: Xiao Qimai
Signed-off-by: Xiao Qimai <qimaix.xiao@intel.com>
---
tests/TestSuite_loopback_multi_queues.py | 21 ++++-----------------
1 file changed, 4 insertions(+), 17 deletions(-)
diff --git a/tests/TestSuite_loopback_multi_queues.py b/tests/TestSuite_loopback_multi_queues.py
index b6c3d25..daba71e 100644
--- a/tests/TestSuite_loopback_multi_queues.py
+++ b/tests/TestSuite_loopback_multi_queues.py
@@ -88,20 +88,13 @@ class TestLoopbackMultiQueues(TestCase):
self.core_list = self.dut.get_core_list(self.core_config)
self.core_list_user = self.core_list[0:self.nb_cores + 1]
self.core_list_host = self.core_list[self.nb_cores + 1:2 * self.nb_cores + 2]
- self.core_mask_user = utils.create_mask(self.core_list_user)
- self.core_mask_host = utils.create_mask(self.core_list_host)
def start_vhost_testpmd(self):
"""
start testpmd on vhost
"""
- command_line_client = self.dut.target + "/app/testpmd -n %d -c %s --socket-mem %s" + \
- " --legacy-mem --no-pci --file-prefix=vhost --vdev " + \
- "'net_vhost0,iface=vhost-net,queues=%d' -- -i --nb-cores=%d " + \
- "--rxq=%d --txq=%d --txd=1024 --rxd=1024"
- command_line_client = command_line_client % (
- self.dut.get_memory_channels(), self.core_mask_host, self.socket_mem,
- self.queue_number, self.nb_cores, self.queue_number, self.queue_number)
+ eal_param = self.dut.create_eal_parameters(cores=self.core_list_host, prefix='vhost', no_pci=True, vdevs=['net_vhost0,iface=vhost-net,queues=%d' % self.queue_number])
+ command_line_client = self.dut.target + "/app/testpmd " + eal_param + " -- -i --nb-cores=%d --rxq=%d --txq=%d --txd=1024 --rxd=1024" % (self.nb_cores, self.queue_number, self.queue_number)
self.vhost.send_expect(command_line_client, "testpmd> ", 120)
self.vhost.send_expect("set fwd mac", "testpmd> ", 120)
@@ -109,14 +102,8 @@ class TestLoopbackMultiQueues(TestCase):
"""
start testpmd on virtio
"""
- command_line_user = self.dut.target + "/app/testpmd -n %d -c %s " + \
- " --socket-mem %s --legacy-mem --no-pci --file-prefix=virtio " + \
- "--vdev=net_virtio_user0,mac=00:01:02:03:04:05,path=./vhost-net,queues=%d,%s " + \
- "-- -i %s --rss-ip --nb-cores=%d --rxq=%d --txq=%d --txd=1024 --rxd=1024"
- command_line_user = command_line_user % (
- self.dut.get_memory_channels(), self.core_mask_user, self.socket_mem,
- self.queue_number, args["version"], args["path"], self.nb_cores,
- self.queue_number, self.queue_number)
+ eal_param = self.dut.create_eal_parameters(cores=self.core_list_user, prefix='virtio', no_pci=True, vdevs=['net_virtio_user0,mac=00:01:02:03:04:05,path=./vhost-net,queues=%d,%s' % (self.queue_number, args["version"])])
+ command_line_user = self.dut.target + "/app/testpmd " + eal_param + " -- -i %s --rss-ip --nb-cores=%d --rxq=%d --txq=%d --txd=1024 --rxd=1024" % (args["path"], self.nb_cores, self.queue_number, self.queue_number)
self.virtio_user.send_expect(command_line_user, "testpmd> ", 120)
self.virtio_user.send_expect("set fwd mac", "testpmd> ", 120)
self.virtio_user.send_expect("start", "testpmd> ", 120)
--
1.8.3.1
^ permalink raw reply [flat|nested] 12+ messages in thread
* [dts] [PATCH V1 05/11]tests/TestSuite_loopback_virtio_user_server_mode: optimize testpmd eal parameters
2020-02-17 12:05 [dts] [PATCH V1 01/11]tests/TestSuite_dpdk_gro_lib: optimize testpmd eal parameters Xiao Qimai
` (2 preceding siblings ...)
2020-02-17 12:05 ` [dts] [PATCH V1 04/11]tests/TestSuite_loopback_multi_queues: " Xiao Qimai
@ 2020-02-17 12:05 ` Xiao Qimai
2020-02-17 12:05 ` [dts] [PATCH V1 06/11]tests/TestSuite_pvp_multi_paths_performance: " Xiao Qimai
` (6 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: Xiao Qimai @ 2020-02-17 12:05 UTC (permalink / raw)
To: dts; +Cc: Xiao Qimai
Signed-off-by: Xiao Qimai <qimaix.xiao@intel.com>
---
.../TestSuite_loopback_virtio_user_server_mode.py | 29 +++++-----------------
1 file changed, 6 insertions(+), 23 deletions(-)
diff --git a/tests/TestSuite_loopback_virtio_user_server_mode.py b/tests/TestSuite_loopback_virtio_user_server_mode.py
index fd4b807..ec4dfc1 100644
--- a/tests/TestSuite_loopback_virtio_user_server_mode.py
+++ b/tests/TestSuite_loopback_virtio_user_server_mode.py
@@ -57,8 +57,6 @@ class TestLoopbackVirtioUserServerMode(TestCase):
self.core_list = self.dut.get_core_list(self.core_config)
self.core_list_user = self.core_list[0:3]
self.core_list_host = self.core_list[3:6]
- self.core_mask_user = utils.create_mask(self.core_list_user)
- self.core_mask_host = utils.create_mask(self.core_list_host)
def set_up(self):
"""
@@ -79,14 +77,8 @@ class TestLoopbackVirtioUserServerMode(TestCase):
"""
start testpmd on vhost
"""
- command_client = self.dut.target + "/app/testpmd " + \
- " -n %d -c %s --socket-mem 1024,1024 " + \
- " --legacy-mem --no-pci --file-prefix=vhost " + \
- " --vdev 'net_vhost0,iface=vhost-net,client=1,queues=%d' " + \
- " -- -i --rxq=%d --txq=%d --nb-cores=%d %s"
- command_line_client = command_client % (self.dut.get_memory_channels(),
- self.core_mask_host, queue_number, queue_number,
- queue_number, nb_cores, extern_params)
+ eal_param = self.dut.create_eal_parameters(cores=self.core_list_host, prefix='vhost', no_pci=True, vdevs=['net_vhost0,iface=vhost-net,client=1,queues=%d' % queue_number])
+ command_line_client = self.dut.target + "/app/testpmd " + eal_param + " -- -i --rxq=%d --txq=%d --nb-cores=%d %s" % (queue_number, queue_number, nb_cores, extern_params)
self.vhost.send_expect(command_line_client, "testpmd> ", 120)
self.vhost.send_expect("set fwd mac", "testpmd> ", 120)
@@ -94,12 +86,8 @@ class TestLoopbackVirtioUserServerMode(TestCase):
"""
start testpmd of vhost user
"""
- command_line_user = self.dut.target + "/app/testpmd -n %d -c %s --socket-mem 1024,1024 " + \
- "--legacy-mem --no-pci --file-prefix=virtio " + \
- "--vdev=net_virtio_user0,mac=00:01:02:03:04:05,path=vhost-net,server=1,queues=1 " + \
- " -- -i --rxq=1 --txq=1 --no-numa"
- command_line_user = command_line_user % (self.dut.get_memory_channels(),
- self.core_mask_user)
+ eal_param = self.dut.create_eal_parameters(cores=self.core_list_user, prefix='virtio', no_pci=True, vdevs=['net_virtio_user0,mac=00:01:02:03:04:05,path=vhost-net,server=1,queues=1'])
+ command_line_user = self.dut.target + "/app/testpmd " + eal_param + " -- -i --rxq=1 --txq=1 --no-numa"
self.virtio_user.send_expect(command_line_user, "testpmd> ", 120)
self.virtio_user.send_expect("set fwd mac", "testpmd> ", 120)
@@ -113,13 +101,8 @@ class TestLoopbackVirtioUserServerMode(TestCase):
"""
start testpmd of vhost user
"""
- command_line_user = self.dut.target + "/app/testpmd -n %d -c %s --socket-mem 1024,1024 " + \
- "--legacy-mem --no-pci --file-prefix=virtio " + \
- "--vdev=net_virtio_user0,mac=00:01:02:03:04:05,path=vhost-net,server=1,queues=%d,%s " + \
- " -- -i %s --nb-cores=%d --rxq=%d --txq=%d"
- command_line_user = command_line_user % (self.dut.get_memory_channels(),
- self.core_mask_user, self.queue_number, mode, extern_params,
- self.nb_cores, self.queue_number, self.queue_number)
+ eal_param = self.dut.create_eal_parameters(cores=self.core_list_user, prefix='virtio', no_pci=True, vdevs=['net_virtio_user0,mac=00:01:02:03:04:05,path=vhost-net,server=1,queues=%d,%s' % (self.queue_number, mode)])
+ command_line_user = self.dut.target + "/app/testpmd " + eal_param + " -- -i %s --nb-cores=%d --rxq=%d --txq=%d" % (extern_params, self.nb_cores, self.queue_number, self.queue_number)
self.virtio_user.send_expect(command_line_user, "testpmd> ", 120)
self.virtio_user.send_expect("set fwd mac", "testpmd> ", 120)
--
1.8.3.1
^ permalink raw reply [flat|nested] 12+ messages in thread
* [dts] [PATCH V1 06/11]tests/TestSuite_pvp_multi_paths_performance: optimize testpmd eal parameters
2020-02-17 12:05 [dts] [PATCH V1 01/11]tests/TestSuite_dpdk_gro_lib: optimize testpmd eal parameters Xiao Qimai
` (3 preceding siblings ...)
2020-02-17 12:05 ` [dts] [PATCH V1 05/11]tests/TestSuite_loopback_virtio_user_server_mode: " Xiao Qimai
@ 2020-02-17 12:05 ` Xiao Qimai
2020-02-17 12:05 ` [dts] [PATCH V1 07/11]tests/TestSuite_pvp_multi_paths_vhost_single_core_performance: " Xiao Qimai
` (5 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: Xiao Qimai @ 2020-02-17 12:05 UTC (permalink / raw)
To: dts; +Cc: Xiao Qimai
Signed-off-by: Xiao Qimai <qimaix.xiao@intel.com>
---
tests/TestSuite_pvp_multi_paths_performance.py | 17 +++++++++++------
1 file changed, 11 insertions(+), 6 deletions(-)
diff --git a/tests/TestSuite_pvp_multi_paths_performance.py b/tests/TestSuite_pvp_multi_paths_performance.py
index df24e77..a884e1f 100644
--- a/tests/TestSuite_pvp_multi_paths_performance.py
+++ b/tests/TestSuite_pvp_multi_paths_performance.py
@@ -56,8 +56,6 @@ class TestPVPMultiPathPerformance(TestCase):
self.core_config, socket=self.ports_socket)
self.core_list_user = self.core_list[0:2]
self.core_list_host = self.core_list[2:4]
- self.core_mask_user = utils.create_mask(self.core_list_user)
- self.core_mask_host = utils.create_mask(self.core_list_host)
self.out_path = '/tmp'
out = self.tester.send_expect('ls -d %s' % self.out_path, '# ')
@@ -115,6 +113,11 @@ class TestPVPMultiPathPerformance(TestCase):
results_row.append(throughput)
self.result_table_add(results_row)
+ @property
+ def check_2M_env(self):
+ out = self.dut.send_expect("cat /proc/meminfo |grep Hugepagesize|awk '{print($2)}'", "# ")
+ return True if out == '2048' else False
+
def start_vhost_testpmd(self):
"""
start testpmd on vhost
@@ -123,10 +126,11 @@ class TestPVPMultiPathPerformance(TestCase):
self.dut.send_expect("rm -rf ./vhost-net*", "#")
self.dut.send_expect("killall -s INT testpmd", "#")
self.dut.send_expect("killall -s INT qemu-system-x86_64", "#")
- eal_param = self.dut.create_eal_parameters(socket=self.ports_socket, prefix='vhost',
+ eal_param = self.dut.create_eal_parameters(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'])
- eal_param += " --single-file-segments"
+ if self.check_2M_env:
+ eal_param += " --single-file-segments"
command_line_client = "./%s/app/testpmd " % self.target + eal_param + " -- -i --nb-cores=1 --txd=1024 --rxd=1024"
self.vhost.send_expect(command_line_client, "testpmd> ", 120)
self.vhost.send_expect("set fwd mac", "testpmd> ", 120)
@@ -136,11 +140,12 @@ class TestPVPMultiPathPerformance(TestCase):
"""
start testpmd on virtio
"""
- eal_param = self.dut.create_eal_parameters(socket=self.ports_socket, prefix='virtio',
+ eal_param = self.dut.create_eal_parameters(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 += " --single-file-segments"
+ if self.check_2M_env:
+ eal_param += " --single-file-segments"
command_line_user = "./%s/app/testpmd " % self.target + eal_param + " -- -i %s --rss-ip --nb-cores=1 --txd=1024 --rxd=1024" % \
args["path"]
self.vhost_user = self.dut.new_session(suite="user")
--
1.8.3.1
^ permalink raw reply [flat|nested] 12+ messages in thread
* [dts] [PATCH V1 07/11]tests/TestSuite_pvp_multi_paths_vhost_single_core_performance: optimize testpmd eal parameters
2020-02-17 12:05 [dts] [PATCH V1 01/11]tests/TestSuite_dpdk_gro_lib: optimize testpmd eal parameters Xiao Qimai
` (4 preceding siblings ...)
2020-02-17 12:05 ` [dts] [PATCH V1 06/11]tests/TestSuite_pvp_multi_paths_performance: " Xiao Qimai
@ 2020-02-17 12:05 ` Xiao Qimai
2020-02-17 12:05 ` [dts] [PATCH V1 08/11]tests/TestSuite_pvp_multi_paths_virtio_single_core_performance: " Xiao Qimai
` (4 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: Xiao Qimai @ 2020-02-17 12:05 UTC (permalink / raw)
To: dts; +Cc: Xiao Qimai
Signed-off-by: Xiao Qimai <qimaix.xiao@intel.com>
---
...ite_pvp_multi_paths_vhost_single_core_performance.py | 17 +++++++++++------
1 file changed, 11 insertions(+), 6 deletions(-)
diff --git a/tests/TestSuite_pvp_multi_paths_vhost_single_core_performance.py b/tests/TestSuite_pvp_multi_paths_vhost_single_core_performance.py
index 94c1759..a8b9e67 100644
--- a/tests/TestSuite_pvp_multi_paths_vhost_single_core_performance.py
+++ b/tests/TestSuite_pvp_multi_paths_vhost_single_core_performance.py
@@ -55,8 +55,6 @@ class TestPVPMultiPathVhostPerformance(TestCase):
self.core_config, socket=self.ports_socket)
self.core_list_user = self.core_list[0:3]
self.core_list_host = self.core_list[3:5]
- self.core_mask_user = utils.create_mask(self.core_list_user)
- self.core_mask_host = utils.create_mask(self.core_list_host)
self.out_path = '/tmp'
out = self.tester.send_expect('ls -d %s' % self.out_path, '# ')
@@ -113,6 +111,11 @@ class TestPVPMultiPathVhostPerformance(TestCase):
results_row.append(throughput)
self.result_table_add(results_row)
+ @property
+ def check_2M_env(self):
+ out = self.dut.send_expect("cat /proc/meminfo |grep Hugepagesize|awk '{print($2)}'", "# ")
+ return True if out == '2048' else False
+
def start_vhost_testpmd(self):
"""
start testpmd on vhost
@@ -122,10 +125,11 @@ class TestPVPMultiPathVhostPerformance(TestCase):
self.dut.send_expect("rm -rf ./vhost-net*", "#")
self.dut.send_expect("killall -s INT testpmd", "#")
self.dut.send_expect("killall -s INT qemu-system-x86_64", "#")
- eal_param = self.dut.create_eal_parameters(socket=self.ports_socket, prefix='vhost',
+ eal_param = self.dut.create_eal_parameters(cores=self.core_list_host, prefix='vhost',
no_pci=True,
vdevs=['net_vhost0,iface=vhost-net,queues=1'])
- eal_param += " --single-file-segments"
+ if self.check_2M_env:
+ eal_param += " --single-file-segments"
command_line_client = "./%s/app/testpmd " % self.target + eal_param + " -- -i --nb-cores=1 --txd=1024 --rxd=1024"
self.vhost.send_expect(command_line_client, "testpmd> ", 120)
self.vhost.send_expect("set fwd mac", "testpmd> ", 120)
@@ -135,10 +139,11 @@ class TestPVPMultiPathVhostPerformance(TestCase):
"""
start testpmd on virtio
"""
- eal_param = self.dut.create_eal_parameters(socket=self.ports_socket, prefix='virtio',
+ eal_param = self.dut.create_eal_parameters(cores=self.core_list_user, prefix='virtio',
vdevs=['virtio_user0,mac=00:01:02:03:04:05,path=./vhost-net,queues=1,%s' %
args["version"]])
- eal_param += " --single-file-segments"
+ if self.check_2M_env:
+ eal_param += " --single-file-segments"
command_line_user = "./%s/app/testpmd " % self.target + eal_param + " -- -i %s --nb-cores=2 --txd=1024 --rxd=1024" % \
args["path"]
self.vhost_user.send_expect(command_line_user, "testpmd> ", 120)
--
1.8.3.1
^ permalink raw reply [flat|nested] 12+ messages in thread
* [dts] [PATCH V1 08/11]tests/TestSuite_pvp_multi_paths_virtio_single_core_performance: optimize testpmd eal parameters
2020-02-17 12:05 [dts] [PATCH V1 01/11]tests/TestSuite_dpdk_gro_lib: optimize testpmd eal parameters Xiao Qimai
` (5 preceding siblings ...)
2020-02-17 12:05 ` [dts] [PATCH V1 07/11]tests/TestSuite_pvp_multi_paths_vhost_single_core_performance: " Xiao Qimai
@ 2020-02-17 12:05 ` Xiao Qimai
2020-02-17 12:05 ` [dts] [PATCH V1 09/11]tests/TestSuite_pvp_share_lib: " Xiao Qimai
` (3 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: Xiao Qimai @ 2020-02-17 12:05 UTC (permalink / raw)
To: dts; +Cc: Xiao Qimai
Signed-off-by: Xiao Qimai <qimaix.xiao@intel.com>
---
...p_multi_paths_virtio_single_core_performance.py | 52 ++++++++++------------
1 file changed, 24 insertions(+), 28 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 7264dc5..53b073b 100644
--- a/tests/TestSuite_pvp_multi_paths_virtio_single_core_performance.py
+++ b/tests/TestSuite_pvp_multi_paths_virtio_single_core_performance.py
@@ -56,12 +56,6 @@ class TestPVPMultiPathVirtioPerformance(TestCase):
self.core_config, socket=self.ports_socket)
self.core_list_user = self.core_list[0:2]
self.core_list_host = self.core_list[2:5]
- self.core_mask_user = utils.create_mask(self.core_list_user)
- self.core_mask_host = utils.create_mask(self.core_list_host)
- if len(set([int(core['socket']) for core in self.dut.cores])) == 1:
- self.socket_mem = '1024'
- else:
- self.socket_mem = '1024,1024'
self.out_path = '/tmp'
out = self.tester.send_expect('ls -d %s' % self.out_path, '# ')
@@ -120,6 +114,11 @@ class TestPVPMultiPathVirtioPerformance(TestCase):
results_row.append(throughput)
self.result_table_add(results_row)
+ @property
+ def check_2M_env(self):
+ out = self.dut.send_expect("cat /proc/meminfo |grep Hugepagesize|awk '{print($2)}'", "# ")
+ return True if out == '2048' else False
+
def start_vhost_testpmd(self):
"""
start testpmd on vhost
@@ -128,12 +127,12 @@ class TestPVPMultiPathVirtioPerformance(TestCase):
self.dut.send_expect("rm -rf ./vhost-net*", "#")
self.dut.send_expect("killall -s INT testpmd", "#")
self.dut.send_expect("killall -s INT qemu-system-x86_64", "#")
- command_line_client = "./%s/app/testpmd -n %d -c %s --socket-mem " + \
- " %s --legacy-mem -w %s --file-prefix=vhost --vdev " + \
- "'net_vhost0,iface=vhost-net,queues=1,client=0' -- -i --nb-cores=2 --txd=1024 --rxd=1024"
- command_line_client = command_line_client % (self.target,
- self.dut.get_memory_channels(), self.core_mask_host,
- self.socket_mem, self.dut.ports_info[self.dut_ports[0]]['pci'])
+ 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'])
+ if self.check_2M_env:
+ eal_param += " --single-file-segments"
+ command_line_client = "./%s/app/testpmd " % self.target + eal_param + ' -- -i --nb-cores=2 --txd=1024 --rxd=1024'
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)
@@ -142,13 +141,10 @@ class TestPVPMultiPathVirtioPerformance(TestCase):
"""
start testpmd on virtio
"""
- command_line_user = "./%s/app/testpmd -n %d -c %s " + \
- " --socket-mem %s --legacy-mem --no-pci --file-prefix=virtio " + \
- "--vdev=net_virtio_user0,mac=00:01:02:03:04:05,path=./vhost-net,%s " + \
- "-- -i %s --rss-ip --nb-cores=1 --txd=1024 --rxd=1024"
- command_line_user = command_line_user % (self.target,
- self.dut.get_memory_channels(), self.core_mask_user,
- self.socket_mem, args["version"], args["path"])
+ 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"]])
+ if self.check_2M_env:
+ eal_param += " --single-file-segments"
+ command_line_user = "./%s/app/testpmd " % self.target + eal_param + " -- -i %s --rss-ip --nb-cores=1 --txd=1024 --rxd=1024" % args["path"]
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)
@@ -172,7 +168,7 @@ class TestPVPMultiPathVirtioPerformance(TestCase):
performance for Vhost PVP virtio 1.1 Mergeable Path.
"""
virtio_pmd_arg = {"version": "packed_vq=1,in_order=0,mrg_rxbuf=1",
- "path": "--tx-offloads=0x0 --enable-hw-vlan-strip"}
+ "path": "--tx-offloads=0x0 --enable-hw-vlan-strip"}
self.start_vhost_testpmd()
self.start_virtio_testpmd(virtio_pmd_arg)
self.send_and_verify("virtio_1.1_mergeable on")
@@ -184,7 +180,7 @@ class TestPVPMultiPathVirtioPerformance(TestCase):
performance for Vhost PVP virtio1.1 Normal Path.
"""
virtio_pmd_arg = {"version": "packed_vq=1,in_order=0,mrg_rxbuf=0",
- "path": "--tx-offloads=0x0 --enable-hw-vlan-strip"}
+ "path": "--tx-offloads=0x0 --enable-hw-vlan-strip"}
self.start_vhost_testpmd()
self.start_virtio_testpmd(virtio_pmd_arg)
self.send_and_verify("virtio_1.1_normal")
@@ -196,7 +192,7 @@ class TestPVPMultiPathVirtioPerformance(TestCase):
performance for Vhost PVP virtio 1.1 inorder Mergeable Path.
"""
virtio_pmd_arg = {"version": "packed_vq=1,in_order=1,mrg_rxbuf=1",
- "path": "--tx-offloads=0x0 --enable-hw-vlan-strip"}
+ "path": "--tx-offloads=0x0 --enable-hw-vlan-strip"}
self.start_vhost_testpmd()
self.start_virtio_testpmd(virtio_pmd_arg)
self.send_and_verify("virtio_1.1_inorder_mergeable on")
@@ -208,7 +204,7 @@ class TestPVPMultiPathVirtioPerformance(TestCase):
performance for Vhost PVP virtio1.1 inorder Normal Path.
"""
virtio_pmd_arg = {"version": "packed_vq=1,in_order=1,mrg_rxbuf=0",
- "path": "--tx-offloads=0x0 --enable-hw-vlan-strip"}
+ "path": "--tx-offloads=0x0 --enable-hw-vlan-strip"}
self.start_vhost_testpmd()
self.start_virtio_testpmd(virtio_pmd_arg)
self.send_and_verify("virtio_1.1_inorder_normal")
@@ -220,7 +216,7 @@ class TestPVPMultiPathVirtioPerformance(TestCase):
performance for Vhost PVP In_order mergeable Path.
"""
virtio_pmd_arg = {"version": "packed_vq=0,in_order=1,mrg_rxbuf=1",
- "path": "--tx-offloads=0x0 --enable-hw-vlan-strip"}
+ "path": "--tx-offloads=0x0 --enable-hw-vlan-strip"}
self.start_vhost_testpmd()
self.start_virtio_testpmd(virtio_pmd_arg)
self.send_and_verify("inoder mergeable on")
@@ -232,7 +228,7 @@ class TestPVPMultiPathVirtioPerformance(TestCase):
performance for Vhost PVP In_order no_mergeable Path.
"""
virtio_pmd_arg = {"version": "packed_vq=0,in_order=1,mrg_rxbuf=0",
- "path": "--tx-offloads=0x0 --enable-hw-vlan-strip"}
+ "path": "--tx-offloads=0x0 --enable-hw-vlan-strip"}
self.start_vhost_testpmd()
self.start_virtio_testpmd(virtio_pmd_arg)
self.send_and_verify("inoder mergeable off")
@@ -244,7 +240,7 @@ class TestPVPMultiPathVirtioPerformance(TestCase):
performance for Vhost PVP Mergeable Path.
"""
virtio_pmd_arg = {"version": "packed_vq=0,in_order=0,mrg_rxbuf=1",
- "path": "--tx-offloads=0x0 --enable-hw-vlan-strip"}
+ "path": "--tx-offloads=0x0 --enable-hw-vlan-strip"}
self.start_vhost_testpmd()
self.start_virtio_testpmd(virtio_pmd_arg)
self.send_and_verify("virito mergeable")
@@ -256,7 +252,7 @@ class TestPVPMultiPathVirtioPerformance(TestCase):
performance for Vhost PVP Normal Path.
"""
virtio_pmd_arg = {"version": "packed_vq=0,in_order=0,mrg_rxbuf=0",
- "path": "--tx-offloads=0x0 --enable-hw-vlan-strip"}
+ "path": "--tx-offloads=0x0 --enable-hw-vlan-strip"}
self.start_vhost_testpmd()
self.start_virtio_testpmd(virtio_pmd_arg)
self.send_and_verify("virito normal")
@@ -268,7 +264,7 @@ class TestPVPMultiPathVirtioPerformance(TestCase):
performance for Vhost PVP Vector Path
"""
virtio_pmd_arg = {"version": "packed_vq=0,in_order=0,mrg_rxbuf=0",
- "path": "--tx-offloads=0x0"}
+ "path": "--tx-offloads=0x0"}
self.start_vhost_testpmd()
self.start_virtio_testpmd(virtio_pmd_arg)
self.send_and_verify("virtio vector rx")
--
1.8.3.1
^ permalink raw reply [flat|nested] 12+ messages in thread
* [dts] [PATCH V1 09/11]tests/TestSuite_pvp_share_lib: optimize testpmd eal parameters
2020-02-17 12:05 [dts] [PATCH V1 01/11]tests/TestSuite_dpdk_gro_lib: optimize testpmd eal parameters Xiao Qimai
` (6 preceding siblings ...)
2020-02-17 12:05 ` [dts] [PATCH V1 08/11]tests/TestSuite_pvp_multi_paths_virtio_single_core_performance: " Xiao Qimai
@ 2020-02-17 12:05 ` Xiao Qimai
2020-02-17 12:05 ` [dts] [PATCH V1 10/11]tests/TestSuite_pvp_vhost_user_built_in_net_driver: " Xiao Qimai
` (2 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: Xiao Qimai @ 2020-02-17 12:05 UTC (permalink / raw)
To: dts; +Cc: Xiao Qimai
Signed-off-by: Xiao Qimai <qimaix.xiao@intel.com>
---
tests/TestSuite_pvp_share_lib.py | 35 +++++++++++++++++++----------------
1 file changed, 19 insertions(+), 16 deletions(-)
diff --git a/tests/TestSuite_pvp_share_lib.py b/tests/TestSuite_pvp_share_lib.py
index 8a6cbf2..3930693 100644
--- a/tests/TestSuite_pvp_share_lib.py
+++ b/tests/TestSuite_pvp_share_lib.py
@@ -58,8 +58,6 @@ class TestPVPShareLib(TestCase):
self.core_list_virtio_user = self.core_list[0:2]
self.core_list_vhost_user = self.core_list[2:4]
- self.core_mask_virtio_user = utils.create_mask(self.core_list_virtio_user)
- self.core_mask_vhost_user = utils.create_mask(self.core_list_vhost_user)
self.mem_channels = self.dut.get_memory_channels()
self.dst_mac = self.dut.get_mac_address(self.dut_ports[0])
self.prepare_share_lib_env()
@@ -129,17 +127,22 @@ class TestPVPShareLib(TestCase):
results_row.append(Pct)
self.result_table_add(results_row)
+ @property
+ def check_2M_env(self):
+ out = self.dut.send_expect("cat /proc/meminfo |grep Hugepagesize|awk '{print($2)}'", "# ")
+ return True if out == '2048' else False
+
def start_testpmd_as_vhost(self, driver):
"""
start testpmd on vhost
"""
- command_line_client = "%s/app/testpmd -c %s -n %d " + \
- "--socket-mem 2048,2048 --legacy-mem " + \
- "-d librte_pmd_vhost.so -d librte_pmd_%s.so " + \
- "-d librte_mempool_ring.so --file-prefix=vhost " + \
- "--vdev 'net_vhost0,iface=vhost-net,queues=1' -- -i"
- command_line_client = command_line_client % (self.target,
- self.core_mask_vhost_user, self.mem_channels, driver)
+ eal_param = self.dut.create_eal_parameters(socket=self.ports_socket, cores=self.core_list_vhost_user, prefix='vhost',
+ vdevs=['net_vhost0,iface=vhost-net,queues=1'])
+ if self.check_2M_env:
+ eal_param += " --single-file-segments"
+ eal_param += " -d librte_pmd_vhost.so -d librte_pmd_%s.so -d librte_mempool_ring.so --file-prefix=vhost" % driver
+ command_line_client = "./%s/app/testpmd " % self.target + eal_param + ' -- -i'
+
self.vhost_user.send_expect(command_line_client, "testpmd> ", 120)
self.vhost_user.send_expect("set fwd mac", "testpmd> ", 120)
self.vhost_user.send_expect("start", "testpmd> ", 120)
@@ -148,13 +151,13 @@ class TestPVPShareLib(TestCase):
"""
start testpmd on virtio
"""
- command_line_user = "./%s/app/testpmd -n %d -c %s " + \
- "--no-pci --socket-mem 2048,2048 --legacy-mem " + \
- "--file-prefix=virtio-user " + \
- "-d librte_pmd_virtio.so -d librte_mempool_ring.so " + \
- "--vdev=net_virtio_user0,mac=00:01:02:03:04:05,path=./vhost-net -- -i"
- command_line_user = command_line_user % (self.target,
- self.mem_channels, self.core_mask_virtio_user)
+ eal_param = self.dut.create_eal_parameters(socket=self.ports_socket, cores=self.core_list_virtio_user, prefix='virtio-user',
+ no_pci=True, vdevs=[
+ 'net_virtio_user0,mac=00:01:02:03:04:05,path=./vhost-net'])
+ if self.check_2M_env:
+ eal_param += " --single-file-segments"
+ eal_param += " -d librte_pmd_virtio.so -d librte_mempool_ring.so"
+ command_line_user = "./%s/app/testpmd " % self.target + eal_param + " -- -i"
self.virtio_user.send_expect(command_line_user, "testpmd> ", 120)
self.virtio_user.send_expect("start", "testpmd> ", 120)
--
1.8.3.1
^ permalink raw reply [flat|nested] 12+ messages in thread
* [dts] [PATCH V1 10/11]tests/TestSuite_pvp_vhost_user_built_in_net_driver: optimize testpmd eal parameters
2020-02-17 12:05 [dts] [PATCH V1 01/11]tests/TestSuite_dpdk_gro_lib: optimize testpmd eal parameters Xiao Qimai
` (7 preceding siblings ...)
2020-02-17 12:05 ` [dts] [PATCH V1 09/11]tests/TestSuite_pvp_share_lib: " Xiao Qimai
@ 2020-02-17 12:05 ` Xiao Qimai
2020-02-17 12:05 ` [dts] [PATCH V1 11/11]tests/TestSuite_pvp_virtio_user_multi_queues: " Xiao Qimai
2020-02-18 5:12 ` [dts] [PATCH V1 01/11]tests/TestSuite_dpdk_gro_lib: " Tu, Lijuan
10 siblings, 0 replies; 12+ messages in thread
From: Xiao Qimai @ 2020-02-17 12:05 UTC (permalink / raw)
To: dts; +Cc: Xiao Qimai
Signed-off-by: Xiao Qimai <qimaix.xiao@intel.com>
---
...TestSuite_pvp_vhost_user_built_in_net_driver.py | 31 +++++++++++-----------
1 file changed, 15 insertions(+), 16 deletions(-)
diff --git a/tests/TestSuite_pvp_vhost_user_built_in_net_driver.py b/tests/TestSuite_pvp_vhost_user_built_in_net_driver.py
index 1c13665..9c642a3 100644
--- a/tests/TestSuite_pvp_vhost_user_built_in_net_driver.py
+++ b/tests/TestSuite_pvp_vhost_user_built_in_net_driver.py
@@ -61,8 +61,6 @@ class TestPVPVhostUserBuiltInNetDriver(TestCase):
self.core_list_virtio_user = self.core_list[0:2]
self.core_list_vhost_user = self.core_list[2:4]
- self.core_mask_virtio_user = utils.create_mask(self.core_list_virtio_user)
- self.core_mask_vhost_user = utils.create_mask(self.core_list_vhost_user)
self.mem_channels = self.dut.get_memory_channels()
self.headers_size = HEADER_SIZE['eth'] + HEADER_SIZE['ip']
self.prepare_vhost_switch()
@@ -163,18 +161,20 @@ class TestPVPVhostUserBuiltInNetDriver(TestCase):
results_row.append(throughput)
self.result_table_add(results_row)
+ @property
+ def check_2M_env(self):
+ out = self.dut.send_expect("cat /proc/meminfo |grep Hugepagesize|awk '{print($2)}'", "# ")
+ return True if out == '2048' else False
+
def launch_vhost_switch(self):
"""
start vhost-switch on vhost
"""
self.dut.send_expect("rm -rf ./vhost.out", "#")
- command_line_client = "./examples/vhost/build/app/vhost-switch " + \
- "-c %s -n %d --socket-mem %s -- " + \
- "-p 0x1 --mergeable 0 --vm2vm 1 " + \
- "--builtin-net-driver --socket-file ./vhost-net" + \
- "> ./vhost.out &"
- command_line_client = command_line_client % (self.core_mask_vhost_user,
- self.mem_channels, self.mem_size)
+ eal_param = self.dut.create_eal_parameters(socket=self.ports_socket, cores=self.core_list_vhost_user, prefix='vhost')
+ if self.check_2M_env:
+ eal_param += " --single-file-segments"
+ command_line_client = "./examples/vhost/build/app/vhost-switch " + eal_param + ' -- -p 0x1 --mergeable 0 --vm2vm 1 --builtin-net-driver --socket-file ./vhost-net> ./vhost.out &'
self.vhost_switch.send_expect(command_line_client, "# ", 120)
time.sleep(15)
try:
@@ -195,13 +195,12 @@ class TestPVPVhostUserBuiltInNetDriver(TestCase):
"""
start testpmd on virtio
"""
- command_line_user = "./%s/app/testpmd -n %d -c %s " + \
- "--no-pci --socket-mem %s --file-prefix=virtio-user " + \
- "--vdev=net_virtio_user0,mac=%s,path=./vhost-net,queues=1 " + \
- "-- -i --rxq=1 --txq=1"
- command_line_user = command_line_user % (self.target,
- self.mem_channels, self.core_mask_virtio_user,
- self.mem_size, self.virtio_mac)
+ eal_param = self.dut.create_eal_parameters(socket=self.ports_socket, cores=self.core_list_virtio_user, prefix='virtio',
+ no_pci=True, vdevs=[
+ 'net_virtio_user0,mac=%s,path=./vhost-net,queues=1' % self.virtio_mac])
+ if self.check_2M_env:
+ eal_param += " --single-file-segments"
+ command_line_user = "./%s/app/testpmd " % self.target + eal_param + " -- -i --rxq=1 --txq=1"
self.virtio_user.send_expect(command_line_user, "testpmd> ", 120)
self.virtio_user.send_expect("set fwd mac", "testpmd> ", 120)
self.virtio_user.send_expect("start tx_first", "testpmd> ", 120)
--
1.8.3.1
^ permalink raw reply [flat|nested] 12+ messages in thread
* [dts] [PATCH V1 11/11]tests/TestSuite_pvp_virtio_user_multi_queues: optimize testpmd eal parameters
2020-02-17 12:05 [dts] [PATCH V1 01/11]tests/TestSuite_dpdk_gro_lib: optimize testpmd eal parameters Xiao Qimai
` (8 preceding siblings ...)
2020-02-17 12:05 ` [dts] [PATCH V1 10/11]tests/TestSuite_pvp_vhost_user_built_in_net_driver: " Xiao Qimai
@ 2020-02-17 12:05 ` Xiao Qimai
2020-02-18 5:12 ` [dts] [PATCH V1 01/11]tests/TestSuite_dpdk_gro_lib: " Tu, Lijuan
10 siblings, 0 replies; 12+ messages in thread
From: Xiao Qimai @ 2020-02-17 12:05 UTC (permalink / raw)
To: dts; +Cc: Xiao Qimai
Signed-off-by: Xiao Qimai <qimaix.xiao@intel.com>
---
tests/TestSuite_pvp_virtio_user_multi_queues.py | 32 +++++++++++++------------
1 file changed, 17 insertions(+), 15 deletions(-)
diff --git a/tests/TestSuite_pvp_virtio_user_multi_queues.py b/tests/TestSuite_pvp_virtio_user_multi_queues.py
index ff8a0c4..790ee81 100644
--- a/tests/TestSuite_pvp_virtio_user_multi_queues.py
+++ b/tests/TestSuite_pvp_virtio_user_multi_queues.py
@@ -69,8 +69,6 @@ class TestPVPVirtioMultiQueues(TestCase):
self.core_config, socket=self.ports_socket)
self.core_list_user = self.core_list[0:3]
self.core_list_host = self.core_list[3:6]
- self.core_mask_user = utils.create_mask(self.core_list_user)
- self.core_mask_host = utils.create_mask(self.core_list_host)
self.dst_mac = self.dut.get_mac_address(self.dut_ports[0])
self.logger.info("you can config packet_size in file %s.cfg," % self.suite_name + \
@@ -99,16 +97,20 @@ class TestPVPVirtioMultiQueues(TestCase):
self.vhost_user = self.dut.new_session(suite="vhost-user")
self.virtio_user = self.dut.new_session(suite="virtio-user")
+ @property
+ def check_2M_env(self):
+ out = self.dut.send_expect("cat /proc/meminfo |grep Hugepagesize|awk '{print($2)}'", "# ")
+ return True if out == '2048' else False
+
def start_vhost_testpmd(self):
"""
start testpmd on vhost
"""
- command_line_client = self.dut.target + "/app/testpmd -n %d -c %s --socket-mem 1024,1024" + \
- " --legacy-mem --file-prefix=vhost --vdev " + \
- "'net_vhost0,iface=vhost-net,queues=2,client=0' -- -i --nb-cores=2 " + \
- "--rxq=2 --txq=2 --rss-ip"
- command_line_client = command_line_client % (
- self.dut.get_memory_channels(), self.core_mask_host)
+ eal_param = self.dut.create_eal_parameters(socket=self.ports_socket, cores=self.core_list_host, prefix='vhost',
+ vdevs=['net_vhost0,iface=vhost-net,queues=2,client=0'])
+ if self.check_2M_env:
+ eal_param += " --single-file-segments"
+ command_line_client = "./%s/app/testpmd " % self.target + eal_param + ' -- -i --nb-cores=2 --rxq=2 --txq=2 --rss-ip'
self.vhost_user.send_expect(command_line_client, "testpmd> ", 120)
self.vhost_user.send_expect("set fwd mac", "testpmd> ", 120)
self.vhost_user.send_expect("start", "testpmd> ", 120)
@@ -117,13 +119,13 @@ class TestPVPVirtioMultiQueues(TestCase):
"""
start testpmd on virtio
"""
- command_line_user = self.dut.target + "/app/testpmd -n %d -c %s " + \
- " --socket-mem 1024,1024 --legacy-mem --no-pci --file-prefix=virtio " + \
- "--vdev=net_virtio_user0,mac=00:01:02:03:04:05,path=./vhost-net,queues=2,%s " + \
- "-- -i %s --rss-ip --nb-cores=2 --rxq=2 --txq=2"
- command_line_user = command_line_user % (
- self.dut.get_memory_channels(), self.core_mask_user,
- args["version"], args["path"])
+ 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,queues=2,%s' % args["version"]])
+ if self.check_2M_env:
+ eal_param += " --single-file-segments"
+ command_line_user = "./%s/app/testpmd " % self.target + eal_param + " -- -i %s --rss-ip --nb-cores=2 --rxq=2 --txq=2" % \
+ args["path"]
self.virtio_user.send_expect(command_line_user, "testpmd> ", 120)
self.virtio_user.send_expect("set fwd mac", "testpmd> ", 120)
self.virtio_user.send_expect("start", "testpmd> ", 120)
--
1.8.3.1
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [dts] [PATCH V1 01/11]tests/TestSuite_dpdk_gro_lib: optimize testpmd eal parameters
2020-02-17 12:05 [dts] [PATCH V1 01/11]tests/TestSuite_dpdk_gro_lib: optimize testpmd eal parameters Xiao Qimai
` (9 preceding siblings ...)
2020-02-17 12:05 ` [dts] [PATCH V1 11/11]tests/TestSuite_pvp_virtio_user_multi_queues: " Xiao Qimai
@ 2020-02-18 5:12 ` Tu, Lijuan
10 siblings, 0 replies; 12+ messages in thread
From: Tu, Lijuan @ 2020-02-18 5:12 UTC (permalink / raw)
To: Xiao, QimaiX, dts; +Cc: Xiao, QimaiX
Applied the series, thanks
> -----Original Message-----
> From: dts [mailto:dts-bounces@dpdk.org] On Behalf Of Xiao Qimai
> Sent: Monday, February 17, 2020 8:06 PM
> To: dts@dpdk.org
> Cc: Xiao, QimaiX <qimaix.xiao@intel.com>
> Subject: [dts] [PATCH V1 01/11]tests/TestSuite_dpdk_gro_lib: optimize
> testpmd eal parameters
>
> Signed-off-by: Xiao Qimai <qimaix.xiao@intel.com>
> ---
> tests/TestSuite_dpdk_gro_lib.py | 10 +++-------
> 1 file changed, 3 insertions(+), 7 deletions(-)
>
> diff --git a/tests/TestSuite_dpdk_gro_lib.py
> b/tests/TestSuite_dpdk_gro_lib.py index f9b7d76..2f89207 100644
> --- a/tests/TestSuite_dpdk_gro_lib.py
> +++ b/tests/TestSuite_dpdk_gro_lib.py
> @@ -81,9 +81,8 @@ class TestDPDKGROLib(TestCase):
> self.verify(self.dut.number_of_cores >= 3,
> "There has not enought cores to test this case %s" %
> self.suite_name)
> cores_list = self.dut.get_core_list("1S/3C/1T", socket=self.socket)
> - vhost_list = cores_list[0:2]
> + self.vhost_list = cores_list[0:2]
> self.qemu_cpupin = cores_list[2:3][0]
> - self.core_mask_vhost = utils.create_mask(vhost_list)
>
> # Set the params for VM
> self.virtio_ip1 = "1.1.1.2"
> @@ -112,11 +111,8 @@ class TestDPDKGROLib(TestCase):
> # mode 2 : tcp traffic heavy mode
> # mode 3 : vxlan traffic light mode
> # mode 4 : tcp traffic flush 4
> - self.testcmd = self.target + "/app/testpmd -c %s -n %d --socket-mem %s
> --legacy-mem" \
> - + " --vdev 'net_vhost0,iface=%s/vhost-net,queues=1' -- -i --enable-
> hw-vlan-strip --tx-offloads=0x00" \
> - + " --txd=1024 --rxd=1024"
> - self.testcmd_start = self.testcmd % (
> - self.core_mask_vhost, self.memory_channel, self.socket_mem,
> self.base_dir)
> + eal_param = self.dut.create_eal_parameters(cores=self.vhost_list,
> vdevs=['net_vhost0,iface=%s/vhost-net,queues=1' % self.base_dir])
> + self.testcmd_start = self.target + "/app/testpmd " + eal_param + " -- -i -
> -enable-hw-vlan-strip --tx-offloads=0x00 --txd=1024 --rxd=1024"
> self.vhost_user = self.dut.new_session(suite="user")
> self.vhost_user.send_expect(self.testcmd_start, "testpmd> ", 120)
> self.vhost_user.send_expect("set fwd csum", "testpmd> ", 120)
> --
> 1.8.3.1
^ permalink raw reply [flat|nested] 12+ messages in thread
end of thread, other threads:[~2020-02-18 5:12 UTC | newest]
Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-02-17 12:05 [dts] [PATCH V1 01/11]tests/TestSuite_dpdk_gro_lib: optimize testpmd eal parameters Xiao Qimai
2020-02-17 12:05 ` [dts] [PATCH V1 02/11]tests/TestSuite_dpdk_gso_lib: " Xiao Qimai
2020-02-17 12:05 ` [dts] [PATCH V1 03/11]tests/TestSuite_loopback_multi_paths_port_restart: " Xiao Qimai
2020-02-17 12:05 ` [dts] [PATCH V1 04/11]tests/TestSuite_loopback_multi_queues: " Xiao Qimai
2020-02-17 12:05 ` [dts] [PATCH V1 05/11]tests/TestSuite_loopback_virtio_user_server_mode: " Xiao Qimai
2020-02-17 12:05 ` [dts] [PATCH V1 06/11]tests/TestSuite_pvp_multi_paths_performance: " Xiao Qimai
2020-02-17 12:05 ` [dts] [PATCH V1 07/11]tests/TestSuite_pvp_multi_paths_vhost_single_core_performance: " Xiao Qimai
2020-02-17 12:05 ` [dts] [PATCH V1 08/11]tests/TestSuite_pvp_multi_paths_virtio_single_core_performance: " Xiao Qimai
2020-02-17 12:05 ` [dts] [PATCH V1 09/11]tests/TestSuite_pvp_share_lib: " Xiao Qimai
2020-02-17 12:05 ` [dts] [PATCH V1 10/11]tests/TestSuite_pvp_vhost_user_built_in_net_driver: " Xiao Qimai
2020-02-17 12:05 ` [dts] [PATCH V1 11/11]tests/TestSuite_pvp_virtio_user_multi_queues: " Xiao Qimai
2020-02-18 5:12 ` [dts] [PATCH V1 01/11]tests/TestSuite_dpdk_gro_lib: " Tu, Lijuan
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).