test suite reviews and discussions
 help / color / mirror / Atom feed
* [dts] [PATCH V2] tests/vm2vm_virtio_pmd: add testcases sync with testplan
@ 2021-07-26  6:17 Xie Dechun
  2021-07-26  6:27 ` Ling, WeiX
  0 siblings, 1 reply; 4+ messages in thread
From: Xie Dechun @ 2021-07-26  6:17 UTC (permalink / raw)
  To: dts; +Cc: Xie Dechun

v1: Add testcases sync with testplan.

v2: Remove dequeue parameter in case 9 and 10.

Signed-off-by: Xie Dechun <dechunx.xie@intel.com>
---
 tests/TestSuite_vm2vm_virtio_pmd.py | 62 +++++++++++++++++------------
 1 file changed, 37 insertions(+), 25 deletions(-)

diff --git a/tests/TestSuite_vm2vm_virtio_pmd.py b/tests/TestSuite_vm2vm_virtio_pmd.py
index 0cc992a0..44f17a36 100644
--- a/tests/TestSuite_vm2vm_virtio_pmd.py
+++ b/tests/TestSuite_vm2vm_virtio_pmd.py
@@ -48,6 +48,8 @@ from pmd_output import PmdOutput
 
 class TestVM2VMVirtioPMD(TestCase):
     def set_up_all(self):
+        self.dut_ports = self.dut.get_ports()
+        self.bind_nic_driver(self.dut_ports)
         self.memory_channel = self.dut.get_memory_channels()
         self.vm_num = 2
         self.dump_pcap = "/root/pdump-rx.pcap"
@@ -437,34 +439,35 @@ class TestVM2VMVirtioPMD(TestCase):
 
     def test_vhost_vm2vm_virtio_split_ring_with_mergeable_path_cbdma_enabled(self):
         """
-        Test Case 9: VM2VM virtio-pmd split ring mergeable path 4 queues CBDMA enable with server mode stable test
+        Test Case 9: VM2VM virtio-pmd split ring mergeable path 8 queues CBDMA enable with server mode stable test
         """
         self.nb_cores = 4
         self.get_core_list(self.nb_cores + 1)
-        self.get_cbdma_ports_info_and_bind_to_dpdk(cbdma_num=16, queue_num=4, allow_diff_socket=True)
-        self.logger.info("Launch vhost-testpmd with CBDMA and used 4 queue")
-        self.prepare_test_env(cbdma=True, no_pci=False, client_mode=True, enable_queues=4, nb_cores=4,
-                              server_mode=True, opt_queue=4, combined=True, rxq_txq=4)
+        self.get_cbdma_ports_info_and_bind_to_dpdk(cbdma_num=16, queue_num=8, allow_diff_socket=True)
+        self.logger.info("Launch vhost-testpmd with CBDMA and used 8 queue")
+        self.prepare_test_env(cbdma=True, no_pci=False, client_mode=True, enable_queues=8, nb_cores=4,
+                              server_mode=True, opt_queue=8, combined=True, rxq_txq=8)
         self.logger.info("Launch testpmd in VM1")
-        self.start_vm_testpmd(self.vm_dut[0], "mergeable", extern_param="--max-pkt-len=9600", queues="4")
+        self.start_vm_testpmd(self.vm_dut[0], "mergeable", extern_param="--max-pkt-len=9600", queues="8")
         self.vm_dut[0].send_expect('set fwd mac', 'testpmd> ', 30)
         self.vm_dut[0].send_expect('start', 'testpmd> ', 30)
         self.logger.info("Launch testpmd in VM2, sent imix pkts from VM2")
-        self.start_vm_testpmd(self.vm_dut[1], "mergeable", extern_param="--max-pkt-len=9600", queues="4")
+        self.start_vm_testpmd(self.vm_dut[1], "mergeable", extern_param="--max-pkt-len=9600", queues="8")
+        self.vm_dut[1].send_expect('set fwd mac', 'testpmd> ', 30)
         self.vm_dut[1].send_expect('set txpkts 64,256,512,1024,2000,64,256,512,1024,2000', 'testpmd> ', 30)
         self.vm_dut[1].send_expect('start tx_first 1', 'testpmd> ', 30)
         self.logger.info("Check imix packets")
-        self.check_port_stats_result(self.vm_dut[0], queue_num=4)
-        self.check_port_stats_result(self.vm_dut[1], queue_num=4)
+        self.check_port_stats_result(self.vm_dut[0], queue_num=8)
+        self.check_port_stats_result(self.vm_dut[1], queue_num=8)
         self.logger.info("Relaunch vhost side testpmd and Check imix packets 10 times")
         for _ in range(10):
             self.pmd_vhost.execute_cmd('quit', '#')
-            self.start_vhost_testpmd_cbdma(cbdma=True, no_pci=False, client_mode=True, enable_queues=4, nb_cores=4,
-                                           rxq_txq=4)
+            self.start_vhost_testpmd_cbdma(cbdma=True, no_pci=False, client_mode=True, enable_queues=8, nb_cores=4,
+                                           rxq_txq=8)
             self.vm_dut[1].send_expect('stop', 'testpmd> ', 30)
             self.vm_dut[1].send_expect('start tx_first 32', 'testpmd> ', 30)
-            self.check_port_stats_result(self.vm_dut[0], queue_num=4)
-            self.check_port_stats_result(self.vm_dut[1], queue_num=4)
+            self.check_port_stats_result(self.vm_dut[0], queue_num=8)
+            self.check_port_stats_result(self.vm_dut[1], queue_num=8)
 
     def test_vhost_vm2vm_split_ring_with_mergeable_path_and_server_mode_cbdma_enabled(self):
         """
@@ -472,30 +475,30 @@ class TestVM2VMVirtioPMD(TestCase):
         """
         self.nb_cores = 4
         self.get_core_list(self.nb_cores + 1)
-        self.get_cbdma_ports_info_and_bind_to_dpdk(cbdma_num=16, queue_num=4, allow_diff_socket=True)
-        self.logger.info("Launch vhost-testpmd with CBDMA and used 4 queue")
-        self.prepare_test_env(cbdma=True, no_pci=False, client_mode=True, enable_queues=4, nb_cores=4,
-                              server_mode=True, opt_queue=4, combined=True, rxq_txq=4)
+        self.get_cbdma_ports_info_and_bind_to_dpdk(cbdma_num=16, queue_num=8, allow_diff_socket=True)
+        self.logger.info("Launch vhost-testpmd with CBDMA and used 8 queue")
+        self.prepare_test_env(cbdma=True, no_pci=False, client_mode=True, enable_queues=8, nb_cores=4,
+                              server_mode=True, opt_queue=8, combined=True, rxq_txq=8)
         self.logger.info("Launch testpmd in VM1")
-        self.start_vm_testpmd(self.vm_dut[0], "mergeable", extern_param="--max-pkt-len=9600", queues="4")
+        self.start_vm_testpmd(self.vm_dut[0], "mergeable", extern_param="--max-pkt-len=9600", queues="8")
         self.vm_dut[0].send_expect('set fwd mac', 'testpmd> ', 30)
         self.vm_dut[0].send_expect('start', 'testpmd> ', 30)
         self.logger.info("Launch testpmd in VM2 and send imix pkts")
-        self.start_vm_testpmd(self.vm_dut[1], "mergeable", extern_param="--max-pkt-len=9600", queues="4")
+        self.start_vm_testpmd(self.vm_dut[1], "mergeable", extern_param="--max-pkt-len=9600", queues="8")
         self.vm_dut[1].send_expect('set fwd mac', 'testpmd> ', 30)
         self.vm_dut[1].send_expect('set txpkts 64,256,512,1024,2000,64,256,512,1024,2000', 'testpmd> ', 30)
         self.vm_dut[1].send_expect('start tx_first 32', 'testpmd> ', 30)
         self.logger.info("Check imix packets")
-        self.check_port_stats_result(self.vm_dut[0], queue_num=4)
-        self.check_port_stats_result(self.vm_dut[1], queue_num=4)
+        self.check_port_stats_result(self.vm_dut[0], queue_num=8)
+        self.check_port_stats_result(self.vm_dut[1], queue_num=8)
         self.logger.info("Relaunch vhost side testpmd and Check imix packets 10 times")
         self.pmd_vhost.execute_cmd('quit', '#')
-        self.start_vhost_testpmd_cbdma(cbdma=True, no_pci=False, client_mode=True, enable_queues=4, nb_cores=4,
-                                       rxq_txq=4)
+        self.start_vhost_testpmd_cbdma(cbdma=True, no_pci=False, client_mode=True, enable_queues=8, nb_cores=4,
+                                       rxq_txq=8)
         self.vm_dut[1].send_expect('stop', 'testpmd> ', 30)
         self.vm_dut[1].send_expect('start tx_first 32', 'testpmd> ', 30)
-        self.check_port_stats_result(self.vm_dut[0], queue_num=4)
-        self.check_port_stats_result(self.vm_dut[1], queue_num=4)
+        self.check_port_stats_result(self.vm_dut[0], queue_num=8)
+        self.check_port_stats_result(self.vm_dut[1], queue_num=8)
 
     def test_vhost_vm2vm_packed_ring_with_mergeable_path_and_8queues_cbdma_enabled(self):
         """
@@ -723,6 +726,15 @@ class TestVM2VMVirtioPMD(TestCase):
             self.dut.send_expect('./usertools/dpdk-devbind.py -u %s' % self.device_str, '# ', 30)
             self.dut.send_expect('./usertools/dpdk-devbind.py --force --bind=ioatdma  %s' % self.device_str, '# ', 60)
 
+    def bind_nic_driver(self, ports, driver=""):
+            for port in ports:
+                netdev = self.dut.ports_info[port]['port']
+                driver_now = netdev.get_nic_driver()
+                if driver == "":
+                    driver = netdev.default_driver
+                if driver != driver_now:
+                    netdev.bind_driver(driver=driver)
+
     def tear_down(self):
         #
         # Run after each test case.
-- 
2.17.1


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

* Re: [dts] [PATCH V2] tests/vm2vm_virtio_pmd: add testcases sync with testplan
  2021-07-26  6:17 [dts] [PATCH V2] tests/vm2vm_virtio_pmd: add testcases sync with testplan Xie Dechun
@ 2021-07-26  6:27 ` Ling, WeiX
  2021-07-26  6:46   ` Wang, Yinan
  0 siblings, 1 reply; 4+ messages in thread
From: Ling, WeiX @ 2021-07-26  6:27 UTC (permalink / raw)
  To: dts; +Cc: Xie, DechunX

[-- Attachment #1: Type: text/plain, Size: 330 bytes --]

> -----Original Message-----
> From: dts <dts-bounces@dpdk.org> On Behalf Of Xie Dechun
> Sent: Monday, July 26, 2021 02:18 PM
> To: dts@dpdk.org
> Cc: Xie, DechunX <dechunx.xie@intel.com>
> Subject: [dts] [PATCH V2] tests/vm2vm_virtio_pmd: add testcases sync with
> testplan
> 
Tested-by: Wei Ling <weix.ling@intel.com>

[-- Attachment #2: TestVM2VMVirtioPMD.log --]
[-- Type: application/octet-stream, Size: 1579152 bytes --]

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

* Re: [dts] [PATCH V2] tests/vm2vm_virtio_pmd: add testcases sync with testplan
  2021-07-26  6:27 ` Ling, WeiX
