Description
This test case verifies how network interfaces registered for the Virtual Functions enabled by network adapters with SRIOV capability. For more information on SRIOV and how to enable Virtual Functions can be found on Virtualization_SRIOV.
Setup
- Plug in a PCI add-in network adapter with SRIOV capability. In this example, we'll choose PCI Slot 3.
07:00.0 Ethernet controller: Intel Corporation 82576 Gigabit Network Connection (rev 01) # lspci -s 07:00.0 -n 07:00.0 0200: 8086:10c9 (rev 01)
- Enable the virtual functions by re-loading the Physical Function driver with
max_vfs=2
, if you have already booted into the Live Image.[root@fedora-14-r710 ~]# modprobe -r igb [root@fedora-14-r710 ~]# modprobe igb max_vfs=2
The commnad line paramter can be provided to
igb
while booting into the Live Image by passingigb.max_vfs=2
to enable 2 virtual functions. At the bootloader screen, press Tab to edit the boot arguments and appendigb.max_vfs=2
- Verify that Virtual Functions are enabled by issuing the command
lspci
. In thelspci
output, observe that 2 virtual functions for each of the Physical Functions is listed. For example:# lspci | grep -i ether 07:00.0 Ethernet controller: Intel Corporation 82576 Gigabit Network Connection (rev 01) 07:00.1 Ethernet controller: Intel Corporation 82576 Gigabit Network Connection (rev 01) 07:10.0 Ethernet controller: Intel Corporation 82576 Virtual Function (rev 01) 07:10.1 Ethernet controller: Intel Corporation 82576 Virtual Function (rev 01) 07:10.2 Ethernet controller: Intel Corporation 82576 Virtual Function (rev 01) 07:10.3 Ethernet controller: Intel Corporation 82576 Virtual Function (rev 01)
How to test
In the above example, Intel 82576 dual port network adapter, in PCI Slot 3, enables 2 virtual functions for each physical function.
- Verify that Virtual Function interfaces get the names of the form:
pci<slot>#<port>_<virtual-function-instance>
. This can be confirmed by the commandls /sys/class/net/
.
Expected Results
- Make sure every virtual function enabled has names of the form:
pci<slot>#<port>_<virtual-function-instance>
. Sample expected output is listed below.
# ls /sys/class/net/ lo pci3#1 pci3#1_0 pci3#1_1 pci3#2 pci3#2_0 pci3#2_1 pci4#1
The above virtual function interface names are described in detail below.
* pci3#1_0 - Add-in network interface on PCI Slot 3, Port 1, Virtual Function Instance 0 * pci3#1_1 - Add-in network interface on PCI Slot 3, Port 1, Virtual Function Instance 1 * pci3#2_0 - Add-in network interface on PCI Slot 3, Port 2, Virtual Function Instance 0 * pci3#2_1 - Add-in network interface on PCI Slot 3, Port 2, Virtual Function Instance 1