Question about ixgbe and ixgbevf
Bjørn Mork
bjorn at mork.no
Mon Mar 23 05:56:45 EDT 2015
Kevin Wilson <wkevils at gmail.com> writes:
> Hi,
> I have an x86_64 machine (F21) on which ixgbevf is not loaded.
> I notices that when running
> modprobe ixgbevf max_vfs = 10 (or any other number), this triggers
> loading of ixgbevf driver.
> I will appreciate if someone can exaplain the implementation details
> of how does this happen.
> I could not find what in the ixgbe driver code triggers this action
max_vfs is a deprecated method for setting an initial value for
adapter->num_vfs. You'll normally use sysfs to add VFs today.
If you look at this extremely over-long ixgbe_probe() function in
ixgbe_main.c then you'll find this:
pci_sriov_set_totalvfs(pdev, IXGBE_MAX_VFS_DRV_LIMIT);
ixgbe_enable_sriov(adapter);
... and then looking at ixgbe_enable_sriov() in ixgbe_sriov.c :
err = pci_enable_sriov(adapter->pdev, adapter->num_vfs);
If you're interested in the gory details here, then I suggest looking at
Documentation/PCI/pci-iov-howto.txt . But it is sufficient to know that
this creates a number of new PCI devices with IDs which is then matched
by the ixgbevf driver. That driver will then be autoloaded and probed
for all the new VF PCI devices, just like any other hotplugged PCI
device works.
Bjørn
More information about the Kernelnewbies
mailing list