* [dts] [PATCH V1 2/3] remove auto_portmap parameter
2015-12-22 3:15 [dts] [PATCH V1 1/3] add exec permissions for qemu-ga-client and qmp xu,huilong
@ 2015-12-22 3:15 ` xu,huilong
2015-12-22 3:15 ` [dts] [PATCH V1 3/3] used create_portmap get portmap xu,huilong
1 sibling, 0 replies; 3+ messages in thread
From: xu,huilong @ 2015-12-22 3:15 UTC (permalink / raw)
To: dts
remove auto_portmap parameter when init virt dut.
because set portmap by crete_portmap function
Signed-off-by: xu,huilong <huilongx.xu@intel.com>
---
framework/virt_base.py | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/framework/virt_base.py b/framework/virt_base.py
index 4a445d1..1d0c282 100644
--- a/framework/virt_base.py
+++ b/framework/virt_base.py
@@ -224,7 +224,7 @@ class VirtBase(object):
self.load_global_config()
self.load_local_config(self.suite)
- def start(self, load_config=True, set_target=True, cpu_topo='', auto_portmap=True, bind_dev=True):
+ def start(self, load_config=True, set_target=True, cpu_topo='', bind_dev=True):
"""
Start VM and instantiate the VM with VirtDut.
"""
@@ -238,7 +238,7 @@ class VirtBase(object):
self._start_vm()
# connect vm dut and init running environment
- vm_dut = self.instantiate_vm_dut(set_target, cpu_topo, auto_portmap)
+ vm_dut = self.instantiate_vm_dut(set_target, cpu_topo)
except Exception as vm_except:
if self.handle_exception(vm_except):
print dts.RED("Handled expection " + str(type(vm_except)))
@@ -293,7 +293,7 @@ class VirtBase(object):
"""
NotImplemented
- def instantiate_vm_dut(self, set_target=True, cpu_topo='', auto_portmap=True, bind_dev=True):
+ def instantiate_vm_dut(self, set_target=True, cpu_topo='', bind_dev=True):
"""
Instantiate the Dut class for VM.
"""
@@ -341,7 +341,7 @@ class VirtBase(object):
try:
# setting up dpdk in vm, must call at last
- vm_dut.prerequisites(dts.Package, dts.Patches, auto_portmap)
+ vm_dut.prerequisites(dts.Package, dts.Patches)
if set_target:
target = self.host_dut.target
vm_dut.set_target(target, bind_dev)
--
1.9.3
^ permalink raw reply [flat|nested] 3+ messages in thread
* [dts] [PATCH V1 3/3] used create_portmap get portmap
2015-12-22 3:15 [dts] [PATCH V1 1/3] add exec permissions for qemu-ga-client and qmp xu,huilong
2015-12-22 3:15 ` [dts] [PATCH V1 2/3] remove auto_portmap parameter xu,huilong
@ 2015-12-22 3:15 ` xu,huilong
1 sibling, 0 replies; 3+ messages in thread
From: xu,huilong @ 2015-12-22 3:15 UTC (permalink / raw)
To: dts
when not config ports in ./config/port.cfg for vm port, used ping6 auto get portmap
Signed-off-by: xu,huilong <huilongx.xu@intel.com>
---
framework/virt_dut.py | 14 ++++++--------
1 file changed, 6 insertions(+), 8 deletions(-)
diff --git a/framework/virt_dut.py b/framework/virt_dut.py
index 8d0c5d9..2f02d9a 100644
--- a/framework/virt_dut.py
+++ b/framework/virt_dut.py
@@ -98,6 +98,9 @@ class VirtDut(DPDKdut):
return
def create_portmap(self):
+ # if not config ports in vm port config file, used ping6 get portmap
+ if not self.ports_cfg:
+ self.map_available_ports()
port_num = len(self.ports_info)
self.ports_map = [-1] * port_num
for key in self.ports_cfg.keys():
@@ -136,7 +139,7 @@ class VirtDut(DPDKdut):
if bind_dev:
self.bind_interfaces_linux('igb_uio')
- def prerequisites(self, pkgName, patch, auto_portmap):
+ def prerequisites(self, pkgName, patch):
"""
Prerequest function should be called before execute any test case.
Will call function to scan all lcore's information which on DUT.
@@ -172,18 +175,13 @@ class VirtDut(DPDKdut):
# no need to rescan ports for guest os just bootup
# load port infor from config file
- if auto_portmap is False:
- self.load_portconf()
+ self.load_portconf()
# enable tester port ipv6
self.host_dut.enable_tester_ipv6()
self.mount_procfs()
- if auto_portmap:
- # auto detect network topology
- self.map_available_ports()
- else:
- self.create_portmap()
+ self.create_portmap()
# disable tester port ipv6
self.host_dut.disable_tester_ipv6()
--
1.9.3
^ permalink raw reply [flat|nested] 3+ messages in thread