From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wg0-f52.google.com (mail-wg0-f52.google.com [74.125.82.52]) by dpdk.org (Postfix) with ESMTP id 46DA25949 for ; Thu, 12 Feb 2015 17:25:35 +0100 (CET) Received: by mail-wg0-f52.google.com with SMTP id x12so1333570wgg.11 for ; Thu, 12 Feb 2015 08:25:35 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:organization :user-agent:in-reply-to:references:mime-version :content-transfer-encoding:content-type; bh=u/1yhvlqOkfZgd4SvQcsa8yuIj/X1M6j9lk1WRuGIDQ=; b=HmN2q4+CWj5RzmtAIx//aaR1Z/qle+OM+MHE6980notjhS0PqViODquhlWz+ED+emZ UnAkW9DE2WA299VH0XN99N1xgWtQ5PIk0Mr8ml+B4URFXWUtd9vLL8oTiEfzkFUGE/ri X1iKOcKJuLP8RyY0jNLrLrrhbSl2K4wj6YnVSL/DxNR4sY38l3Lq3b3wBpLxL2Gwq9Yc nx5CLNyRWcK5DM9UfoyUVFH4V3LjfqYEWjcynrMv9O/7IHGotXLK/fkOju8joOeT+dbC eFEv90jHwPL59K/X1BayrIny6Abq480yT0SIPZDSq2STEvkxNkH6Hw2o6qNbPkNsuCy8 JJgQ== X-Gm-Message-State: ALoCoQlwQnP1+5V+KGzjswyLaPj1kd2PH9BvTHB5z2SV8bOBjm/GmWiia0jM0cnmAsgzDBNx4Vvs X-Received: by 10.180.206.98 with SMTP id ln2mr7601344wic.94.1423758335058; Thu, 12 Feb 2015 08:25:35 -0800 (PST) Received: from xps13.localnet (136-92-190-109.dsl.ovh.fr. [109.190.92.136]) by mx.google.com with ESMTPSA id a1sm3172569wiy.10.2015.02.12.08.25.33 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 12 Feb 2015 08:25:34 -0800 (PST) From: Thomas Monjalon To: Michael Qiu Date: Thu, 12 Feb 2015 17:25:05 +0100 Message-ID: <1893948.saDpN2FujX@xps13> Organization: 6WIND User-Agent: KMail/4.14.4 (Linux/3.18.4-1-ARCH; KDE/4.14.4; x86_64; ; ) In-Reply-To: <1423661155-16645-1-git-send-email-michael.qiu@intel.com> References: <1423653001-11660-1-git-send-email-michael.qiu@intel.com> <1423661155-16645-1-git-send-email-michael.qiu@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Cc: dev@dpdk.org Subject: Re: [dpdk-dev] [PATCH v2] 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: Thu, 12 Feb 2015 16:25:35 -0000 2015-02-11 21:25, Michael Qiu: > 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 [...] > snprintf(filename, sizeof(filename), "%s/max_vfs", dirname); > if (!access(filename, F_OK) && > - eal_parse_sysfs_value(filename, &tmp) == 0) { > + eal_parse_sysfs_value(filename, &tmp) == 0) > dev->max_vfs = (uint16_t)tmp; > + else { > + /* for none igb_uio driver, need kernel I think it's a typo. Do you mean "for non igb_uio driver"? > + * version greater than 3.8 */ > + 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; > } > > /* get numa node */ >