From: "xu,huilong" <huilongx.xu@intel.com>
To: dts@dpdk.org
Subject: [dts] [PATCH V1 3/3] used create_portmap get portmap
Date: Tue, 22 Dec 2015 11:15:12 +0800 [thread overview]
Message-ID: <1450754112-91268-3-git-send-email-huilongx.xu@intel.com> (raw)
In-Reply-To: <1450754112-91268-1-git-send-email-huilongx.xu@intel.com>
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
prev parent reply other threads:[~2015-12-22 3:19 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
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 [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1450754112-91268-3-git-send-email-huilongx.xu@intel.com \
--to=huilongx.xu@intel.com \
--cc=dts@dpdk.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).