test suite reviews and discussions
 help / color / mirror / Atom feed
* [dts] [PATCH V1 1/9] tests/vhost_1024_ethports:add create_eal_parameters function.
@ 2020-01-18  8:38 zhu,shuai
  2020-01-18  8:38 ` [dts] [PATCH V1 2/9] tests/vhost_enqueue_interrupt:add " zhu,shuai
                   ` (8 more replies)
  0 siblings, 9 replies; 10+ messages in thread
From: zhu,shuai @ 2020-01-18  8:38 UTC (permalink / raw)
  To: dts; +Cc: yinan.wang, zhu,shuai

add create_eal_parameters function.

Signed-off-by: zhu,shuai <shuaix.zhu@intel.com>
---
 tests/TestSuite_vhost_1024_ethports.py | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/tests/TestSuite_vhost_1024_ethports.py b/tests/TestSuite_vhost_1024_ethports.py
index 0c14e8d..2a0bce8 100644
--- a/tests/TestSuite_vhost_1024_ethports.py
+++ b/tests/TestSuite_vhost_1024_ethports.py
@@ -50,7 +50,7 @@ class TestVhost1024Ethports(TestCase):
         self.verify(len(self.dut_ports) >= 1, 'Insufficient ports for testing')
         self.mem_channels = self.dut.get_memory_channels()
         cores = self.dut.get_core_list("1S/2C/1T")
-        self.coremask = utils.create_mask(cores)
+        self.pci_info = self.dut.ports_info[0]['pci']
         self.build_user_dpdk()
 
     def set_up(self):
@@ -78,9 +78,8 @@ class TestVhost1024Ethports(TestCase):
         command_line_vdev = ''
         for ethport in range(self.max_ethport):
             command_line_vdev += '--vdev "eth_vhost%d,iface=vhost-net%d,queues=%d" ' %(ethport, ethport, self.queue)
-        command_line_argument = '/app/testpmd -c %s -n %d --socket-mem 10240,10240 '\
-                        '--file-prefix=vhost ' %(self.coremask, self.mem_channels)
-        command_line_client = self.dut.target + command_line_argument + command_line_vdev + '-- -i'
+        eal_params = self.dut.create_eal_parameters(cores="1S/2C/1T", prefix='vhost', ports=[self.pci_info])
+        cmd = self.dut.target + '/app/testpmd ' + eal_params + command_line_vdev + ' -- -i'
         try:
             out = self.vhost_user.send_expect(command_line_client, 'testpmd> ', 120)
         except Exception as e:
-- 
2.17.2


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [dts] [PATCH V1 2/9] tests/vhost_enqueue_interrupt:add create_eal_parameters function.
  2020-01-18  8:38 [dts] [PATCH V1 1/9] tests/vhost_1024_ethports:add create_eal_parameters function zhu,shuai
