Linux* Base Driver for Intel(R) Network Connection
==================================================

September 18, 2009


Contents
========

- In This Release
- Identifying Your Adapter
- Building and Installation
- Command Line Parameters
- Additional Configurations
- Known Issues/Troubleshooting
- Support


In This Release
===============

This file describes the igbvf Linux* Base Driver for Intel Network Connection.  
This driver supports upstream  kernel versions 2.6.30 (or  higher) x86_64.

Supported Operating Systems: SLES 11 SP1 x86_64, RHEL 5.3/5.4 x86_64.

The igbvf driver supports 82576-based virtual function devices that can only 
be activated on kernels that support SR-IOV. SR-IOV requires the correct 
platform and OS support. 

The igbvf driver requires the igb driver, version 2.0 or later. The igbvf 
driver supports virtual functions generated by the igb driver with a max_vfs 
value of 1 or greater. For more information on the max_vfs parameter refer 
to the README included with the igb driver.

This driver is only supported as a loadable module at this time.  Intel is
not supplying patches against the kernel source to allow for static linking
of the driver.  For questions related to hardware requirements, refer to the
documentation supplied with your Intel Gigabit adapter.  All hardware
requirements listed apply to use with Linux.

Instructions on updating ethtool can be found in the section "Additional
Configurations" later in this document.

VLANs: There is a limit of a total of 32 shared VLANs to 1 or more VFs.

Identifying Your Adapter
========================

For more information on how to identify your adapter, go to the Adapter &
Driver ID Guide at:

    http://support.intel.com/support/go/network/adapter/idguide.htm

For the latest Intel network drivers for Linux, refer to the following
website.  In the search field, enter your adapter name or type, or use the
networking link on the left to search for your adapter:

    http://downloadcenter.intel.com/scripts-df-external/Support_Intel.aspx


Building and Installation
=========================

To build a binary RPM* package of this driver, run 'rpmbuild -tb
<filename.tar.gz>'.  Replace <filename.tar.gz> with the specific filename
of the driver.

NOTE: For the build to work properly, the currently running kernel MUST
      match the version and configuration of the installed kernel sources.
      If you have just recompiled the kernel reboot the system now.

      RPM functionality has only been tested in Red Hat distributions.

1. Move the base driver tar file to the directory of your choice.  For
   example, use /home/username/igbvf or /usr/local/src/igbvf.

2. Untar/unzip archive:

     tar zxf igbvf-x.x.x.tar.gz

3. Change to the driver src directory:

     cd igbvf-x.x.x/src/

4. Compile the driver module:

     make install

   The binary will be installed as:

     /lib/modules/<KERNEL VERSION>/kernel/drivers/net/igbvf/igbvf.[k]o

   The install locations listed above are the default locations.  They
   might not be correct for certain Linux distributions.  

5. Load the module using either the insmod or modprobe command:

     modprobe igbvf

     insmod igbvf

   Note that for 2.6 kernels the insmod command can be used if the full
   path to the driver module is specified.  For example:

     insmod /lib/modules/<KERNEL VERSION>/kernel/drivers/net/igbvf/igbvf.ko

   With 2.6 based kernels also make sure that older igbvf drivers are
   removed from the kernel, before loading the new module:

     rmmod igbvf; modprobe igbvf

6. Assign an IP address to the interface by entering the following, where
   x is the interface number:

     ifconfig ethx <IP_address>

7. Verify that the interface works.  Enter the following, where <IP_address>
   is the IP address for another machine on the same subnet as the
   interface that is being tested:

     ping  <IP_address>


Command Line Parameters
=======================

If the driver is built as a module, the  following optional parameters
are used by entering them on the command line with the modprobe command
using this syntax:

     modprobe igbvf [<option>=<VAL1>,<VAL2>,...]

For example:

     modprobe igbvf InterruptThrottleRate=16000,16000


The default value for each parameter is generally the recommended setting,
unless otherwise noted.

NOTES:  For more information about the InterruptThrottleRate,
        parameter, see the application note at:
        http://www.intel.com/design/network/applnots/ap450.htm

        A descriptor describes a data buffer and attributes related to
        the data buffer.  This information is accessed by the hardware.


InterruptThrottleRate
---------------------
Valid Range:   0,1,3,100-100000 (0=off, 1=dynamic, 3=dynamic conservative)
Default Value: 3

The driver can limit the amount of interrupts per second that the adapter
will generate for incoming packets. It does this by writing a value to the 
adapter that is based on the maximum amount of interrupts that the adapter 
will generate per second.

Setting InterruptThrottleRate to a value greater or equal to 100
will program the adapter to send out a maximum of that many interrupts
per second, even if more packets have come in. This reduces interrupt
load on the system and can lower CPU utilization under heavy load,
but will increase latency as packets are not processed as quickly.

The default behaviour of the driver previously assumed a static 
InterruptThrottleRate value of 8000, providing a good fallback value for 
all traffic types,but lacking in small packet performance and latency. 
The hardware can handle many more small packets per second however, and 
for this reason an adaptive interrupt moderation algorithm was implemented.