@ 2021-07-26  6:46   ` Wang, Yinan
  2021-07-26  6:54     ` Tu, Lijuan
  0 siblings, 1 reply; 4+ messages in thread
From: Wang, Yinan @ 2021-07-26  6:46 UTC (permalink / raw)
  To: Ling, WeiX, dts; +Cc: Xie, DechunX

Acked-by:  Yinan Wang <yinan.wang@intel.com>

> -----Original Message-----
> From: dts <dts-bounces@dpdk.org> On Behalf Of Ling, WeiX
> Sent: 2021?7?26? 14:28
> To: dts@dpdk.org
> Cc: Xie, DechunX <dechunx.xie@intel.com>
> Subject: Re: [dts] [PATCH V2] tests/vm2vm_virtio_pmd: add testcases sync
> with testplan
> 
> > -----Original Message-----
> > From: dts <dts-bounces@dpdk.org> On Behalf Of Xie Dechun
> > Sent: Monday, July 26, 2021 02:18 PM
> > To: dts@dpdk.org
> > Cc: Xie, DechunX <dechunx.xie@intel.com>
> > Subject: [dts] [PATCH V2] tests/vm2vm_virtio_pmd: add testcases sync
> with
> > testplan
> >
> Tested-by: Wei Ling <weix.ling@intel.com>

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

