Question: I want to create virtual functions on an Intel ixgbe NIC port. How can I enable SR-IOV virtual function on an ixgbe NIC interface?

SR-IOV is a technology which allows a single PCIe (PCI Express) device to emulate multiple separate PCIe devices. The emulated PCIe functions are called "virtual functions" (VFs), while the original PCIe device functions are called "physical functions" (PFs). SR-IOV is typically used in I/O virtualization environment, where a single PCIe device needs to be shared among multiple virtual machines.

To enable SR-IOV VF on Intel ixgbe NIC, you need to pass an additional parameter "max_vfs=N" to ixgbe kernel module, where "N" is the number of VFs to create per port. To pass this parameter:

On Ubuntu, Debian or Linux Mint:

$ sudo vi /etc/modprobe.d/ixgbe.conf

options ixgbe max_vfs=8

On CentOS, Fedora or RHEL:

$ sudo vi /etc/modprobe.conf

options ixgbe max_vfs=8

Finally, reboot the machine to activate VFs.

To check if SR-IOV VF is successfully enabled, use the following command.

$ lspci | grep -i ethernet

The Ethernet interfaces labeled with "Virtual Function" are VF interfaces.

If the above method fails to enable VFs, another method is to add "ixgbe.max_vfs=N" to the kernel parameter list in /boot/grub/grub.cfg (or /boot/grub/grub.conf).