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 437367EEF for ; Wed, 11 Feb 2015 13:41:22 +0100 (CET) Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga103.fm.intel.com with ESMTP; 11 Feb 2015 04:34:14 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.09,558,1418112000"; d="scan'208";a="676308688" Received: from pgsmsx101.gar.corp.intel.com ([10.221.44.78]) by fmsmga002.fm.intel.com with ESMTP; 11 Feb 2015 04:41:17 -0800 Received: from shsmsx151.ccr.corp.intel.com (10.239.6.50) by PGSMSX101.gar.corp.intel.com (10.221.44.78) with Microsoft SMTP Server (TLS) id 14.3.195.1; Wed, 11 Feb 2015 20:41:17 +0800 Received: from shsmsx101.ccr.corp.intel.com ([169.254.1.192]) by SHSMSX151.ccr.corp.intel.com ([169.254.3.209]) with mapi id 14.03.0195.001; Wed, 11 Feb 2015 20:41:15 +0800 From: "Qiu, Michael" To: David Marchand Thread-Topic: [PATCH] eal_pci: Fix max_vfs missing for none igb_uio driver Thread-Index: AQHQRetNnDWfovZkIEy+wED0dH9Vrg== Date: Wed, 11 Feb 2015 12:41:15 +0000 Message-ID: <533710CFB86FA344BFBF2D6802E60286CE8256@SHSMSX101.ccr.corp.intel.com> References: <1423653001-11660-1-git-send-email-michael.qiu@intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 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:41:22 -0000 On 2/11/2015 8:32 PM, David Marchand wrote:=0A= > Hello Michael, =0A= >=0A= > On Wed, Feb 11, 2015 at 12:10 PM, Michael Qiu > wrote:=0A= >=0A= > max_vfs will only be created by igb_uio driver, for other=0A= > drivers like vfio or pci_uio_generic, max_vfs will miss.=0A= >=0A= > But sriov_numvfs is not driver related, just get the vf numbers=0A= > from that field.=0A= >=0A= > Signed-off-by: Michael Qiu >=0A= > ---=0A= > lib/librte_eal/linuxapp/eal/eal_pci.c | 2 +-=0A= > 1 file changed, 1 insertion(+), 1 deletion(-)=0A= >=0A= > diff --git a/lib/librte_eal/linuxapp/eal/eal_pci.c=0A= > b/lib/librte_eal/linuxapp/eal/eal_pci.c=0A= > index 1f43688..3da4b69 100644=0A= > --- a/lib/librte_eal/linuxapp/eal/eal_pci.c=0A= > +++ b/lib/librte_eal/linuxapp/eal/eal_pci.c=0A= > @@ -305,7 +305,7 @@ pci_scan_one(const char *dirname, uint16_t=0A= > domain, uint8_t bus,=0A= >=0A= > /* get max_vfs */=0A= > dev->max_vfs =3D 0;=0A= > - snprintf(filename, sizeof(filename), "%s/max_vfs", dirname);= =0A= > + snprintf(filename, sizeof(filename), "%s/sriov_numvfs",=0A= > dirname);=0A= > if (!access(filename, F_OK) &&=0A= > eal_parse_sysfs_value(filename, &tmp) =3D=3D 0) {=0A= > dev->max_vfs =3D (uint16_t)tmp;=0A= >=0A= >=0A= > Not too sure about this change.=0A= > Quickly looked, and as far as I can see, sriov_numvfs has been=0A= > introduced by 1789382a ("PCI: SRIOV control and status via sysfs").=0A= >=0A= > Won't your change break anything that uses a kernel < 3.8 (not=0A= > backported) ?=0A= =0A= OK, you are right, I will fix this in v2, actually it will break nothing=0A= as the code already done accessing check.=0A= =0A= But not enough, for kernel version less than 3.8 and driver is igb_uio,=0A= it is indeed not suitable for leaving max_vfs zero.=0A= =0A= BTW, for kernel version less than 3.8 and driver is vfio or=0A= pci_uio_generic, how could we fill this field?=0A= =0A= Thanks,=0A= Michael=0A= >=0A= >=0A= > -- =0A= > David Marchand=0A= =0A=