marius 9240aed777 Sync the e1000 drivers with what's in head as of r294327, modulo parts
that don't apply to stable/10 (driver API, if_inc_counter(), RSS changes
etc.) and modulo r287465 (which reportedly breaks igb(4)), i. e. assorted
fixes and improvements only:

o MFC r267385 (partial):
  - Don't compare bus_dma map pointers for static DMA allocations against
    NULL to determine if bus_dmamap_unload() or bus_dmamem_free() should be
    called. Instead, check the associated bus and virtual addresses.
  - Don't clear static DMA maps to NULL.
o MFC r284933:
  Delete the refernce to VLAN handling being disabled by default. This is
  no longer the case. [1]
o MFC r285639:
  Add an adapter CORE lock in the DDB hook em_dump_queue to avoid WITNESS
  panic in em_init_locked() while debugging.
o MFC r285879:
  - Remove unused txd_saved.
  - Intialize txd_upper, txd_lower and txd_used at declaration.
o MFC r286162:
  Free mbufs when busdma loading fails.
o MFC r286829:
  Add capability to disable CRC stripping as it breaks IPMI/BMC capabilities
  on certain adatpers. [2]
o MFC r286831: [3]
  - Increase EM_MAX_SCATTER to 64 such that the size of em_xmit()::
    segs[EM_MAX_SCATTER] doesn't get overrun by things like NFS that can
    and do shove more than 32 segs when being used with em(4) and TSO4.
  - Update tso handling code in em_xmit() with update from jhb@
  - Set if_hw_tsomax, if_hw_tsomaxsegcount and if_hw_tsomaxsegsize to
    appropriate values.
  - Define a TSO workaround "magic" number of 4 that is used to avoid an
    alignment issue in hardware.
  - Change a couple of integer values that were used as booleans to actual
    bool types.
  - Ensure that em_enable_intr() enables the appropriate mask of interrupts
    and not just a hardcoded define of values.
o MFC r286832:
  e1000/if_lem.c bump to 1.1.0
o MFC r286833:
  Bump all copywrite dates to 2015.
o MFC r287112:
  Style/whitespace cleanup in shared/common code.
o MFC r293331:
  - Switch em(4) to the extended RX descriptor format.
  - Split rxbuffer and txbuffer apart to support the new RX descriptor
    format structures. Move rxbuffer manipulation to em_setup_rxdesc() to
    unify the new behavior changes.
  - Add a RSSKEYLEN macro for help in generating the RSSKEY data structures
    in the card.
  - Change em_receive_checksum() to process the new rxdescriptor format
    status bit.
o MFC r293332:
  Disable the reuse of checksum offload context descriptors in the case
  of multiple queues in em(4). Document errata in the code.
o MFC r293854:
  Given that em(4), lem(4) and igb(4) hardware doesn't require the
  alignment guarantees provided by m_defrag(9), use m_collapse(9)
  instead for performance reasons.
  While at it, sanitize the statistics softc members, i. e. retire
  unused ones and add SYSCTL nodes missing for actually used ones.

PR:	118693 [1], 161277 [2], 195078 [3], 199174 [3], 200221 [3]
2016-01-27 22:31:08 +00:00
..
2013-05-02 01:36:52 +00:00

/*$FreeBSD$*/
FreeBSD Driver for Intel(R) PRO/10GbE Server Adapters
=====================================================

March 10, 2004


Contents
========

- Overview
- Supported Adapters
- Building and Installation
- Additional Configurations


Overview
========

This file describes the FreeBSD* driver, version 1.0.x, for the Intel(R)
PRO/10GbE Family of Adapters.  This driver has been developed for use with
FreeBSD, version 4.8 and later.

For questions related to hardware requirements, refer to the documentation
supplied with your Intel PRO/10GbE adapter.  All hardware requirements listed
apply to use with FreeBSD.



Supported Adapters
==================

The following Intel network adapters are compatible with the drivers in this 
release:

 Controller     Adapter Name                     Physical Layer
 ----------     ------------                     --------------

 82597EX        PRO/10GbE LR/SR Server Adapter   10G Base -LR and -SR
                                                 850 and 1310 nm optical fiber


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

NOTE: You must have kernel sources installed in order to compile the driver
      module.

      In the instructions below, x.x.x is the driver version as indicated in
      the name of the driver tar.


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

2. Untar/unzip the archive:
     tar xfz ixgb-x.x.x.tar.gz

3. To install man page:
     cd ixgb-x.x.x
     gzip -c ixgb.4 > /usr/share/man/man4/ixgb.4.gz

4. To load the driver onto a running system:
     cd ixgb-x.x.x/src
     make load

