From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by dpdk.org (Postfix) with ESMTP id 265AA952 for ; Tue, 22 Dec 2015 04:19:40 +0100 (CET) Received: from orsmga003.jf.intel.com ([10.7.209.27]) by orsmga103.jf.intel.com with ESMTP; 21 Dec 2015 19:19:41 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.20,462,1444719600"; d="scan'208";a="712465986" Received: from unknown (HELO dpdk-fedora20.icx.intel.com) ([10.238.55.12]) by orsmga003.jf.intel.com with ESMTP; 21 Dec 2015 19:19:40 -0800 From: "xu,huilong" To: dts@dpdk.org Date: Tue, 22 Dec 2015 11:15:12 +0800 Message-Id: <1450754112-91268-3-git-send-email-huilongx.xu@intel.com> X-Mailer: git-send-email 1.9.3 In-Reply-To: <1450754112-91268-1-git-send-email-huilongx.xu@intel.com> References: <1450754112-91268-1-git-send-email-huilongx.xu@intel.com> Subject: [dts] [PATCH V1 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 03:19:41 -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 | 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