From Fedora Project Wiki

Line 42: Line 42:


== Expected Results ==
== Expected Results ==
Make sure every virtual function enabled has names of the form pci<slot>#<port>_<virtual function instance>
.

Revision as of 13:06, 17 January 2011

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 here - http://fedoraproject.org/wiki/Test_Day:2009-09-17_Virtualization_SR-IOV.

Setup

1. Plug in a PCI add-in network adapter with SRIOV capability in say PCI Slot 3.

07:00.0 Ethernet controller: Intel Corporation 82576 Gigabit Network Connection (rev 01)
[root@fedora-14-r710 ~]# lspci -s 07:00.0  -n
07:00.0 0200: 8086:10c9 (rev 01)

2. Enable the virtual functions by re-loading the Physical Function driver. This can be automated during system boot by creating the following file and passing 'max_vfs' parameter.

[root@fedora-14-r710 ~]# cat /etc/modprobe.d/igb.conf
options igb max_vfs=2

3. Verify that Virtual Functions are enabled by issuing 'lspci' command.

[root@fedora-14-r710 ~]# 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)

Observe that 'lspci' lists 2 virtual functions for each of the Physical Functions

Howto Test

In the above example, Intel 82576 dual port network adapter, in PCI Slot 3, enables 2 virtual functions for each physical function.

1. Verify that Virtual Function interfaces get the names of the form

[root@fedora-14-r710 ~]# ls /sys/class/net/
em1  em2  em3  em4  lo  pci3#1  pci3#1_0  pci3#1_1  pci3#2  pci3#2_0  pci3#2_1  pci4#1
* 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

Expected Results

Make sure every virtual function enabled has names of the form pci<slot>#<port>_<virtual function instance> .