5. To assign an IP address to the interface, enter the following:
     ifconfig ixgb<interface_num> <IP_address>

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

7. If you want the driver to load automatically when the system is booted:

     cd ixgb-x.x.x/src
     make load
     cp if_ixgb.ko /modules
        
    Edit /boot/loader.conf, and add the following line:
     if_ixgb_load="YES"

     OR

     compile the driver into the kernel (see item 7).


   Edit /etc/rc.conf, and create the appropriate ifconfig_ixgb<interface_num> 
   entry:

     ifconfig_ixgb<interface_num>="<ifconfig_settings>"

     Example usage:

     ifconfig_ixgb0="inet 192.168.10.1 netmask 255.255.255.0"

     NOTE: For assistance, see the ifconfig man page.

8. If you want to compile the driver into the kernel, enter:

     cd ixgb-x.x.x/src

     mkdir /usr/src/sys/dev/ixgb

     cp if_ixgb* /usr/src/sys/dev/ixgb

     cp ixgb* /usr/src/sys/dev/ixgb  
 
     cp Makefile.kernel /usr/src/sys/modules/ixgb/Makefile

   If you have an i386 platform, you will need to edit the files.i386 file. 
   This is usually in /usr/src/sys/conf/; actual locations wil vary depending 
   on platform.  Add the following lines:

     dev/ixgb/ixgb_hw.c optional ixgb
     dev/ixgb/ixgb_ee.c optional ixgb
     dev/ixgb/if_ixgb.c optional ixgb


   Remove the following lines from the files.i386 file, if they exist:

     /dev/ixgb/if_ixgb_fx_hw.c optional ixgb
     /dev/ixgb/if_ixgb_phy.c optional ixgb

   Edit the kernel configuration file (i.e., GENERIC or MYKERNEL) in
   /usr/src/sys/i386/conf, and ensure the following line is present:

     device ixgb

   Compile and install the kernel.  The system must be reboot for the kernel 
   updates to take affect.  For additional information on compiling the kernel, 
   consult the FreeBSD operating system documentation.



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

The driver supports Transmit/Receive Checksum Offload and Jumbo Frames on
all PRO/10GbE adapters. 

  Jumbo Frames
  ------------
  To enable Jumbo Frames, use the ifconfig utility to increase the MTU
  beyond 1500 bytes.

  NOTES:
       - Only enable Jumbo Frames if your network infrastructure supports
         them.

       - The Jumbo Frames setting on the switch must be set to at least
         22 bytes larger than that of the adapter.

       - There are known performance issues with this driver when running 
         UDP traffic with Jumbo Frames. 

  The Jumbo Frames MTU range for Intel Adapters is 1500 to 16114. The default
  MTU range is 1500. To modify the setting, enter the following:

        ifconfig ixgb<interface_num> <hostname or IP address> mtu 9000

  To confirm an interface's MTU value, use the ifconfig command. To confirm
  the MTU used between two specific devices, use:

        route get <destination_IP_address>

 VLANs
  -----
  To create a new VLAN pseudo-interface:

        ifconfig <vlan_name> create

  To associate the VLAN pseudo-interface with a physical interface and
  assign a VLAN ID, IP address, and netmask:

        ifconfig <vlan_name> <ip_address> netmask <subnet_mask> vlan
           <vlan_id> vlandev <physical_interface>

  Example:

        ifconfig vlan10 10.0.0.1 netmask 255.255.255.0 vlan10 vlandev ixgb0

  In this example, all packets will be marked on egress with 802.1Q VLAN 
  tags, specifying a VLAN ID of 10.

  To remove a VLAN pseudo-interface:

        ifconfig <vlan_name> destroy

  Polling
  -------
  To enable polling in the driver, add the following options to the kernel
  configuration, and then recompile the kernel:

        options DEVICE_POLLING
        options HZ=1000

  At runtime, use the following command to turn on polling mode.

	ifconfig ixgb0 polling

  Similarly, turn off polling mode by removing IFCAP_POLLING flag from
  interface:

        ifconfig ixgb0 -polling

  The driver has to be built into the kernel for DEVICE POLLING to be
  enabled in the driver.

Support
=======

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

        http://support.intel.com

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 freebsd@intel.com.



License
=======

This software program is released under the terms of a license agreement 
between you ('Licensee') and Intel. Do not use or load this software or any 
associated materials (collectively, the 'Software') until you have carefully 
read the full terms and conditions of the LICENSE located in this software 
package. By loading or using the Software, you agree to the terms of this 
Agreement. If you do not agree with the terms of this Agreement, do not 
install or use the Software.

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