How to enable SR-IOV virtual function on Intel ixgbe NIC

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).

After updating GRUB configuration, reboot to activate the change.

Download this article as ad-free PDF (made possible by your kind donation): 
Download PDF

Subscribe to Ask Xmodulo

Do you want to receive Linux related questions & answers published at Ask Xmodulo? Enter your email address below, and we will deliver our Linux Q&A straight to your email box, for free. Delivery powered by Google Feedburner.

Support Xmodulo

Did you find this tutorial helpful? Then please be generous and support Xmodulo!

One thought on “How to enable SR-IOV virtual function on Intel ixgbe NIC

Leave a comment

Your email address will not be published. Required fields are marked *