diff mbox series

[V1] framework/virt_base: add bind_dev parameter in start VM method

Message ID 20210727062933.4089848-1-weix.ling@intel.com (mailing list archive)
State Accepted
Headers show
Series [V1] framework/virt_base: add bind_dev parameter in start VM method | expand

Commit Message

Ling, WeiX July 27, 2021, 6:29 a.m. UTC
In VM, no need to bind the nic to DPDK sometimes, 
so add bind_dev parameter in the start VM method.

Signed-off-by: Wei Ling <weix.ling@intel.com>
---
 framework/virt_base.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Ling, WeiX July 27, 2021, 7:46 a.m. UTC | #1
> -----Original Message-----
> From: Ling, WeiX <weix.ling@intel.com>
> Sent: Tuesday, July 27, 2021 02:30 PM
> To: dts@dpdk.org
> Cc: Ling, WeiX <weix.ling@intel.com>
> Subject: [dts][PATCH V1] framework/virt_base: add bind_dev parameter in
> start VM method
> 
Tested-by: Wei Ling <weix.ling@intel.com>
Wang, Yinan July 29, 2021, 5:04 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?7?27? 15:46
> To: dts@dpdk.org
> Subject: Re: [dts] [PATCH V1] framework/virt_base: add bind_dev parameter
> in start VM method
> 
> > -----Original Message-----
> > From: Ling, WeiX <weix.ling@intel.com>
> > Sent: Tuesday, July 27, 2021 02:30 PM
> > To: dts@dpdk.org
> > Cc: Ling, WeiX <weix.ling@intel.com>
> > Subject: [dts][PATCH V1] framework/virt_base: add bind_dev parameter in
> > start VM method
> >
> Tested-by: Wei Ling <weix.ling@intel.com>
Tu, Lijuan Aug. 10, 2021, 8:55 a.m. UTC | #3
> -----Original Message-----
> From: dts <dts-bounces@dpdk.org> On Behalf Of Wang, Yinan
> Sent: 2021年7月29日 13:05
> To: Ling, WeiX <weix.ling@intel.com>; dts@dpdk.org
> Subject: Re: [dts] [PATCH V1] framework/virt_base: add bind_dev parameter in
> start VM method
> 
> Acked-by:  Yinan Wang <yinan.wang@intel.com>
> 
> > -----Original Message-----
> > From: dts <dts-bounces@dpdk.org> On Behalf Of Ling, WeiX
> > Sent: 2021?7?27? 15:46
> > To: dts@dpdk.org
> > Subject: Re: [dts] [PATCH V1] framework/virt_base: add bind_dev
> > parameter in start VM method
> >
> > > -----Original Message-----
> > > From: Ling, WeiX <weix.ling@intel.com>
> > > Sent: Tuesday, July 27, 2021 02:30 PM
> > > To: dts@dpdk.org
> > > Cc: Ling, WeiX <weix.ling@intel.com>
> > > Subject: [dts][PATCH V1] framework/virt_base: add bind_dev parameter
> > > in start VM method
> > >
> > Tested-by: Wei Ling <weix.ling@intel.com>

Applied, thanks
diff mbox series

Patch

diff --git a/framework/virt_base.py b/framework/virt_base.py
index b582f855..f19cbc4b 100644
--- a/framework/virt_base.py
+++ b/framework/virt_base.py
@@ -275,7 +275,7 @@  class VirtBase(object):
         self._attach_vm()
         return None
 
-    def start(self, load_config=True, set_target=True, cpu_topo=''):
+    def start(self, load_config=True, set_target=True, cpu_topo='', bind_dev=True):
         """
         Start VM and instantiate the VM with VirtDut.
         """
@@ -290,7 +290,7 @@  class VirtBase(object):
 
             if self.vm_status is ST_RUNNING:
                 # connect vm dut and init running environment
-                vm_dut = self.instantiate_vm_dut(set_target, cpu_topo, autodetect_topo=True)
+                vm_dut = self.instantiate_vm_dut(set_target, cpu_topo, bind_dev=bind_dev, autodetect_topo=True)
             else:
                 vm_dut = None