From Fedora Project Wiki

(Convert to use test case template, and move into proper category)
Line 1: Line 1:
== Description ==
{{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 here - [http://fedoraproject.org/wiki/Test_Day:2009-09-17_Virtualization_SR-IOV Virtualization_SRIOV]
|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=
== Setup ==
<ol>
 
<li> Plug in a PCI add-in network adapter with SRIOV capability.  In this example, we'll choose PCI Slot 3.
1. Plug in a PCI add-in network adapter with SRIOV capability in say 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)
[root@fedora-14-r710 ~]# lspci -s 07:00.0  -n
# lspci -s 07:00.0  -n
07:00.0 0200: 8086:10c9 (rev 01)</pre>
07:00.0 0200: 8086:10c9 (rev 01)</pre>


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.
<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>[root@fedora-14-r710 ~]# cat /etc/modprobe.d/igb.conf
<pre># cat << EOF > /etc/modprobe.d/igb.conf
options igb max_vfs=2</pre>
options igb max_vfs=2
EOF</pre>


3. Verify that Virtual Functions are enabled by issuing 'lspci' command.
<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>[root@fedora-14-r710 ~]# lspci | grep -i ether
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>


Observe that 'lspci' lists 2 virtual functions for each of the Physical Functions
|actions=
 
== Howto Test ==


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.  


1. Verify that Virtual Function interfaces get the names of the form  
# 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/}}.


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


== Expected Results ==
}}


Make sure every virtual function enabled has names of the form pci<slot>#<port>_<virtual function instance>
[[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

  1. 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)
  2. 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
  3. Verify that Virtual Functions are enabled by issuing the command lspci. In the lspci 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.

  1. Verify that Virtual Function interfaces get the names of the form: pci<slot>#<port>_<virtual-function-instance>. This can be confirmed by the command ls /sys/class/net/.

Expected Results

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