test suite reviews and discussions
 help / color / mirror / Atom feed
From: Xiao Qimai <qimaix.xiao@intel.com>
To: dts@dpdk.org
Cc: Xiao Qimai <qimaix.xiao@intel.com>
Subject: [dts] [PATCH V1 05/11]tests/TestSuite_loopback_virtio_user_server_mode: optimize testpmd eal parameters
Date: Mon, 17 Feb 2020 20:05:41 +0800	[thread overview]
Message-ID: <1581941147-230859-5-git-send-email-qimaix.xiao@intel.com> (raw)
In-Reply-To: <1581941147-230859-1-git-send-email-qimaix.xiao@intel.com>

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


  parent reply	other threads:[~2020-02-17 12:11 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-17 12:05 [dts] [PATCH V1 01/11]tests/TestSuite_dpdk_gro_lib: " 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 ` Xiao Qimai [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1581941147-230859-5-git-send-email-qimaix.xiao@intel.com \
    --to=qimaix.xiao@intel.com \
    --cc=dts@dpdk.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).