[V1] tests/vhost_virtio_pmd_interrupt: add 1 packed ring cbdma testcase sync with testplan

Message ID 20210402083747.106679-1-weix.ling@intel.com (mailing list archive)
State Accepted
Headers
Series [V1] tests/vhost_virtio_pmd_interrupt: add 1 packed ring cbdma testcase sync with testplan |

Commit Message

Ling, WeiX April 2, 2021, 8:37 a.m. UTC
  Add 1 packed ring cbdma testcase 7 sync with testplan.

Signed-off-by: Ling Wei <weix.ling@intel.com>
---
 tests/TestSuite_vhost_virtio_pmd_interrupt.py | 28 +++++++++++++++----
 1 file changed, 23 insertions(+), 5 deletions(-)
  

Comments

Ling, WeiX April 2, 2021, 8:41 a.m. UTC | #1
> -----Original Message-----
> From: Ling, WeiX <weix.ling@intel.com>
> Sent: Friday, April 2, 2021 04:38 PM
> To: dts@dpdk.org
> Cc: Ling, WeiX <weix.ling@intel.com>
> Subject: [dts][PATCH V1] tests/vhost_virtio_pmd_interrupt: add 1 packed
> ring cbdma testcase sync with testplan
> 
Tested-by: Wei Ling <weix.ling@intel.com>
  
Tu, Lijuan April 7, 2021, 6:55 a.m. UTC | #2
> Add 1 packed ring cbdma testcase 7 sync with testplan.
> 
> Signed-off-by: Ling Wei <weix.ling@intel.com>

Applied.
  
Wang, Yinan April 12, 2021, 2:50 a.m. UTC | #3
Acked-by: Wang, Yinan <yinan.wang@intel.com>

> -----Original Message-----
> From: dts <dts-bounces@dpdk.org> On Behalf Of Ling, WeiX
> Sent: 2021?4?2? 16:41
> To: dts@dpdk.org
> Subject: Re: [dts] [PATCH V1] tests/vhost_virtio_pmd_interrupt: add 1
> packed ring cbdma testcase sync with testplan
> 
> > -----Original Message-----
> > From: Ling, WeiX <weix.ling@intel.com>
> > Sent: Friday, April 2, 2021 04:38 PM
> > To: dts@dpdk.org
> > Cc: Ling, WeiX <weix.ling@intel.com>
> > Subject: [dts][PATCH V1] tests/vhost_virtio_pmd_interrupt: add 1 packed
> > ring cbdma testcase sync with testplan
> >
> Tested-by: Wei Ling <weix.ling@intel.com>
  

Patch

diff --git a/tests/TestSuite_vhost_virtio_pmd_interrupt.py b/tests/TestSuite_vhost_virtio_pmd_interrupt.py
index 57bcf6c7..675a15ee 100644
--- a/tests/TestSuite_vhost_virtio_pmd_interrupt.py
+++ b/tests/TestSuite_vhost_virtio_pmd_interrupt.py
@@ -180,7 +180,10 @@  class TestVhostVirtioPmdInterrupt(TestCase):
         vm_params['opt_path'] = '%s/vhost-net' % self.base_dir
         vm_params['opt_mac'] = "00:11:22:33:44:55"
         vm_params['opt_queue'] = self.queues
-        opt_param = "mrg_rxbuf=on,csum=on,mq=on,vectors=%d" % (2*self.queues+2) if not packed else "mrg_rxbuf=on,csum=on,mq=on,vectors=%d,packed=on" % (2*self.queues+2)
+        if not packed:
+            opt_param = "mrg_rxbuf=on,csum=on,mq=on,vectors=%d" % (2 * self.queues + 2)
+        else:
+            opt_param = "mrg_rxbuf=on,csum=on,mq=on,vectors=%d,packed=on" % (2 * self.queues + 2)
         if mode == 0:
             vm_params['opt_settings'] = "disable-modern=true," + opt_param
         elif mode == 1:
@@ -309,7 +312,7 @@  class TestVhostVirtioPmdInterrupt(TestCase):
 
     def test_perf_virtio_pmd_interrupt_with_4queues(self):
         """
-        wake up virtio_user 0.95 core with l3fwd-power sample
+        Test Case 1: Basic virtio interrupt test with 4 queues
         """
         self.queues = 4
         self.nb_cores = 4
@@ -321,7 +324,7 @@  class TestVhostVirtioPmdInterrupt(TestCase):
 
     def test_perf_virtio_pmd_interrupt_with_16queues(self):
         """
-        wake up virtio_user 0.95 core with l3fwd-power sample
+        Test Case 2: Basic virtio interrupt test with 16 queues
         """
         self.queues = 16
         self.nb_cores = 16
@@ -333,7 +336,7 @@  class TestVhostVirtioPmdInterrupt(TestCase):
 
     def test_perf_virito10_pmd_interrupt_with_4queues(self):
         """
-        wake up virtio_user 1.0 core with l3fwd-power sample
+        Test Case 3: Basic virtio-1.0 interrupt test with 4 queues
         """
         self.queues = 4
         self.nb_cores = 4
@@ -345,7 +348,7 @@  class TestVhostVirtioPmdInterrupt(TestCase):
 
     def test_perf_packed_ring_virtio_interrupt_with_16queues(self):
         """
-        wake up virtio_user 0.95 core with l3fwd-power sample
+        Test Case 4: Packed ring virtio interrupt test with 16 queues
         """
         self.queues = 16
         self.nb_cores = 16
@@ -383,12 +386,27 @@  class TestVhostVirtioPmdInterrupt(TestCase):
         self.launch_l3fwd_power_in_vm()
         self.send_and_verify()
 
+    def test_perf_packed_ring_virtio_interrupt_with_16_queues_and_cbdma_enabled(self):
+        """
+        Test Case 7: Packed ring virtio interrupt test with 16 queues and cbdma enabled
+        """
+        used_cbdma_num = 16
+        self.queues = 16
+        self.nb_cores = 16
+        self.get_cbdma_ports_info_and_bind_to_dpdk(used_cbdma_num)
+        self.start_testpmd_on_vhost(self.dmas_info)
+        self.start_vms(mode=0, packed=True)
+        self.prepare_vm_env()
+        self.launch_l3fwd_power_in_vm()
+        self.send_and_verify()
+
     def tear_down(self):
         """
         Run after each test case.
         """
         self.stop_all_apps()
         self.dut.kill_all()
+        self.dut.send_expect("killall -s INT %s" % self.testpmd_name, "#")
         self.dut.send_expect("killall -s INT qemu-system-x86_64", "#")
         self.bind_cbdma_device_to_kernel()