From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-ob0-f170.google.com (mail-ob0-f170.google.com [209.85.214.170]) by dpdk.org (Postfix) with ESMTP id 8540A2C7A for ; Wed, 11 Feb 2015 13:32:45 +0100 (CET) Received: by mail-ob0-f170.google.com with SMTP id va2so2863059obc.1 for ; Wed, 11 Feb 2015 04:32:45 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=wKxvWe3oQE9OnadcxySTR6oEG+nhTbXdR2eo9gXsCWE=; b=BPPon0HWr8QSPN1zKRtVB8hHQhTY6lmWMCoTyRiy3CiExR0S069IKZV/gEDOnqI8dM lcxyeVVDEvpqEcDZr00bSgWZGQauS3g5Ttv8v6IemeSW35ewRm8fqzygPuoOmXqSWNu3 dxhMM23/XCEDHtAU8Z8gGFUOkilKfAIIHzQSNC0eor9YgjmlaTexGJQkqQrcTrefSH7N OAO2jvogH6PSYatY+xmJyzIgMb9Etw4JMn/+8BXp00Xd44YQK2qWZ+IdPXAib3FBknRY 60HjAfv/+d/U99Wi8iYkPgdEah4Ig3V9+cCVIzBCW1GZf/ZNsRaaZdhEcH07x/l7UVfX a3rg== X-Gm-Message-State: ALoCoQmUK8mosxmBRv8FoZUZ26PMfFVc5xvNRZAjqMqZy87+0YQTddS4Sjk2CvrRdgK1LEfIsZ6d MIME-Version: 1.0 X-Received: by 10.182.143.42 with SMTP id sb10mr19015833obb.27.1423657964956; Wed, 11 Feb 2015 04:32:44 -0800 (PST) Received: by 10.76.95.198 with HTTP; Wed, 11 Feb 2015 04:32:44 -0800 (PST) In-Reply-To: <1423653001-11660-1-git-send-email-michael.qiu@intel.com> References: <1423653001-11660-1-git-send-email-michael.qiu@intel.com> Date: Wed, 11 Feb 2015 13:32:44 +0100 Message-ID: From: David Marchand To: Michael Qiu Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.15 Cc: "dev@dpdk.org" Subject: Re: [dpdk-dev] [PATCH] eal_pci: Fix max_vfs missing for none igb_uio driver X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 11 Feb 2015 12:32:45 -0000 Hello Michael, On Wed, Feb 11, 2015 at 12:10 PM, Michael Qiu wrote: > 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; > > Not too sure about this change. Quickly looked, and as far as I can see, sriov_numvfs has been introduced by 1789382a ("PCI: SRIOV control and status via sysfs"). Won't your change break anything that uses a kernel < 3.8 (not backported) ? -- David Marchand