@ 2020-01-18  8:38 ` zhu,shuai
  2020-01-18  8:38 ` [dts] [PATCH V1 3/9] tests/vhost_event_idx_interrupt:add " zhu,shuai
                   ` (7 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: zhu,shuai @ 2020-01-18  8:38 UTC (permalink / raw)
  To: dts; +Cc: yinan.wang, zhu,shuai

add create_eal_parameters function.

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

diff --git a/tests/TestSuite_vhost_enqueue_interrupt.py b/tests/TestSuite_vhost_enqueue_interrupt.py
index 5c4c1df..da325d3 100644
--- a/tests/TestSuite_vhost_enqueue_interrupt.py
+++ b/tests/TestSuite_vhost_enqueue_interrupt.py
@@ -49,8 +49,7 @@ class TestVhostEnqueueInterrupt(TestCase):
         self.queues = 1
         self.cores_num = len([n for n in self.dut.cores if int(n['socket']) == 0])
         self.vmac = "00:11:22:33:44:10"
-        self.dut_ports = self.dut.get_ports()
-        self.mem_channels = self.dut.get_memory_channels()
+        self.pci_info = self.dut.ports_info[0]['pci']
         self.prepare_l3fwd_power()
 
     def set_up(self):
@@ -83,21 +82,15 @@ class TestVhostEnqueueInterrupt(TestCase):
         core_list = self.dut.get_core_list(self.core_config)
         self.core_list_virtio = core_list[0: self.queues+1]
         self.core_list_l3fwd = core_list[self.queues+1: need_num]
-        self.core_mask_virtio = utils.create_mask(self.core_list_virtio)
-        self.core_mask_l3fwd = utils.create_mask(self.core_list_l3fwd)
 
     def lanuch_virtio_user(self):
         """
         launch virtio-user with server mode
         """
-        command_client = self.dut.target + "/app/testpmd -c %s -n %d " + \
-                        "--socket-mem 1024,1024 --legacy-mem --no-pci " + \
-                        "--file-prefix=virtio " + \
-                        "--vdev=net_virtio_user0,mac=%s,path=./vhost-net,server=1,queues=%d " + \
-                        "-- -i --rxq=%d --txq=%d --rss-ip"
-        command_line_client = command_client % (
-                        self.core_mask_virtio, self.mem_channels,
-                        self.vmac, self.queues, self.queues, self.queues)
+        vdev = "--vdev=net_virtio_user0,mac=%s,path=./vhost-net,server=1,queues=%d" % (self.vmac, self.queues)
+        eal_params = self.dut.create_eal_parameters(cores=self.core_list_virtio, prefix='virtio', no_pci=True, ports=[self.pci_info])
+        para = " -- -i --rxq=%d --txq=%d --rss-ip" % (self.queues, self.queues)
+        command_line_client =  self.dut.target + "/app/testpmd " + eal_params + vdev + para
         self.virtio_user.send_expect(command_line_client, "testpmd> ", 120)
         self.virtio_user.send_expect("set fwd txonly", "testpmd> ", 20)
 
@@ -115,13 +108,11 @@ class TestVhostEnqueueInterrupt(TestCase):
             info = {'core': self.core_list_l3fwd[i], 'port': 0, 'queue': i}
             self.verify_info.append(info)
 
-        command_client = "./examples/l3fwd-power/build/app/l3fwd-power " + \
-                         "-c %s -n %d --socket-mem 1024,1024 --legacy-mem --no-pci " + \
-                         "--vdev 'net_vhost0,iface=vhost-net,queues=%d,client=1' " + \
-                         "-- -p 0x1 --parse-ptype 1 --config '%s' "
-        command_line_client = command_client % (
-                        self.core_mask_l3fwd, self.mem_channels,
-                        self.queues, config_info)
+        example_cmd = "./examples/l3fwd-power/build/app/l3fwd-power "
+        vdev = [r"'net_vhost0,iface=vhost-net,queues=%d,client=1'" % self.queues]
+        para = " -- -p 0x1 --parse-ptype 1 --config '%s' " % config_info
+        eal_params = self.dut.create_eal_parameters(cores=self.core_list_l3fwd, no_pci=True, ports=[self.pci_info], vdevs=vdev)
+        command_line_client = example_cmd + eal_params + para
         self.vhost.get_session_before(timeout=2)
         self.vhost.send_expect(command_line_client, "POWER", 40)
         time.sleep(10)
-- 
2.17.2


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [dts] [PATCH V1 3/9] tests/vhost_event_idx_interrupt:add create_eal_parameters function.
  2020-01-18  8:38 [dts] [PATCH V1 1/9] tests/vhost_1024_ethports:add create_eal_parameters function zhu,shuai
  2020-01-18  8:38 ` [dts] [PATCH V1 2/9] tests/vhost_enqueue_interrupt:add " zhu,shuai
