test suite reviews and discussions
 help / color / mirror / Atom feed
* [dts][PATCH V1 2/2] tests/vswitch_sample_cbdma: modify testsuite by DPDK change
@ 2022-03-10  7:41 Wei Ling
  0 siblings, 0 replies; 5+ messages in thread
From: Wei Ling @ 2022-03-10  7:41 UTC (permalink / raw)
  To: dts; +Cc: Wei Ling

By DPDK commit 917229c24e, no need to modify DPDK code to test.
1.Delete modify DPDK code steps.
2.Add --total-num-mbufs 600000 params when start dpdk-vhost.
3.Modify verify the test result expect value.

Signed-off-by: Wei Ling <weix.ling@intel.com>
---
 tests/TestSuite_vswitch_sample_cbdma.py | 24 +++++++++---------------
 1 file changed, 9 insertions(+), 15 deletions(-)

diff --git a/tests/TestSuite_vswitch_sample_cbdma.py b/tests/TestSuite_vswitch_sample_cbdma.py
index bd41135b..a332214f 100644
--- a/tests/TestSuite_vswitch_sample_cbdma.py
+++ b/tests/TestSuite_vswitch_sample_cbdma.py
@@ -54,7 +54,7 @@ class TestVswitchSampleCBDMA(TestCase):
         """
         Run at the start of each test suite.
         """
-        self.set_max_queues(512)
+        #self.set_max_queues(512)
         self.build_vhost_app()
         self.tester_tx_port_num = 1
         self.dut_ports = self.dut.get_ports()
@@ -141,15 +141,15 @@ class TestVswitchSampleCBDMA(TestCase):
             allow_option += ' -a {}'.format(item)
         if with_cbdma:
             if client_mode:
