test suite reviews and discussions
 help / color / mirror / Atom feed
From: "zhu,shuai" <shuaix.zhu@intel.com>
To: dts@dpdk.org
Cc: yinan.wang@intel.com, "zhu,shuai" <shuaix.zhu@intel.com>
Subject: [dts] [PATCH V1 8/9] tests/vhost_user_live_migration:add create_eal_parameters function.
Date: Sat, 18 Jan 2020 16:38:11 +0800	[thread overview]
Message-ID: <1579336692-98775-8-git-send-email-shuaix.zhu@intel.com> (raw)
In-Reply-To: <1579336692-98775-1-git-send-email-shuaix.zhu@intel.com>

add create_eal_parameters function.

Signed-off-by: zhu,shuai <shuaix.zhu@intel.com>
---
 tests/TestSuite_vhost_user_live_migration.py | 33 ++++++--------------
 1 file changed, 10 insertions(+), 23 deletions(-)

diff --git a/tests/TestSuite_vhost_user_live_migration.py b/tests/TestSuite_vhost_user_live_migration.py
index 414f00e..dc8bb24 100644
--- a/tests/TestSuite_vhost_user_live_migration.py
+++ b/tests/TestSuite_vhost_user_live_migration.py
@@ -71,8 +71,6 @@ class TestVhostUserLiveMigration(TestCase):
         self.host_tintf = self.tester.get_interface(host_tport)
         self.backup_tintf = self.tester.get_interface(backup_tport)
 
-        self.host_mem_channels = self.host_dut.get_memory_channels()
-        self.backup_mem_channels = self.backup_dut.get_memory_channels()
         self.host_pci_info = self.host_dut.ports_info[0]['pci']
         self.backup_pci_info = self.backup_dut.ports_info[0]['pci']
 
@@ -139,12 +137,10 @@ class TestVhostUserLiveMigration(TestCase):
     def get_core_list(self):
         core_number = self.queue_number + 1
         core_config = '1S/%dC/1T' % core_number
-        core_list0 = self.duts[0].get_core_list(core_config)
-        core_list1 = self.duts[1].get_core_list(core_config)
-        self.verify(len(core_list0) >= core_number and len(core_list1) >= core_number,
+        self.core_list0 = self.duts[0].get_core_list(core_config)
+        self.core_list1 = self.duts[1].get_core_list(core_config)
+        self.verify(len(self.core_list0) >= core_number and len(core_list1) >= core_number,
                     'There have not enough cores to start testpmd on duts')
-        self.host_core_mask_user = utils.create_mask(core_list0)
-        self.backup_core_mask_user = utils.create_mask(core_list1)
 
     def launch_testpmd_as_vhost_on_both_dut(self, zero_copy=False):
         """
@@ -154,22 +150,13 @@ class TestVhostUserLiveMigration(TestCase):
         zero_copy_str = ''
         if zero_copy is True:
             zero_copy_str = ',dequeue-zero-copy=1'
-        vdev_info = 'eth_vhost0,iface=%s/vhost-net,queues=%d%s' % (
-                self.base_dir, self.queue_number, zero_copy_str)
-
-        params_info = '--nb-cores=%d --rxq=%d --txq=%d' % (
-                self.queue_number, self.queue_number, self.queue_number)
-
-        cmd_line = self.dut.target + '/app/testpmd -c %s -n %d -w %s ' + \
-                "--socket-mem %s --legacy-mem --file-prefix=vhost --vdev '%s' " + \
-                "-- -i %s"
-        host_cmd_line = cmd_line % (self.host_core_mask_user, self.host_mem_channels,
-                    self.host_pci_info, self.host_socket_mem,
-                    vdev_info, params_info)
-        backup_cmd_line = cmd_line % (self.backup_core_mask_user, self.backup_mem_channels,
-                    self.backup_pci_info, self.backup_socket_mem,
-                    vdev_info, params_info)
-
+        testcmd = self.dut.target + "/app/testpmd "
+        vdev = [r"'eth_vhost0,iface=%s/vhost-net,queues=%d%s'" % (self.base_dir, self.queue_number, zero_copy_str)]
+        para = " -- -i --nb-cores=%d --rxq=%d --txq=%d" % (self.queue_number, self.queue_number, self.queue_number)
+        eal_params_first = self.dut.create_eal_parameters(cores=self.core_list0, prefix='vhost', ports=[self.host_pci_info], vdevs=vdev)
+        eal_params_secondary = self.dut.create_eal_parameters(cores=self.core_list1, prefix='vhost', ports=[self.backup_pci_info], vdevs=vdev)
+        host_cmd_line = testcmd + eal_params_first + para
+        backup_cmd_line = testcmd + eal_params_secondary + para
         self.host_dut.send_expect(host_cmd_line, 'testpmd> ', 30)
         self.backup_dut.send_expect(backup_cmd_line, 'testpmd> ', 30)
 
-- 
2.17.2


  parent reply	other threads:[~2020-01-18  8:32 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-18  8:38 [dts] [PATCH V1 1/9] tests/vhost_1024_ethports:add " zhu,shuai
2020-01-18  8:38 ` [dts] [PATCH V1 2/9] tests/vhost_enqueue_interrupt:add " zhu,shuai
2020-01-18  8:38 ` [dts] [PATCH V1 3/9] tests/vhost_event_idx_interrupt:add " zhu,shuai
2020-01-18  8:38 ` [dts] [PATCH V1 4/9] tests/vhost_multi_queue_qemu:add " zhu,shuai
2020-01-18  8:38 ` [dts] [PATCH V1 5/9] tests/vhost_pmd_xstats:add " zhu,shuai
2020-01-18  8:38 ` [dts] [PATCH V1 6/9] tests/vhost_virtio_user_interrupt:add " zhu,shuai
2020-01-18  8:38 ` [dts] [PATCH V1 7/9] tests/vhost_virtio_pmd_interrupt:add " zhu,shuai
2020-01-18  8:38 ` zhu,shuai [this message]
2020-01-18  8:38 ` [dts] [PATCH V1 9/9] tests/vhost_dequeue_zero_copy:add " zhu,shuai
2020-01-19  8:35 ` [dts] [PATCH V1 1/9] tests/vhost_1024_ethports:add " 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=1579336692-98775-8-git-send-email-shuaix.zhu@intel.com \
    --to=shuaix.zhu@intel.com \
    --cc=dts@dpdk.org \
    --cc=yinan.wang@intel.com \
    /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).