@ 2020-01-18  8:38 ` zhu,shuai
  2020-01-18  8:38 ` [dts] [PATCH V1 4/9] tests/vhost_multi_queue_qemu:add " zhu,shuai
                   ` (6 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: zhu,shuai @ 2020-01-18  8:38 UTC (permalink / raw)
  To: dts; +Cc: yinan.wang, zhu,shuai

add create_eal_parameters function.

Signed-off-by: zhu,shuai <shuaix.zhu@intel.com>
---
 tests/TestSuite_vhost_event_idx_interrupt.py | 12 +++++-------
 1 file changed, 5 insertions(+), 7 deletions(-)

diff --git a/tests/TestSuite_vhost_event_idx_interrupt.py b/tests/TestSuite_vhost_event_idx_interrupt.py
index 9676ed7..abbdc42 100644
--- a/tests/TestSuite_vhost_event_idx_interrupt.py
+++ b/tests/TestSuite_vhost_event_idx_interrupt.py
@@ -52,6 +52,7 @@ class TestVhostEventIdxInterrupt(TestCase):
         self.queues = 1
         self.cores_num = len([n for n in self.dut.cores if int(n['socket']) == 0])
         self.prepare_l3fwd_power()
+        self.pci_info = self.dut.ports_info[0]['pci']
         self.base_dir = self.dut.base_dir.replace('~', '/root')
 
     def set_up(self):
@@ -73,7 +74,6 @@ class TestVhostEventIdxInterrupt(TestCase):
                     "There has not enought cores to test this case %s" %
                     self.running_case)
         self.core_list_l3fwd = self.dut.get_core_list(self.core_config)
-        self.core_mask_l3fwd = utils.create_mask(self.core_list_l3fwd)
 
     def prepare_l3fwd_power(self):
         self.dut.send_expect("cp ./examples/l3fwd-power/main.c .", "#")
@@ -106,12 +106,10 @@ class TestVhostEventIdxInterrupt(TestCase):
 
         port_info = "0x1" if self.vm_num == 1 else "0x3"
 
-        command_client = "./examples/l3fwd-power/build/app/l3fwd-power " + \
-                         "-c %s -n %d --socket-mem 1024,1024 --legacy-mem --no-pci " + \
-                         "--log-level=9 %s -- -p %s --parse-ptype 1 --config '%s' "
-        command_line_client = command_client % (
-                        self.core_mask_l3fwd, self.dut.get_memory_channels(),
-                        vdev_info, port_info, config_info)
+        example_para = "./examples/l3fwd-power/build/app/l3fwd-power "
+        para = " --log-level=9 %s -- -p %s --parse-ptype 1 --config '%s'" % (vdev_info, port_info, config_info)
+        eal_params = self.dut.create_eal_parameters(cores=self.core_list_l3fwd, no_pci=True, ports=[self.pci_info])
+        command_line_client = example_para + eal_params + para
         self.vhost.get_session_before(timeout=2)
         self.vhost.send_expect(command_line_client, "POWER", 40)
         time.sleep(10)
-- 
2.17.2


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [dts] [PATCH V1 4/9] tests/vhost_multi_queue_qemu:add create_eal_parameters function.
  2020-01-18  8:38 [dts] [PATCH V1 1/9] tests/vhost_1024_ethports:add create_eal_parameters function 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 ` zhu,shuai
  2020-01-18  8:38 ` [dts] [PATCH V1 5/9] tests/vhost_pmd_xstats:add " zhu,shuai
                   ` (5 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: zhu,shuai @ 2020-01-18  8:38 UTC (permalink / raw)
  To: dts; +Cc: yinan.wang, zhu,shuai

add create_eal_parameters function.

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

diff --git a/tests/TestSuite_vhost_multi_queue_qemu.py b/tests/TestSuite_vhost_multi_queue_qemu.py
index f31c132..a7efddf 100644
--- a/tests/TestSuite_vhost_multi_queue_qemu.py
+++ b/tests/TestSuite_vhost_multi_queue_qemu.py
@@ -59,6 +59,7 @@ class TestVhostMultiQueueQemu(TestCase):
         self.socket = netdev.get_nic_socket()
         self.cores = self.dut.get_core_list("1S/3C/1T", socket=self.socket)
         self.verify(len(self.cores) >= 3, "Insufficient cores for speed testing")
+        self.pci_info = self.dut.ports_info[0]['pci']
 
         self.queue_number = 2
         # Using file to save the vhost sample output since in jumboframe case,
@@ -98,11 +99,11 @@ class TestVhostMultiQueueQemu(TestCase):
         """
         Launch the vhost sample with different parameters
         """
-        testcmd = self.target + "/app/testpmd -c %s -n %d --socket-mem 1024,1024" + \
-                       " --vdev 'net_vhost0,iface=%s/vhost-net,queues=%d' -- -i --rxq=%d --txq=%d --nb-cores=2"
-        self.coremask = utils.create_mask(self.cores)
-        testcmd_start = testcmd % (self.coremask, self.memory_channel, self.base_dir, self.queue_number, self.queue_number, self.queue_number)
-
+        testcmd = self.target + "/app/testpmd "
+        vdev = [r"'net_vhost0,iface=%s/vhost-net,queues=%d'" % (self.base_dir, self.queue_number)]
+        eal_params = self.dut.create_eal_parameters(cores=self.cores, ports=[self.pci_info], vdevs=vdev)
+        para = " -- -i --rxq=%d --txq=%d --nb-cores=2" % (self.queue_number, self.queue_number)
+        testcmd_start = testcmd + eal_params + para
         self.dut.send_expect(testcmd_start, "testpmd> ", 120)
         self.dut.send_expect("set fwd mac", "testpmd> ", 120)
         self.dut.send_expect("start", "testpmd> ", 120)
@@ -284,11 +285,11 @@ class TestVhostMultiQueueQemu(TestCase):
         Test the performance for change vhost queue size
         """
         self.queue_number = 2
-        testcmd = self.target + "/app/testpmd -c %s -n %d --socket-mem 1024,1024" + \
-                       " --vdev 'net_vhost0,iface=%s/vhost-net,queues=2' -- -i --rxq=1 --txq=1 --nb-cores=1"
-        self.coremask = utils.create_mask(self.cores)
-        testcmd_start = testcmd % (self.coremask, self.memory_channel, self.base_dir)
-
+        testcmd = self.target + "/app/testpmd "
+        vdev = [r"'net_vhost0,iface=%s/vhost-net,queues=2'" % self.base_dir]
+        eal_params = self.dut.create_eal_parameters(cores=self.cores, ports=[self.pci_info], vdevs=vdev)
+        para = " -- -i --rxq=1 --txq=1 --nb-cores=1"
+        testcmd_start = testcmd + eal_params + para
         self.dut.send_expect(testcmd_start, "testpmd> ", 120)
         self.dut.send_expect("set fwd mac", "testpmd> ", 120)
         self.dut.send_expect("start", "testpmd> ", 120)
-- 
2.17.2


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [dts] [PATCH V1 5/9] tests/vhost_pmd_xstats:add create_eal_parameters function.
  2020-01-18  8:38 [dts] [PATCH V1 1/9] tests/vhost_1024_ethports:add create_eal_parameters function zhu,shuai
                   ` (2 preceding siblings ...)
  2020-01-18  8:38 ` [dts] [PATCH V1 4/9] tests/vhost_multi_queue_qemu:add " zhu,shuai
@ 2020-01-18  8:38 ` zhu,shuai
  2020-01-18  8:38 ` [dts] [PATCH V1 6/9] tests/vhost_virtio_user_interrupt:add " zhu,shuai
                   ` (4 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: zhu,shuai @ 2020-01-18  8:38 UTC (permalink / raw)
  To: dts; +Cc: yinan.wang, zhu,shuai

add create_eal_parameters function.

Signed-off-by: zhu,shuai <shuaix.zhu@intel.com>
---
 tests/TestSuite_vhost_pmd_xstats.py | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/tests/TestSuite_vhost_pmd_xstats.py b/tests/TestSuite_vhost_pmd_xstats.py
index 1e1a323..0ebbe1c 100755
--- a/tests/TestSuite_vhost_pmd_xstats.py
+++ b/tests/TestSuite_vhost_pmd_xstats.py
@@ -64,6 +64,7 @@ class TestVhostPmdXstats(TestCase):
         self.scapy_num = 0
         self.dmac = self.dut.get_mac_address(self.dut_ports[0])
         self.virtio1_mac = "52:54:00:00:00:01"
+        self.pci_info = self.dut.ports_info[0]['pci']
 
         # build sample app
         out = self.dut.build_dpdk_apps("./examples/vhost")
@@ -143,8 +144,12 @@ class TestVhostPmdXstats(TestCase):
         """
         prepare all of the conditions for start
         """
-        self.dut.send_expect("./%s/app/testpmd -c %s -n %s --vdev 'net_vhost0,iface=%s/vhost-net,queues=1' -- -i --nb-cores=1" %
-                             (self.target, self.coremask, self.dut.get_memory_channels(), self.base_dir), "testpmd>", 60)
+        testcmd = self.target + "/app/testpmd "
+        vdev = [r"'net_vhost0,iface=%s/vhost-net,queues=1'" % self.base_dir]
+        eal_params = self.dut.create_eal_parameters(cores="1S/4C/1T", ports=[self.pci_info], vdevs=vdev)
+        para = " -- -i --nb-cores=1"
+        cmd = testcmd + eal_params + para
+        self.dut.send_expect(cmd, "testpmd>", 60)
         self.start_onevm()
         self.vm_testpmd_start()
         self.dut.send_expect("set fwd mac", "testpmd>", 60)
-- 
2.17.2


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [dts] [PATCH V1 6/9] tests/vhost_virtio_user_interrupt:add create_eal_parameters function.
  2020-01-18  8:38 [dts] [PATCH V1 1/9] tests/vhost_1024_ethports:add create_eal_parameters function zhu,shuai
                   ` (3 preceding siblings ...)
  2020-01-18  8:38 ` [dts] [PATCH V1 5/9] tests/vhost_pmd_xstats:add " zhu,shuai
@ 2020-01-18  8:38 ` zhu,shuai
  2020-01-18  8:38 ` [dts] [PATCH V1 7/9] tests/vhost_virtio_pmd_interrupt:add " zhu,shuai
                   ` (3 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: zhu,shuai @ 2020-01-18  8:38 UTC (permalink / raw)
  To: dts; +Cc: yinan.wang, zhu,shuai

add create_eal_parameters function.

Signed-off-by: zhu,shuai <shuaix.zhu@intel.com>
---
 .../TestSuite_vhost_virtio_user_interrupt.py  | 43 ++++++++-----------
 1 file changed, 18 insertions(+), 25 deletions(-)

diff --git a/tests/TestSuite_vhost_virtio_user_interrupt.py b/tests/TestSuite_vhost_virtio_user_interrupt.py
index e2b3f55..610e56e 100644
--- a/tests/TestSuite_vhost_virtio_user_interrupt.py
+++ b/tests/TestSuite_vhost_virtio_user_interrupt.py
@@ -57,7 +57,7 @@ class TestVirtioUserInterrupt(TestCase):
         self.core_mask_vhost = utils.create_mask(self.core_list_vhost)
         self.core_mask_l3fwd = utils.create_mask(self.core_list_l3fwd)
         self.core_mask_virtio = self.core_mask_l3fwd
-        self.mem_channel = self.dut.get_memory_channels()
+        self.pci_info = self.dut.ports_info[0]['pci']
 
         self.prepare_l3fwd_power()
         self.tx_port = self.tester.get_local_port(self.dut_ports[0])
@@ -91,13 +91,11 @@ class TestVirtioUserInterrupt(TestCase):
 
     def launch_l3fwd(self, path):
         self.core_interrupt = self.core_list_l3fwd[0]
-        cmd_l3fwd = "./examples/l3fwd-power/build/l3fwd-power " + \
-                    "-n %d -c %s --socket-mem 1024,1024 --legacy-mem " + \
-                    "--log-level='user1,7' --no-pci --file-prefix=l3fwd-pwd " + \
-                    "--vdev=virtio_user0,path=%s,cq=1 -- -p 1 " + \
-                    " --config='(0,0,%s)' --parse-ptype "
-        cmd_l3fwd = cmd_l3fwd % (self.mem_channel, self.core_mask_l3fwd,
-                    path, self.core_interrupt)
+        example_para = "./examples/l3fwd-power/build/l3fwd-power "
+        vdev = " --log-level='user1,7' --vdev=virtio_user0,path=%s,cq=1 -- -p 1" % path
+        eal_params = self.dut.create_eal_parameters(cores=self.core_list_l3fwd, prefix='l3fwd-pwd', no_pci=True, ports=[self.pci_info])
+        para = " --config='(0,0,%s)' --parse-ptype" % self.core_interrupt
+        cmd_l3fwd = example_para + eal_params + vdev + para
         self.l3fwd.get_session_before(timeout=2)
         self.l3fwd.send_expect(cmd_l3fwd, "POWER", 40)
         time.sleep(10)
@@ -111,16 +109,14 @@ class TestVirtioUserInterrupt(TestCase):
         """
         start testpmd on vhost side
         """
+        testcmd = self.dut.target + "/app/testpmd "
+        vdev = [r"'net_vhost0,iface=vhost-net,queues=1,client=0'"]
+        para = " -- -i --rxq=1 --txq=1"
         if len(pci) == 0:
-            pci_info = self.dut.ports_info[self.dut_ports[0]]['pci']
-            pci = '-w %s' % pci_info
-        cmd_vhost_user = self.dut.target + "/app/testpmd -n %d -c %s " + \
-              "--socket-mem 1024,1024 --legacy-mem %s " + \
-              "--file-prefix=vhost " + \
-              "--vdev 'net_vhost0,iface=vhost-net,queues=1,client=0' " + \
-              "-- -i --rxq=1 --txq=1"
-        cmd_vhost_user = cmd_vhost_user % (self.mem_channel,
-                self.core_mask_vhost, pci)
+            eal_params = self.dut.create_eal_parameters(cores=self.core_list_vhost, ports=[self.pci_info], vdevs=vdev)
+        else:
+            eal_params = self.dut.create_eal_parameters(cores=self.core_list_vhost, prefix='vhost', no_pci=True, ports=[self.pci_info], vdevs=vdev)
+        cmd_vhost_user = testcmd + eal_params + para
 
         self.vhost.send_expect(cmd_vhost_user, "testpmd>", 30)
         self.vhost.send_expect("set fwd mac", "testpmd>", 30)
@@ -130,14 +126,11 @@ class TestVirtioUserInterrupt(TestCase):
         """
         start testpmd on virtio side
         """
-        cmd_virtio_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" + \
-                        " -- -i --txd=512 --rxd=128 --tx-offloads=0x00"
-        cmd_virtio_user = cmd_virtio_user % (self.mem_channel,
-                        self.core_mask_virtio)
-
+        testcmd = self.dut.target + "/app/testpmd "
+        vdev = " --vdev=net_virtio_user0,mac=00:01:02:03:04:05,path=./vhost-net"
+        eal_params = self.dut.create_eal_parameters(cores=self.core_list_l3fwd, prefix='virtio', no_pci=True, ports=[self.pci_info])
+        para = " -- -i --txd=512 --rxd=128 --tx-offloads=0x00"
+        cmd_virtio_user = testcmd + eal_params + vdev + para
         self.virtio.send_expect(cmd_virtio_user, "testpmd>", 120)
         self.virtio.send_expect("set fwd mac", "testpmd>", 20)
         self.virtio.send_expect("start", "testpmd>", 20)
-- 
2.17.2


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [dts] [PATCH V1 7/9] tests/vhost_virtio_pmd_interrupt:add create_eal_parameters function.
  2020-01-18  8:38 [dts] [PATCH V1 1/9] tests/vhost_1024_ethports:add create_eal_parameters function zhu,shuai
                   ` (4 preceding siblings ...)
  2020-01-18  8:38 ` [dts] [PATCH V1 6/9] tests/vhost_virtio_user_interrupt:add " zhu,shuai
@ 2020-01-18  8:38 ` zhu,shuai
  2020-01-18  8:38 ` [dts] [PATCH V1 8/9] tests/vhost_user_live_migration:add " zhu,shuai
                   ` (2 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: zhu,shuai @ 2020-01-18  8:38 UTC (permalink / raw)
  To: dts; +Cc: yinan.wang, zhu,shuai

add create_eal_parameters function.

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

diff --git a/tests/TestSuite_vhost_virtio_pmd_interrupt.py b/tests/TestSuite_vhost_virtio_pmd_interrupt.py
index f35f9a1..6a76bb2 100644
--- a/tests/TestSuite_vhost_virtio_pmd_interrupt.py
+++ b/tests/TestSuite_vhost_virtio_pmd_interrupt.py
@@ -57,7 +57,7 @@ class TestVhostVirtioPmdInterrupt(TestCase):
         self.ports_socket = self.dut.get_numa_id(self.dut_ports[0])
         self.cores_num = len([n for n in self.dut.cores if int(n['socket']) ==
                         self.ports_socket])
-        self.mem_channels = self.dut.get_memory_channels()
+        self.pci_info = self.dut.ports_info[0]['pci']
         self.tx_port = self.tester.get_local_port(self.dut_ports[0])
         self.dst_mac = self.dut.get_mac_address(self.dut_ports[0])
         self.logger.info("Please comfirm the kernel of vm greater than 4.8.0 "
@@ -93,7 +93,6 @@ class TestVhostVirtioPmdInterrupt(TestCase):
                     self.running_case)
         self.core_list = self.dut.get_core_list(core_config,
                                     socket=self.ports_socket)
-        self.core_mask = utils.create_mask(self.core_list)
 
     def prepare_vm_env(self):
         """
@@ -117,14 +116,11 @@ class TestVhostVirtioPmdInterrupt(TestCase):
         """
         # get the core list depend on current nb_cores number
         self.get_core_list()
-
-        command_client = self.dut.target + "/app/testpmd -c %s -n %d " + \
-                        "--socket-mem 1024,1024 --legacy-mem " + \
-                        "--vdev 'net_vhost0,iface=%s/vhost-net,queues=%d' " + \
-                        "-- -i --nb-cores=%d --rxq=%d --txq=%d --rss-ip"
-        command_line_client = command_client % (
-                        self.core_mask, self.mem_channels, self.base_dir,
-                        self.queues, self.nb_cores, self.queues, self.queues)
+        testcmd = self.dut.target + "/app/testpmd "
+        vdev = [r"'net_vhost0,iface=%s/vhost-net,queues=%d'" % (self.base_dir, self.queues)]
+        eal_params = self.dut.create_eal_parameters(cores=self.core_list, ports=[self.pci_info], vdevs=vdev)
+        para = " -- -i --nb-cores=%d --rxq=%d --txq=%d --rss-ip" % (self.nb_cores, self.queues, self.queues)
+        command_line_client = testcmd + eal_params + para
         self.vhost_user.send_expect(command_line_client, "testpmd> ", 120)
         self.vhost_user.send_expect("start", "testpmd> ", 120)
 
-- 
2.17.2


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [dts] [PATCH V1 8/9] tests/vhost_user_live_migration:add create_eal_parameters function.
  2020-01-18  8:38 [dts] [PATCH V1 1/9] tests/vhost_1024_ethports:add create_eal_parameters function zhu,shuai
                   ` (5 preceding siblings ...)
  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
  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
  8 siblings, 0 replies; 10+ messages in thread
From: zhu,shuai @ 2020-01-18  8:38 UTC (permalink / raw)
  To: dts; +Cc: yinan.wang, zhu,shuai

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


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [dts] [PATCH V1 9/9] tests/vhost_dequeue_zero_copy:add create_eal_parameters function.
  2020-01-18  8:38 [dts] [PATCH V1 1/9] tests/vhost_1024_ethports:add create_eal_parameters function zhu,shuai
                   ` (6 preceding siblings ...)
  2020-01-18  8:38 ` [dts] [PATCH V1 8/9] tests/vhost_user_live_migration:add " zhu,shuai
@ 2020-01-18  8:38 ` zhu,shuai
  2020-01-19  8:35 ` [dts] [PATCH V1 1/9] tests/vhost_1024_ethports:add " Tu, Lijuan
  8 siblings, 0 replies; 10+ messages in thread
From: zhu,shuai @ 2020-01-18  8:38 UTC (permalink / raw)
  To: dts; +Cc: yinan.wang, zhu,shuai

add create_eal_parameters function.

Signed-off-by: zhu,shuai <shuaix.zhu@intel.com>
---
 tests/TestSuite_vhost_dequeue_zero_copy.py | 24 ++++++++--------------
 1 file changed, 9 insertions(+), 15 deletions(-)

diff --git a/tests/TestSuite_vhost_dequeue_zero_copy.py b/tests/TestSuite_vhost_dequeue_zero_copy.py
index 0bce1ae..9e65543 100644
--- a/tests/TestSuite_vhost_dequeue_zero_copy.py
+++ b/tests/TestSuite_vhost_dequeue_zero_copy.py
@@ -127,16 +127,11 @@ class TestVhostDequeueZeroCopy(TestCase):
         elif txfreet == "vector_rx":
             txfreet_args = "--txd=1024 --rxd=1024 --txfreet=992 --txrs=32"
 
-        eal_params = self.dut.create_eal_parameters(cores=self.core_list,
-                    prefix='vhost', ports=[self.port_pci])
-        command_client = self.dut.target + "/app/testpmd %s " + \
-                         " --socket-mem 1024,1024 --legacy-mem " + \
-                         " --vdev 'eth_vhost0,iface=%s/vhost-net,queues=%d,dequeue-zero-copy=%d%s' " + \
-                         " -- -i --nb-cores=%d --rxq=%d --txq=%d %s"
-        command_line_client = command_client % (
-            eal_params, self.base_dir, self.queue_number,
-            zero_copy_info, mode_info, self.nb_cores,
-            self.queue_number, self.queue_number, txfreet_args)
+        testcmd = self.dut.target + "/app/testpmd "
+        vdev = [r"'eth_vhost0,iface=%s/vhost-net,queues=%d,dequeue-zero-copy=%d%s'" % (self.base_dir, self.queue_number, zero_copy_info, mode_info)]
+        para = " -- -i --nb-cores=%d --rxq=%d --txq=%d %s" % (self.nb_cores, self.queue_number, self.queue_number, txfreet_args)
+        eal_params = self.dut.create_eal_parameters(cores=self.core_list, prefix='vhost', ports=[self.port_pci], vdevs=vdev)
+        command_line_client = testcmd + eal_params + para
         self.vhost_user.send_expect(command_line_client, "testpmd> ", 120)
         self.vhost_user.send_expect("set fwd mac", "testpmd> ", 120)
 
@@ -151,13 +146,12 @@ class TestVhostDequeueZeroCopy(TestCase):
                 core_config, socket=self.ports_socket)
         self.verify(len(core_list) >= (len(self.core_list) + 3),
                 "There has not enought cores to test this case %s" % self.running_case)
+        testcmd = self.dut.target + "/app/testpmd "
+        vdev = " --vdev=net_virtio_user0,mac=00:01:02:03:04:05,path=./vhost-net,queue_size=1024,%s" % path_mode
+        para = " -- -i --tx-offloads=0x0 --nb-cores=%d --txd=1024 --rxd=1024" % self.nb_cores
         eal_params = self.dut.create_eal_parameters(cores=core_list[len(self.core_list):],
                         prefix='virtio', no_pci=True)
-        command_line = self.dut.target + "/app/testpmd %s " + \
-                        "--socket-mem 1024,1024 --legacy-mem " + \
-                        "--vdev=net_virtio_user0,mac=00:01:02:03:04:05,path=./vhost-net,queue_size=1024,%s " + \
-                        "-- -i --tx-offloads=0x0 --nb-cores=%d --txd=1024 --rxd=1024"
-        command_line = command_line % (eal_params, path_mode, self.nb_cores)
+        command_line = testcmd + eal_params + vdev + para
         self.virtio_user.send_expect(command_line, 'testpmd> ', 120)
         self.virtio_user.send_expect('set fwd mac', 'testpmd> ', 120)
         self.virtio_user.send_expect('start', 'testpmd> ', 120)
-- 
2.17.2


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [dts] [PATCH V1 1/9] tests/vhost_1024_ethports:add create_eal_parameters function.
  2020-01-18  8:38 [dts] [PATCH V1 1/9] tests/vhost_1024_ethports:add create_eal_parameters function zhu,shuai
                   ` (7 preceding siblings ...)
  2020-01-18  8:38 ` [dts] [PATCH V1 9/9] tests/vhost_dequeue_zero_copy:add " zhu,shuai
@ 2020-01-19  8:35 ` Tu, Lijuan
  8 siblings, 0 replies; 10+ messages in thread
From: Tu, Lijuan @ 2020-01-19  8:35 UTC (permalink / raw)
  To: Zhu, ShuaiX, dts; +Cc: Wang, Yinan, Zhu, ShuaiX

Applied the series.

> -----Original Message-----
> From: dts [mailto:dts-bounces@dpdk.org] On Behalf Of zhu,shuai
> Sent: Saturday, January 18, 2020 4:38 PM
> To: dts@dpdk.org
> Cc: Wang, Yinan <yinan.wang@intel.com>; Zhu, ShuaiX
> <shuaix.zhu@intel.com>
> Subject: [dts] [PATCH V1 1/9] tests/vhost_1024_ethports:add
> create_eal_parameters function.
> 
> add create_eal_parameters function.
> 
> Signed-off-by: zhu,shuai <shuaix.zhu@intel.com>
> ---
>  tests/TestSuite_vhost_1024_ethports.py | 7 +++----
>  1 file changed, 3 insertions(+), 4 deletions(-)
> 
> diff --git a/tests/TestSuite_vhost_1024_ethports.py
> b/tests/TestSuite_vhost_1024_ethports.py
> index 0c14e8d..2a0bce8 100644
> --- a/tests/TestSuite_vhost_1024_ethports.py
> +++ b/tests/TestSuite_vhost_1024_ethports.py
> @@ -50,7 +50,7 @@ class TestVhost1024Ethports(TestCase):
>          self.verify(len(self.dut_ports) >= 1, 'Insufficient ports for testing')
>          self.mem_channels = self.dut.get_memory_channels()
>          cores = self.dut.get_core_list("1S/2C/1T")
> -        self.coremask = utils.create_mask(cores)
> +        self.pci_info = self.dut.ports_info[0]['pci']
>          self.build_user_dpdk()
> 
>      def set_up(self):
> @@ -78,9 +78,8 @@ class TestVhost1024Ethports(TestCase):
>          command_line_vdev = ''
>          for ethport in range(self.max_ethport):
>              command_line_vdev += '--vdev "eth_vhost%d,iface=vhost-
> net%d,queues=%d" ' %(ethport, ethport, self.queue)
> -        command_line_argument = '/app/testpmd -c %s -n %d --socket-mem
> 10240,10240 '\
> -                        '--file-prefix=vhost ' %(self.coremask, self.mem_channels)
> -        command_line_client = self.dut.target + command_line_argument +
> command_line_vdev + '-- -i'
> +        eal_params = self.dut.create_eal_parameters(cores="1S/2C/1T",
> prefix='vhost', ports=[self.pci_info])
> +        cmd = self.dut.target + '/app/testpmd ' + eal_params +
> command_line_vdev + ' -- -i'
>          try:
>              out = self.vhost_user.send_expect(command_line_client, 'testpmd> ',
> 120)
>          except Exception as e:
> --
> 2.17.2


^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2020-01-19  8:35 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-01-18  8:38 [dts] [PATCH V1 1/9] tests/vhost_1024_ethports:add create_eal_parameters function 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 ` [dts] [PATCH V1 8/9] tests/vhost_user_live_migration:add " zhu,shuai
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

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).