From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by dpdk.org (Postfix) with ESMTP id 9062F8DB4 for ; Tue, 22 Dec 2015 07:05:46 +0100 (CET) Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by orsmga101.jf.intel.com with ESMTP; 21 Dec 2015 22:05:46 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.20,463,1444719600"; d="scan'208";a="878789170" Received: from unknown (HELO dpdk-fedora20.icx.intel.com) ([10.238.55.12]) by fmsmga002.fm.intel.com with ESMTP; 21 Dec 2015 22:05:45 -0800 From: "xu,huilong" To: dts@dpdk.org Date: Tue, 22 Dec 2015 14:01:18 +0800 Message-Id: <1450764078-91540-3-git-send-email-huilongx.xu@intel.com> X-Mailer: git-send-email 1.9.3 In-Reply-To: <1450764078-91540-1-git-send-email-huilongx.xu@intel.com> References: <1450764078-91540-1-git-send-email-huilongx.xu@intel.com> Subject: [dts] [PATCH V2 3/3] used create_portmap get portmap X-BeenThere: dts@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: test suite reviews and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 Dec 2015 06:05:47 -0000 when not config ports in ./config/port.cfg for vm port, used ping6 auto get portmap Signed-off-by: xu,huilong --- framework/virt_dut.py | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/framework/virt_dut.py b/framework/virt_dut.py index 8d0c5d9..108fef6 100644 --- a/framework/virt_dut.py +++ b/framework/virt_dut.py @@ -98,6 +98,10 @@ 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() + return port_num = len(self.ports_info) self.ports_map = [-1] * port_num for key in self.ports_cfg.keys(): @@ -136,7 +140,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 +176,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