From mboxrd@z Thu Jan 1 00:00:00 1970 From: Michael Qiu Subject: [PATCH] eal_pci: Fix max_vfs missing for none igb_uio driver Date: Wed, 11 Feb 2015 19:10:01 +0800 Message-ID: <1423653001-11660-1-git-send-email-michael.qiu@intel.com> To: dev-VfR2kkLFssw@public.gmane.org Return-path: List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces-VfR2kkLFssw@public.gmane.org Sender: "dev" max_vfs will only be created by igb_uio driver, for other drivers like vfio or pci_uio_generic, max_vfs will miss. But sriov_numvfs is not driver related, just get the vf numbers from that field. Signed-off-by: Michael Qiu --- lib/librte_eal/linuxapp/eal/eal_pci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/librte_eal/linuxapp/eal/eal_pci.c b/lib/librte_eal/linuxapp/eal/eal_pci.c index 1f43688..3da4b69 100644 --- a/lib/librte_eal/linuxapp/eal/eal_pci.c +++ b/lib/librte_eal/linuxapp/eal/eal_pci.c @@ -305,7 +305,7 @@ pci_scan_one(const char *dirname, uint16_t domain, uint8_t bus, /* get max_vfs */ dev->max_vfs = 0; - snprintf(filename, sizeof(filename), "%s/max_vfs", dirname); + snprintf(filename, sizeof(filename), "%s/sriov_numvfs", dirname); if (!access(filename, F_OK) && eal_parse_sysfs_value(filename, &tmp) == 0) { dev->max_vfs = (uint16_t)tmp; -- 1.9.3