From Fedora Project Wiki
(Convert to use test case template, and move into proper category) |
|||
Line 1: | Line 1: | ||
= | {{QA/Test_Case | ||
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 | |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 [[Test_Day:2009-09-17_Virtualization_SR-IOV|Virtualization_SRIOV]]. | ||
|setup= | |||
<ol> | |||
<li> Plug in a PCI add-in network adapter with SRIOV capability. In this example, we'll choose PCI Slot 3. | |||
<pre>07:00.0 Ethernet controller: Intel Corporation 82576 Gigabit Network Connection (rev 01) | <pre>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)</pre> | 07:00.0 0200: 8086:10c9 (rev 01)</pre> | ||
<li> Enable the virtual functions by re-loading the Physical Function driver. This can be automated during system boot using the following command to adjust the <code>max_vfs</code> module parameter. | |||
<pre> | <pre># cat << EOF > /etc/modprobe.d/igb.conf | ||
options igb max_vfs=2</pre> | options igb max_vfs=2 | ||
EOF</pre> | |||
<li> Verify that Virtual Functions are enabled by issuing the command {{command|lspci}}. In the {{command|lspci}} output, observe that 2 virtual functions for each of the Physical Functions is listed. For example: | |||
<pre># lspci | grep -i ether | |||
<pre> | |||
07:00.0 Ethernet controller: Intel Corporation 82576 Gigabit Network Connection (rev 01) | 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:00.1 Ethernet controller: Intel Corporation 82576 Gigabit Network Connection (rev 01) | ||
Line 23: | Line 22: | ||
07:10.2 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)</pre> | 07:10.3 Ethernet controller: Intel Corporation 82576 Virtual Function (rev 01)</pre> | ||
</ol> | |||
|actions= | |||
In the above example, Intel 82576 dual port network adapter, in PCI Slot 3, enables 2 virtual functions for each physical function. | 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: <code>pci<slot>#<port>_<virtual-function-instance></code>. This can be confirmed by the command {{command|ls /sys/class/net/}}. | |||
< | |results= | ||
# Make sure every virtual function enabled has names of the form: <code>pci<slot>#<port>_<virtual-function-instance></code>. Sample expected output is listed below. | |||
<pre># ls /sys/class/net/ | |||
lo pci3#1 pci3#1_0 pci3#1_1 pci3#2 pci3#2_0 pci3#2_1 pci4#1</pre> | lo pci3#1 pci3#1_0 pci3#1_1 pci3#2 pci3#2_0 pci3#2_1 pci4#1</pre> | ||
The above virtual function interface names are described in detail below. | |||
<pre> | <pre> | ||
* pci3#1_0 - Add-in network interface on PCI Slot 3, Port 1, Virtual Function Instance 0 | * pci3#1_0 - Add-in network interface on PCI Slot 3, Port 1, Virtual Function Instance 0 | ||
Line 41: | Line 41: | ||
* pci3#2_1 - Add-in network interface on PCI Slot 3, Port 2, Virtual Function Instance 1</pre> | * pci3#2_1 - Add-in network interface on PCI Slot 3, Port 2, Virtual Function Instance 1</pre> | ||
}} | |||
[[Category:Package biosdevname test cases]] | |||
Revision as of 19:40, 19 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 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. This can be automated during system boot using the following command to adjust the
max_vfs
module parameter.# cat << EOF > /etc/modprobe.d/igb.conf options igb max_vfs=2 EOF
- 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