* Re: [dts] [PATCH V2] tests/vm2vm_virtio_pmd: add testcases sync with testplan
  2021-07-26  6:46   ` Wang, Yinan
@ 2021-07-26  6:54     ` Tu, Lijuan
  0 siblings, 0 replies; 4+ messages in thread
From: Tu, Lijuan @ 2021-07-26  6:54 UTC (permalink / raw)
  To: Wang, Yinan, Ling, WeiX, dts; +Cc: Xie, DechunX



> -----Original Message-----
> From: dts <dts-bounces@dpdk.org> On Behalf Of Wang, Yinan
> Sent: 2021年7月26日 14:46
> To: Ling, WeiX <weix.ling@intel.com>; dts@dpdk.org
> Cc: Xie, DechunX <dechunx.xie@intel.com>
> Subject: Re: [dts] [PATCH V2] tests/vm2vm_virtio_pmd: add testcases sync with
> testplan
> 
> Acked-by:  Yinan Wang <yinan.wang@intel.com>
> 
> > -----Original Message-----
> > From: dts <dts-bounces@dpdk.org> On Behalf Of Ling, WeiX
> > Sent: 2021?7?26? 14:28
> > To: dts@dpdk.org
> > Cc: Xie, DechunX <dechunx.xie@intel.com>
> > Subject: Re: [dts] [PATCH V2] tests/vm2vm_virtio_pmd: add testcases
> > sync with testplan
> >
> > > -----Original Message-----
> > > From: dts <dts-bounces@dpdk.org> On Behalf Of Xie Dechun
> > > Sent: Monday, July 26, 2021 02:18 PM
> > > To: dts@dpdk.org
> > > Cc: Xie, DechunX <dechunx.xie@intel.com>
> > > Subject: [dts] [PATCH V2] tests/vm2vm_virtio_pmd: add testcases sync
> > with
> > > testplan
> > >
> > Tested-by: Wei Ling <weix.ling@intel.com>

Applied

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

end of thread, other threads:[~2021-07-26  6:54 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-26  6:17 [dts] [PATCH V2] tests/vm2vm_virtio_pmd: add testcases sync with testplan Xie Dechun
2021-07-26  6:27 ` Ling, WeiX
2021-07-26  6:46   ` Wang, Yinan
2021-07-26  6:54     ` 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).