Question about ixgbe and ixgbevf
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 Regards, Kevni
Hey Kevin, This is basically because of udevd calling modprobe when the new VFs are created. The code in the ixgbe driver that causes the VFs to be created would be the function call "pci_enable_sriov()". This brings about a chain of events resulting in the ixgbevf getting loaded. I assume you want to assign the VFs to VMs rather than have ixgbevf load and take control of the VFs. So, you will have to black list the ixgbevf driver in your host operating system. For more information on the udev, udevd and modprobe check out (section 7.4.2.4) : http://www.linuxfromscratch.org/lfs/view/6.4/chapter07/udev.html - Biju On Mon, Mar 23, 2015 at 11:15 AM, Kevin Wilson <wkevils@gmail.com> wrote:
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
Regards, Kevni
_______________________________________________ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
Kevin Wilson <wkevils@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
participants (3)
-
Biju Abraham -
Bjørn Mork -
Kevin Wilson