-                params = (" -c {} -n {} {} -- -p 0x1 --mergeable 1 --vm2vm 1 --dma-type ioat --stats 1 "
-                          + socket_file_param + "--dmas [{}] --client").format(self.vhost_core_mask, self.mem_channels,
+                params = (" -c {} -n {} {} -- -p 0x1 --mergeable 1 --vm2vm 1 --stats 1 "
+                          + socket_file_param + "--dmas [{}] --client --total-num-mbufs 600000").format(self.vhost_core_mask, self.mem_channels,
                                                                                allow_option, self.dmas_info)
             else:
-                params = (" -c {} -n {} {} -- -p 0x1 --mergeable 1 --vm2vm 1 --dma-type ioat --stats 1 "
-                          + socket_file_param + "--dmas [{}]").format(self.vhost_core_mask, self.mem_channels,
+                params = (" -c {} -n {} {} -- -p 0x1 --mergeable 1 --vm2vm 1 --stats 1 "
+                          + socket_file_param + "--dmas [{}] --total-num-mbufs 600000").format(self.vhost_core_mask, self.mem_channels,
                                                                       allow_option, self.dmas_info)
         else:
-            params = (" -c {} -n {} {} -- -p 0x1 --mergeable 1 --vm2vm 1 --stats 1 " + socket_file_param).format(
+            params = (" -c {} -n {} {} -- -p 0x1 --mergeable 1 --vm2vm 1 --stats 1 " + socket_file_param + "--total-num-mbufs 600000").format(
                 self.vhost_core_mask, self.mem_channels, allow_option)
         self.command_line = self.app_path + params
         self.vhost_user.send_command(self.command_line)
@@ -589,15 +589,9 @@ class TestVswitchSampleCBDMA(TestCase):
             self.result_table_add(table_row)
         self.result_table_print()
         for key in before_relunch_result.keys():
-            if key == 64:
-                self.verify(before_relunch_result[key] > 1, "The perf test result is lower than 1 Mpps")
-            else:
-                self.verify(before_relunch_result[key] > 0.1, "The perf test result is lower than 0.1 Mpps")
+            self.verify(before_relunch_result[key] > 0.1, "The perf test result is lower than 0.1 Mpps")
         for key in after_relunch_result.keys():
-            if key == 64:
-                self.verify(after_relunch_result[key] > 1, "The perf test result is lower than 1 Mpps")
-            else:
-                self.verify(after_relunch_result[key] > 0.1, "The perf test result is lower than 0.1 Mpps")
+            self.verify(after_relunch_result[key] > 0.1, "The perf test result is lower than 0.1 Mpps")
 
     def vm2vm_check_with_two_vhost_device(self):
         rx_throughput = {}
@@ -828,5 +822,5 @@ class TestVswitchSampleCBDMA(TestCase):
         """
         Run after each test suite.
         """
-        self.set_max_queues(128)
+        #self.set_max_queues(128)
         self.close_all_session()
-- 
2.25.1


^ permalink raw reply	[flat|nested] 5+ messages in thread
* [dts][PATCH V1 2/2] tests/vswitch_sample_cbdma: modify testsuite by DPDK change
@ 2022-03-10  7:53 Wei Ling
  2022-03-11  1:30 ` Tu, Lijuan
  0 siblings, 1 reply; 5+ messages in thread
From: Wei Ling @ 2022-03-10  7:53 UTC (permalink / raw)
  To: dts; +Cc: Wei Ling

By DPDK commit 917229c24e, no need to modify DPDK code to test.
1.Delete modify DPDK code steps.
2.Add --total-num-mbufs 600000 params when start dpdk-vhost.
3.Modify verify the test result expect value.

Signed-off-by: Wei Ling <weix.ling@intel.com>
---
 tests/TestSuite_vswitch_sample_cbdma.py | 24 +++++++++---------------
 1 file changed, 9 insertions(+), 15 deletions(-)

diff --git a/tests/TestSuite_vswitch_sample_cbdma.py b/tests/TestSuite_vswitch_sample_cbdma.py
index bd41135b..a332214f 100644
--- a/tests/TestSuite_vswitch_sample_cbdma.py
+++ b/tests/TestSuite_vswitch_sample_cbdma.py
@@ -54,7 +54,7 @@ class TestVswitchSampleCBDMA(TestCase):
         """
         Run at the start of each test suite.
         """
-        self.set_max_queues(512)
+        #self.set_max_queues(512)
         self.build_vhost_app()
         self.tester_tx_port_num = 1
         self.dut_ports = self.dut.get_ports()
@@ -141,15 +141,15 @@ class TestVswitchSampleCBDMA(TestCase):
             allow_option += ' -a {}'.format(item)
         if with_cbdma:
             if client_mode:
-                params = (" -c {} -n {} {} -- -p 0x1 --mergeable 1 --vm2vm 1 --dma-type ioat --stats 1 "
-                          + socket_file_param + "--dmas [{}] --client").format(self.vhost_core_mask, self.mem_channels,
+                params = (" -c {} -n {} {} -- -p 0x1 --mergeable 1 --vm2vm 1 --stats 1 "
+                          + socket_file_param + "--dmas [{}] --client --total-num-mbufs 600000").format(self.vhost_core_mask, self.mem_channels,
                                                                                allow_option, self.dmas_info)
             else:
-                params = (" -c {} -n {} {} -- -p 0x1 --mergeable 1 --vm2vm 1 --dma-type ioat --stats 1 "
-                          + socket_file_param + "--dmas [{}]").format(self.vhost_core_mask, self.mem_channels,
+                params = (" -c {} -n {} {} -- -p 0x1 --mergeable 1 --vm2vm 1 --stats 1 "
+                          + socket_file_param + "--dmas [{}] --total-num-mbufs 600000").format(self.vhost_core_mask, self.mem_channels,
                                                                       allow_option, self.dmas_info)
         else:
-            params = (" -c {} -n {} {} -- -p 0x1 --mergeable 1 --vm2vm 1 --stats 1 " + socket_file_param).format(
+            params = (" -c {} -n {} {} -- -p 0x1 --mergeable 1 --vm2vm 1 --stats 1 " + socket_file_param + "--total-num-mbufs 600000").format(
                 self.vhost_core_mask, self.mem_channels, allow_option)
         self.command_line = self.app_path + params
         self.vhost_user.send_command(self.command_line)
@@ -589,15 +589,9 @@ class TestVswitchSampleCBDMA(TestCase):
             self.result_table_add(table_row)
         self.result_table_print()
         for key in before_relunch_result.keys():
-            if key == 64:
-                self.verify(before_relunch_result[key] > 1, "The perf test result is lower than 1 Mpps")
-            else:
-                self.verify(before_relunch_result[key] > 0.1, "The perf test result is lower than 0.1 Mpps")
+            self.verify(before_relunch_result[key] > 0.1, "The perf test result is lower than 0.1 Mpps")
         for key in after_relunch_result.keys():
-            if key == 64:
-                self.verify(after_relunch_result[key] > 1, "The perf test result is lower than 1 Mpps")
-            else:
-                self.verify(after_relunch_result[key] > 0.1, "The perf test result is lower than 0.1 Mpps")
+            self.verify(after_relunch_result[key] > 0.1, "The perf test result is lower than 0.1 Mpps")
 
     def vm2vm_check_with_two_vhost_device(self):
         rx_throughput = {}
@@ -828,5 +822,5 @@ class TestVswitchSampleCBDMA(TestCase):
         """
         Run after each test suite.
         """
-        self.set_max_queues(128)
+        #self.set_max_queues(128)
         self.close_all_session()
-- 
2.25.1


^ permalink raw reply	[flat|nested] 5+ messages in thread
* [dts][PATCH V1 2/2] tests/vswitch_sample_cbdma: modify testsuite by DPDK change
@ 2022-03-11  1:44 Wei Ling
  2022-03-11 11:43 ` Tu, Lijuan
  0 siblings, 1 reply; 5+ messages in thread
From: Wei Ling @ 2022-03-11  1:44 UTC (permalink / raw)
  To: dts; +Cc: Wei Ling

By DPDK commit 917229c24e, no need to modify DPDK code to test.
1.Delete modify DPDK code steps.
2.Add --total-num-mbufs 600000 params when start dpdk-vhost.
3.Modify verify the test result expect value.

Signed-off-by: Wei Ling <weix.ling@intel.com>
---
 tests/TestSuite_vswitch_sample_cbdma.py | 27 +++++++------------------
 1 file changed, 7 insertions(+), 20 deletions(-)

diff --git a/tests/TestSuite_vswitch_sample_cbdma.py b/tests/TestSuite_vswitch_sample_cbdma.py
index bd41135b..514a39b2 100644
--- a/tests/TestSuite_vswitch_sample_cbdma.py
+++ b/tests/TestSuite_vswitch_sample_cbdma.py
@@ -54,7 +54,6 @@ class TestVswitchSampleCBDMA(TestCase):
         """
         Run at the start of each test suite.
         """
-        self.set_max_queues(512)
         self.build_vhost_app()
         self.tester_tx_port_num = 1
         self.dut_ports = self.dut.get_ports()
@@ -111,11 +110,6 @@ class TestVswitchSampleCBDMA(TestCase):
         self.vm_dut = []
         self.vm = []
 
-    def set_max_queues(self, max_queues=512):
-        self.logger.info("Configure MAX_QUEUES to {}".format(max_queues))
-        self.dut.send_expect("sed -i -e 's/#define MAX_QUEUES .*$/#define MAX_QUEUES {}/' "
-                             "./examples/vhost/main.c".format(max_queues), "#", 20)
-
     def build_vhost_app(self):
         out = self.dut.build_dpdk_apps('./examples/vhost')
         self.verify('Error' not in out, 'compilation vhost error')
@@ -141,15 +135,15 @@ class TestVswitchSampleCBDMA(TestCase):
             allow_option += ' -a {}'.format(item)
         if with_cbdma:
             if client_mode:
-                params = (" -c {} -n {} {} -- -p 0x1 --mergeable 1 --vm2vm 1 --dma-type ioat --stats 1 "
-                          + socket_file_param + "--dmas [{}] --client").format(self.vhost_core_mask, self.mem_channels,
+                params = (" -c {} -n {} {} -- -p 0x1 --mergeable 1 --vm2vm 1 --stats 1 "
+                          + socket_file_param + "--dmas [{}] --client --total-num-mbufs 600000").format(self.vhost_core_mask, self.mem_channels,
                                                                                allow_option, self.dmas_info)
             else:
-                params = (" -c {} -n {} {} -- -p 0x1 --mergeable 1 --vm2vm 1 --dma-type ioat --stats 1 "
-                          + socket_file_param + "--dmas [{}]").format(self.vhost_core_mask, self.mem_channels,
+                params = (" -c {} -n {} {} -- -p 0x1 --mergeable 1 --vm2vm 1 --stats 1 "
+                          + socket_file_param + "--dmas [{}] --total-num-mbufs 600000").format(self.vhost_core_mask, self.mem_channels,
                                                                       allow_option, self.dmas_info)
         else:
-            params = (" -c {} -n {} {} -- -p 0x1 --mergeable 1 --vm2vm 1 --stats 1 " + socket_file_param).format(
+            params = (" -c {} -n {} {} -- -p 0x1 --mergeable 1 --vm2vm 1 --stats 1 " + socket_file_param + "--total-num-mbufs 600000").format(
                 self.vhost_core_mask, self.mem_channels, allow_option)
         self.command_line = self.app_path + params
         self.vhost_user.send_command(self.command_line)
@@ -589,15 +583,9 @@ class TestVswitchSampleCBDMA(TestCase):
             self.result_table_add(table_row)
         self.result_table_print()
         for key in before_relunch_result.keys():
-            if key == 64:
-                self.verify(before_relunch_result[key] > 1, "The perf test result is lower than 1 Mpps")
-            else:
-                self.verify(before_relunch_result[key] > 0.1, "The perf test result is lower than 0.1 Mpps")
+            self.verify(before_relunch_result[key] > 0.1, "The perf test result is lower than 0.1 Mpps")
         for key in after_relunch_result.keys():
-            if key == 64:
-                self.verify(after_relunch_result[key] > 1, "The perf test result is lower than 1 Mpps")
-            else:
-                self.verify(after_relunch_result[key] > 0.1, "The perf test result is lower than 0.1 Mpps")
+            self.verify(after_relunch_result[key] > 0.1, "The perf test result is lower than 0.1 Mpps")
 
     def vm2vm_check_with_two_vhost_device(self):
         rx_throughput = {}
@@ -828,5 +816,4 @@ class TestVswitchSampleCBDMA(TestCase):
         """
         Run after each test suite.
         """
-        self.set_max_queues(128)
         self.close_all_session()
-- 
2.25.1


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

end of thread, other threads:[~2022-03-11 11:44 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-10  7:41 [dts][PATCH V1 2/2] tests/vswitch_sample_cbdma: modify testsuite by DPDK change Wei Ling
2022-03-10  7:53 Wei Ling
2022-03-11  1:30 ` Tu, Lijuan
2022-03-11  1:44 Wei Ling
2022-03-11 11:43 ` 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).