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 12FA9C5A0 for ; Tue, 28 Jul 2015 03:58:08 +0200 (CEST) Received: from orsmga001.jf.intel.com ([10.7.209.18]) by fmsmga103.fm.intel.com with ESMTP; 27 Jul 2015 18:58:08 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.15,559,1432623600"; d="scan'208";a="736814631" Received: from shvmail01.sh.intel.com ([10.239.29.42]) by orsmga001.jf.intel.com with ESMTP; 27 Jul 2015 18:58:07 -0700 Received: from shecgisg003.sh.intel.com (shecgisg003.sh.intel.com [10.239.29.90]) by shvmail01.sh.intel.com with ESMTP id t6S1w5e1003063; Tue, 28 Jul 2015 09:58:05 +0800 Received: from shecgisg003.sh.intel.com (localhost [127.0.0.1]) by shecgisg003.sh.intel.com (8.13.6/8.13.6/SuSE Linux 0.8) with ESMTP id t6S1w2md008350; Tue, 28 Jul 2015 09:58:04 +0800 Received: (from yliu84x@localhost) by shecgisg003.sh.intel.com (8.13.6/8.13.6/Submit) id t6S1w25D008346; Tue, 28 Jul 2015 09:58:02 +0800 From: Yong Liu To: dts@dpdk.org Date: Tue, 28 Jul 2015 09:58:02 +0800 Message-Id: <1438048682-8314-1-git-send-email-yong.liu@intel.com> X-Mailer: git-send-email 1.7.4.1 Subject: [dts] [PATCH] fix bug that vf device do not have sysfs attribute sriov_numvfs 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, 28 Jul 2015 01:58:09 -0000 From: Marvin Liu Signed-off-by: Marvin Liu diff --git a/framework/net_device.py b/framework/net_device.py index 6796269..9afa6ca 100644 --- a/framework/net_device.py +++ b/framework/net_device.py @@ -518,6 +518,10 @@ class NetDevice(object): "cat /sys/bus/pci/devices/0000\:%s\:%s/sriov_numvfs" % (bus_id, devfun_id), "# ") sriov_vfs_pci = [] + + if "No such file" in sriov_numvfs: + return sriov_vfs_pci + if int(sriov_numvfs) == 0: pass else: -- 1.9.3