The driver has two adaptive modes (setting 1 or 3) in which it dynamically
adjusts the InterruptThrottleRate value based on the traffic that it receives.
After determining the type of incoming traffic in the last timeframe, it will
adjust the InterruptThrottleRate to an appropriate value for that traffic.

The algorithm classifies the incoming traffic every interval into
classes.  Once the class is determined, the InterruptThrottleRate value is 
adjusted to suit that traffic type the best. There are three classes defined: 
"Bulk traffic", for large amounts of packets of normal size; "Low latency",
for small amounts of traffic and/or a significant percentage of small
packets; and "Lowest latency", for almost completely small packets or 
minimal traffic.

In dynamic conservative mode, the InterruptThrottleRate value is set to 4000 
for traffic that falls in class "Bulk traffic". If traffic falls in the "Low 
latency" or "Lowest latency" class, the InterruptThrottleRate is increased 
stepwise to 20000. This default mode is suitable for most applications.

For situations where low latency is vital such as cluster or
grid computing, the algorithm can reduce latency even more when
InterruptThrottleRate is set to mode 1. In this mode, which operates
the same as mode 3, the InterruptThrottleRate will be increased stepwise to 
70000 for traffic in class "Lowest latency".

Setting InterruptThrottleRate to 0 turns off any interrupt moderation
and may improve small packet latency, but is generally not suitable
for bulk throughput traffic.

NOTE:  Dynamic interrupt throttling is only applicable to adapters
       operating in MSI or Legacy interrupt mode, using a single
       receive queue.

NOTE:  When igbvf is loaded with default settings and multiple adapters
       are in use simultaneously, the CPU utilization may increase non-
       linearly.  In order to limit the CPU utilization without impacting
       the overall throughput, we recommend that you load the driver as
       follows:

           modprobe igbvf InterruptThrottleRate=3000,3000,3000

       This sets the InterruptThrottleRate to 3000 interrupts/sec for
       the first, second, and third instances of the driver.  The range
       of 2000 to 3000 interrupts per second works on a majority of
       systems and is a good starting point, but the optimal value will
       be platform-specific.  If CPU utilization is not a concern, use
       default driver settings.


Additional Configurations
=========================


  Configuring the Driver on Different Distributions
  -------------------------------------------------
  Configuring a network driver to load properly when the system is started
  is distribution dependent.  Typically, the configuration process involves
  adding an alias line to /etc/modules.conf or /etc/modprobe.conf as well
  as editing other system startup scripts and/or configuration files.  Many
  popular Linux distributions ship with tools to make these changes for you.
  To learn the proper way to configure a network device for your system,
  refer to your distribution documentation.  If during this process you are
  asked for the driver or module name, the name for the Linux Base Driver
  for the Gigabit Family of Adapters is igbvf.

  As an example, if you install the igbvf driver for two Gigabit adapters 
  (eth0 and eth1) and want to set the interrupt mode to MSI-X and MSI 
  respectively, add the following to modules.conf or /etc/modprobe.conf:

       alias eth0 igbvf
       alias eth1 igbvf
       options igbvf InterruptThrottleRate=3,1


  Viewing Link Messages
  ---------------------
  Link messages will not be displayed to the console if the distribution is
  restricting system messages.  In order to see network driver link messages
  on your console, set dmesg to eight by entering the following:

       dmesg -n 8

  NOTE: This setting is not saved across reboots.


  Jumbo Frames
  ------------
  Jumbo Frames support is enabled by changing the MTU to a value larger than
  the default of 1500.  Use the ifconfig command to increase the MTU size.
  For example:

       ifconfig eth<x> mtu 9000 up

  This setting is not saved across reboots.  It can be made permanent if
  you add:

       MTU=9000

   to the file /etc/sysconfig/network-scripts/ifcfg-eth<x>.  This example
   applies to the Red Hat distributions; other distributions may store this
   setting in a different location.

  Notes:

  - To enable Jumbo Frames, increase the MTU size on the interface beyond
    1500.

  - The maximum MTU setting for Jumbo Frames is 9216.  This value coincides
    with the maximum Jumbo Frames size of 9234 bytes.

  - Using Jumbo Frames at 10 or 100 Mbps may result in poor performance or
    loss of link.


  Ethtool
  -------
  The driver utilizes the ethtool interface for driver configuration and
  diagnostics, as well as displaying statistical information.  Ethtool
  version 3.0 or later is required for this functionality, although we 
  strongly recommend downloading the latest version at:

  http://sourceforge.net/projects/gkernel.


  LRO
  ---
  Large Receive Offload (LRO) is a technique for increasing inbound throughput
  of high-bandwidth network connections by reducing CPU overhead. It works by
  aggregating multiple incoming packets from a single stream into a larger 
  buffer before they are passed higher up the networking stack, thus reducing
  the number of packets that have to be processed. LRO combines multiple 
  Ethernet frames into a single receive in the stack, thereby potentially 
  decreasing CPU utilization for receives.

  NOTE: LRO requires 2.6.24 or later kernel version. You also need to have
  inet_lro enabled via either the CONFIG_INET_LRO or CONFIG_INET_LRO_MODULE 
  kernel config option. Additionally, if CONFIG_INET_LRO_MODULE is used, the
  inet_lro module needs to be loaded before the igbvf driver.

  IGB_LRO is a compile time flag. The user can enable it at compile 
  time to add support for LRO from the driver. The flag is used by adding 
  CFLAGS_EXTRA="-DIGB_LRO" to the make file when it's being compiled. 

     make CFLAGS_EXTRA="-DIGB_LRO" install

  You can verify that the driver is using LRO by looking at these counters in 
  Ethtool:

  lro_aggregated - count of total packets that were combined
  lro_flushed - counts the number of packets flushed out of LRO
  lro_no_desc - counts the number of times an LRO descriptor was not available 
  for the LRO packet

  NOTE: IPv6 and UDP are not supported by LRO.
  
