[V1] tests/pvp_vhost_user_reconnect: add bind_dev parameter in start_vms
Commit Message
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
> -----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>
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>
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>
> -----Original Message-----
> From: dts <dts-bounces@dpdk.org> On Behalf Of Wang, Yinan
> Sent: 2021年8月13日 8:19
> To: Ling, WeiX <weix.ling@intel.com>; dts@dpdk.org
> Subject: Re: [dts] [PATCH V1] tests/pvp_vhost_user_reconnect: add bind_dev
> parameter in start_vms
>
> 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>
Applied
@@ -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')