[dpdk-dev] [PATCH v2] eal_pci: Fix max_vfs missing for none igb_uio driver
Thomas Monjalon
thomas.monjalon at 6wind.com
Thu Feb 12 17:25:05 CET 2015
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 <michael.qiu at intel.com>
[...]
> 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 */
>
More information about the dev
mailing list