Known Issues/Troubleshooting
============================

  NOTE: After installing the driver, if your Intel Network Connection is not 
  working, verify in the "In This Release" section of the readme that you have 
  installed the correct driver.

  Intel(R) Active Management Technology 2.0, 2.1, 2.5 not supported in 
  conjunction with Linux driver
  ---------------------------------------------------------------------

  Driver Compilation
  ------------------
  When trying to compile the driver by running make install, the following
  error may occur:

    "Linux kernel source not configured - missing version.h"

  To solve this issue, create the version.h file by going to the Linux source
  tree and entering:

    make include/linux/version.h.

  Multiple Interfaces on Same Ethernet Broadcast Network
  ------------------------------------------------------
  Due to the default ARP behavior on Linux, it is not possible to have
  one system on two IP networks in the same Ethernet broadcast domain
  (non-partitioned switch) behave as expected.  All Ethernet interfaces
  will respond to IP traffic for any IP address assigned to the system.
  This results in unbalanced receive traffic.

  If you have multiple interfaces in a server, either turn on ARP
  filtering by entering:

    echo 1 > /proc/sys/net/ipv4/conf/all/arp_filter
  (this only works if your kernel's version is higher than 2.4.5),

  NOTE: This setting is not saved across reboots.  The configuration
  change can be made permanent by adding the line:
    net.ipv4.conf.all.arp_filter = 1
  to the file /etc/sysctl.conf

      or,

  install the interfaces in separate broadcast domains (either in
  different switches or in a switch partitioned to VLANs).

  Do Not Use LRO When Routing Packets
  -----------------------------------
  Due to a known general compatibility issue with LRO and routing, do not use
  LRO when routing packets.

  Build error with Asianux 3.0 - redefinition of typedef 'irq_handler_t'
  ---------------------------------------------------------------------
  Some systems may experience build issues due to redefinition of irq_handler_t.  
  To resolve this issue build the driver (step 4 above) using the command:

    make CFLAGS_EXTRA=-DAX_RELEASE_CODE=1 install

  MSI-X Issues with Kernels between 2.6.19 - 2.6.21 (inclusive)
  -------------------------------------------------------------
  Kernel panics and instability may be observed on any MSI-X hardware if you 
  use irqbalance with kernels between 2.6.19 and 2.6.21. If such problems are 
  encountered, you may disable the irqbalance daemon or upgrade to a newer 
  kernel.

  Rx Page Allocation Errors
  -------------------------
  Page allocation failure. order:0 errors may occur under stress with kernels 
  2.6.25 and above. This is caused by the way the Linux kernel reports this 
  stressed condition.

  Under Redhat 5.4 - System May Crash when Closing Guest OS Window after 
  Loading/Unloading Physical Function (PF) Driver
  -------------------------------------------------------------------------
  Do not remove the igbvf driver from Dom0 while Virtual Functions (VFs) are 
  assigned to guests. VFs must first use the xm "pci-detach" command to 
  hot-plug the VF device out of the VM it is assigned to or else shut down the
  VM.

  Unloading Physical Function (PF) Driver Causes System Reboots When VM is 
  Running and VF is Loaded on the VM
  -----------------------------------------------------------------------------
  Do not unload the PF driver (igb) while VFs are assigned to guests.
 

Support
=======

For general information, go to the Intel support website at:

    http://support.intel.com

or the Intel Wired Networking project hosted by Sourceforge at:

    http://sourceforge.net/projects/e1000

If an issue is identified with the released source code on the supported
kernel with a supported adapter, email the specific information related
to the issue to igbvf-devel@lists.sf.net



License
=======

Intel Gigabit Linux driver.
Copyright(c) 1999 - 2008 Intel Corporation.

This program is free software; you can redistribute it and/or modify it
under the terms and conditions of the GNU General Public License,
version 2, as published by the Free Software Foundation.

This program is distributed in the hope it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
more details.

You should have received a copy of the GNU General Public License along with
this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.

The full GNU General Public License is included in this distribution in
the file called "COPYING".



Trademarks
==========

Intel, Itanium, and Pentium are trademarks or registered trademarks of
Intel Corporation or its subsidiaries in the United States and other
countries.

* Other names and brands may be claimed as the property of others.
