From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by dpdk.org (Postfix) with ESMTP id B7BB6A2F for ; Mon, 9 Nov 2015 08:51:21 +0100 (CET) Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga103.fm.intel.com with ESMTP; 08 Nov 2015 23:51:20 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.20,265,1444719600"; d="scan'208";a="596728107" Received: from shvmail01.sh.intel.com ([10.239.29.42]) by FMSMGA003.fm.intel.com with ESMTP; 08 Nov 2015 23:51:21 -0800 Received: from shecgisg004.sh.intel.com (shecgisg004.sh.intel.com [10.239.29.89]) by shvmail01.sh.intel.com with ESMTP id tA97pIad007812; Mon, 9 Nov 2015 15:51:18 +0800 Received: from shecgisg004.sh.intel.com (localhost [127.0.0.1]) by shecgisg004.sh.intel.com (8.13.6/8.13.6/SuSE Linux 0.8) with ESMTP id tA97pG4W031648; Mon, 9 Nov 2015 15:51:18 +0800 Received: (from yliu84x@localhost) by shecgisg004.sh.intel.com (8.13.6/8.13.6/Submit) id tA97pGY2031644; Mon, 9 Nov 2015 15:51:16 +0800 From: Yong Liu To: dts@dpdk.org Date: Mon, 9 Nov 2015 15:51:15 +0800 Message-Id: <1447055475-31611-1-git-send-email-yong.liu@intel.com> X-Mailer: git-send-email 1.7.4.1 Subject: [dts] [PATCH] framework virt_dut: fix virtual dut update port failed 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: Mon, 09 Nov 2015 07:51:22 -0000 From: Marvin Liu Host port may not contain VF devices, so before compare need check VF devices existed. Signed-off-by: Marvin Liu diff --git a/framework/virt_dut.py b/framework/virt_dut.py index 529a2b1..844d193 100644 --- a/framework/virt_dut.py +++ b/framework/virt_dut.py @@ -318,11 +318,14 @@ class VirtDut(DPDKdut): # search host port info structure for hostport in self.host_dut.ports_info: # update port numa - if hostpci == hostport['pci'] or \ - hostpci in hostport['sriov_vfs_pci']: + if hostpci == hostport['pci']: port['numa'] = hostport['numa'] port['port'].socket = hostport['numa'] break + if 'sriov_vfs_pci' in hostport and \ + hostpci in hostport['sriov_vfs_pci']: + port['numa'] = hostport['numa'] + port['port'].socket = hostport['numa'] break def map_available_ports(self): -- 1.9.3