diff mbox series

[V1] tests/pvp_vhost_user_reconnect: add bind_dev parameter in start_vms

Message ID 20210804025146.3396626-1-weix.ling@intel.com (mailing list archive)
State New
Headers show
Series [V1] tests/pvp_vhost_user_reconnect: add bind_dev parameter in start_vms | expand

Commit Message

Ling, WeiX Aug. 4, 2021, 2:51 a.m. UTC
Add bind_dev parameter in start_vms to decide whether bind NIC
port to DPDK or not after start VM.

Signed-off-by: Wei Ling <weix.ling@intel.com>
---
 tests/TestSuite_pvp_vhost_user_reconnect.py | 14 ++++++--------
 1 file changed, 6 insertions(+), 8 deletions(-)

Comments

Ling, WeiX Aug. 4, 2021, 3:02 a.m. UTC | #1
> -----Original Message-----
> From: Ling, WeiX <weix.ling@intel.com>
> Sent: Wednesday, August 4, 2021 10:52 AM
> To: dts@dpdk.org
> Cc: Ling, WeiX <weix.ling@intel.com>
> Subject: [dts][PATCH V1] tests/pvp_vhost_user_reconnect: add bind_dev
> parameter in start_vms
> 
Tested-by: Wei Ling <weix.ling@intel.com>
Wang, Yinan Aug. 4, 2021, 6:19 a.m. UTC | #2
Acked-by:  Yinan Wang <yinan.wang@intel.com>

> -----Original Message-----
> From: dts <dts-bounces@dpdk.org> On Behalf Of Ling, WeiX
> Sent: 2021?8?4? 11:02
> To: dts@dpdk.org
> Subject: Re: [dts] [PATCH V1] tests/pvp_vhost_user_reconnect: add
> bind_dev parameter in start_vms
> 
> > -----Original Message-----
> > From: Ling, WeiX <weix.ling@intel.com>
> > Sent: Wednesday, August 4, 2021 10:52 AM
> > To: dts@dpdk.org
> > Cc: Ling, WeiX <weix.ling@intel.com>
> > Subject: [dts][PATCH V1] tests/pvp_vhost_user_reconnect: add bind_dev
> > parameter in start_vms
> >
> Tested-by: Wei Ling <weix.ling@intel.com>
Wang, Yinan Aug. 13, 2021, 12:18 a.m. UTC | #3
Acked-by:  Yinan Wang <yinan.wang@intel.com>

> -----Original Message-----
> From: dts <dts-bounces@dpdk.org> On Behalf Of Ling, WeiX
> Sent: 2021?8?4? 11:02
> To: dts@dpdk.org
> Subject: Re: [dts] [PATCH V1] tests/pvp_vhost_user_reconnect: add
> bind_dev parameter in start_vms
> 
> > -----Original Message-----
> > From: Ling, WeiX <weix.ling@intel.com>
> > Sent: Wednesday, August 4, 2021 10:52 AM
> > To: dts@dpdk.org
> > Cc: Ling, WeiX <weix.ling@intel.com>
> > Subject: [dts][PATCH V1] tests/pvp_vhost_user_reconnect: add bind_dev
> > parameter in start_vms
> >
> Tested-by: Wei Ling <weix.ling@intel.com>
diff mbox series

Patch

diff --git a/tests/TestSuite_pvp_vhost_user_reconnect.py b/tests/TestSuite_pvp_vhost_user_reconnect.py
index 4be19c5a..4b28f9d0 100644
--- a/tests/TestSuite_pvp_vhost_user_reconnect.py
+++ b/tests/TestSuite_pvp_vhost_user_reconnect.py
@@ -164,7 +164,7 @@  class TestPVPVhostUserReconnect(TestCase):
                     'in this suite, please config it in vhost_sample.cfg file')
         self.checked_vm = True
 
-    def start_vms(self, packed=False):
+    def start_vms(self, packed=False, bind_dev=True):
         """
         start two VM
         """
@@ -186,7 +186,7 @@  class TestPVPVhostUserReconnect(TestCase):
 
             try:
                 vm_dut = None
-                vm_dut = vm_info.start()
+                vm_dut = vm_info.start(bind_dev=bind_dev)
                 if vm_dut is None:
                     raise Exception("Set up VM ENV failed")
             except Exception as e:
@@ -223,8 +223,6 @@  class TestPVPVhostUserReconnect(TestCase):
         restore vm interfaces and config intf arp
         """
         for i in range(len(self.vm_dut)):
-            self.vm_dut[i].restore_interfaces()
-            time.sleep(5)
             vm_intf = self.vm_dut[i].ports_info[0]['intf']
             self.vm_dut[i].send_expect("ifconfig %s %s" %
                                        (vm_intf, self.virtio_ip[i]), "#", 10)
@@ -387,7 +385,7 @@  class TestPVPVhostUserReconnect(TestCase):
         self.vm_num = 2
         vm_cycle = 0
         self.launch_testpmd_as_vhost_user_with_no_pci()
-        self.start_vms()
+        self.start_vms(bind_dev=False)
         self.config_vm_intf()
         self.start_iperf()
         self.before_data = self.iperf_result_verify(vm_cycle, 'before reconnet')
@@ -412,7 +410,7 @@  class TestPVPVhostUserReconnect(TestCase):
             self.vm_dut[0].send_expect('rm iperf_server.log', '# ', 10)
             self.vm_dut[1].send_expect('rm iperf_client.log', '# ', 10)
             self.dut.send_expect("killall -s INT qemu-system-x86_64", "# ")
-            self.start_vms()
+            self.start_vms(bind_dev=False)
             self.config_vm_intf()
             self.start_iperf()
             self.reconnect_data = self.iperf_result_verify(vm_cycle, 'reconnet from vm')
@@ -494,7 +492,7 @@  class TestPVPVhostUserReconnect(TestCase):
         self.vm_num = 2
         vm_cycle = 0
         self.launch_testpmd_as_vhost_user_with_no_pci()
-        self.start_vms(packed=True)
+        self.start_vms(packed=True, bind_dev=False)
         self.config_vm_intf()
         self.start_iperf()
         self.before_data = self.iperf_result_verify(vm_cycle, 'before reconnet')
@@ -518,7 +516,7 @@  class TestPVPVhostUserReconnect(TestCase):
             self.vm_dut[0].send_expect('rm iperf_server.log', '# ', 10)
             self.vm_dut[1].send_expect('rm iperf_client.log', '# ', 10)
             self.dut.send_expect("killall -s INT qemu-system-x86_64", "# ")
-            self.start_vms(packed=True)
+            self.start_vms(packed=True, bind_dev=False)
             self.config_vm_intf()
             self.start_iperf()
             self.reconnect_data = self.iperf_result_verify(vm_cycle, 'reconnet from vm')