Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/dev/pci/ixgbe Add sources for ixgbe(4), a Intel 82599 10...



details:   https://anonhg.NetBSD.org/src/rev/4d3bcb94dd9e
branches:  trunk
changeset: 768244:4d3bcb94dd9e
user:      dyoung <dyoung%NetBSD.org@localhost>
date:      Fri Aug 12 21:55:28 2011 +0000

description:
Add sources for ixgbe(4), a Intel 82599 10-gigabit ethernet driver
ported from FreeBSD.

diffstat:

 sys/dev/pci/ixgbe/LICENSE        |    34 +
 sys/dev/pci/ixgbe/README         |   281 +
 sys/dev/pci/ixgbe/ixgbe.c        |  5809 ++++++++++++++++++++++++++++++++++++++
 sys/dev/pci/ixgbe/ixgbe.h        |   538 +++
 sys/dev/pci/ixgbe/ixgbe_82598.c  |  1373 ++++++++
 sys/dev/pci/ixgbe/ixgbe_82599.c  |  2169 ++++++++++++++
 sys/dev/pci/ixgbe/ixgbe_api.c    |  1078 +++++++
 sys/dev/pci/ixgbe/ixgbe_api.h    |   152 +
 sys/dev/pci/ixgbe/ixgbe_common.c |  3533 +++++++++++++++++++++++
 sys/dev/pci/ixgbe/ixgbe_common.h |   125 +
 sys/dev/pci/ixgbe/ixgbe_mbx.c    |   751 ++++
 sys/dev/pci/ixgbe/ixgbe_mbx.h    |   114 +
 sys/dev/pci/ixgbe/ixgbe_netbsd.c |   250 +
 sys/dev/pci/ixgbe/ixgbe_netbsd.h |    96 +
 sys/dev/pci/ixgbe/ixgbe_osdep.h  |   168 +
 sys/dev/pci/ixgbe/ixgbe_phy.c    |  1850 ++++++++++++
 sys/dev/pci/ixgbe/ixgbe_phy.h    |   142 +
 sys/dev/pci/ixgbe/ixgbe_type.h   |  2863 ++++++++++++++++++
 sys/dev/pci/ixgbe/ixgbe_vf.c     |   496 +++
 sys/dev/pci/ixgbe/ixgbe_vf.h     |   114 +
 sys/dev/pci/ixgbe/ixv.c          |  3952 +++++++++++++++++++++++++
 sys/dev/pci/ixgbe/ixv.h          |   410 ++
 22 files changed, 26298 insertions(+), 0 deletions(-)

diffs (truncated from 26386 to 300 lines):

diff -r 88cfb4251149 -r 4d3bcb94dd9e sys/dev/pci/ixgbe/LICENSE
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/sys/dev/pci/ixgbe/LICENSE Fri Aug 12 21:55:28 2011 +0000
@@ -0,0 +1,34 @@
+/******************************************************************************
+
+  Copyright (c) 2001-2010, Intel Corporation 
+  All rights reserved.
+  
+  Redistribution and use in source and binary forms, with or without 
+  modification, are permitted provided that the following conditions are met:
+  
+   1. Redistributions of source code must retain the above copyright notice, 
+      this list of conditions and the following disclaimer.
+  
+   2. Redistributions in binary form must reproduce the above copyright 
+      notice, this list of conditions and the following disclaimer in the 
+      documentation and/or other materials provided with the distribution.
+  
+   3. Neither the name of the Intel Corporation nor the names of its 
+      contributors may be used to endorse or promote products derived from 
+      this software without specific prior written permission.
+  
+  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+  AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 
+  IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 
+  ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE 
+  LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 
+  CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 
+  SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 
+  INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
+  CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 
+  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+  POSSIBILITY OF SUCH DAMAGE.
+
+******************************************************************************/
+/*$FreeBSD: src/sys/dev/ixgbe/LICENSE,v 1.4 2010/03/27 00:21:40 jfv Exp $*/
+/*$NetBSD: LICENSE,v 1.1 2011/08/12 21:55:28 dyoung Exp $*/
diff -r 88cfb4251149 -r 4d3bcb94dd9e sys/dev/pci/ixgbe/README
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/sys/dev/pci/ixgbe/README  Fri Aug 12 21:55:28 2011 +0000
@@ -0,0 +1,281 @@
+FreeBSD Driver for 10 Gigabit PCI Express Server Adapters
+=============================================
+/*$FreeBSD: src/sys/dev/ixgbe/README,v 1.2 2009/04/10 00:22:48 jfv Exp $*/
+/*$NetBSD: README,v 1.1 2011/08/12 21:55:28 dyoung Exp $*/
+
+May 14, 2008
+
+
+Contents
+========
+
+- Overview
+- Supported Adapters
+- Building and Installation
+- Additional Configurations
+- Known Limitations
+
+
+Overview
+========
+
+This file describes the FreeBSD* driver for the 10 Gigabit PCIE Family of 
+Adapters.  Drivers has been developed for use with FreeBSD 7 or later.
+
+For questions related to hardware requirements, refer to the documentation
+supplied with your Intel 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
+----------  ------------                      --------------
+82598EB     Intel(R) 10 Gigabit XF SR/AF      10G Base -LR (850 nm optical fiber) 
+            Dual Port Server Adapter          10G Base -SR (1310 nm optical fiber) 
+82598EB     Intel(R) 10 Gigabit XF SR/LR 
+            Server Adapter
+            Intel(R) 82598EB 10 Gigabit AF 
+            Network Connection
+            Intel(R) 82598EB 10 Gigabit AT 
+            CX4 Network Connection
+              
+
+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/ixgbe or /usr/local/src/ixgbe.
+
+2. Untar/unzip the archive:
+     tar xfz ixgbe-x.x.x.tar.gz
+
+3. To install man page:
+     cd ixgbe-x.x.x
+     gzip -c ixgbe.4 > /usr/share/man/man4/ixgbee.4.gz
+
+4. To load the driver onto a running system:
+     cd ixgbe-x.x.x/src
+     make load
+
+5. To assign an IP address to the interface, enter the following:
+     ifconfig ix<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 ixgbe-x.x.x/src
+     make
+     make install
+        
+    Edit /boot/loader.conf, and add the following line:
+     ixgbe_load="YES"
+
+     OR
+
+     compile the driver into the kernel (see item 8).
+
+
+   Edit /etc/rc.conf, and create the appropriate ifconfig_ixgbe<interface_num> 
+   entry:
+
+     ifconfig_ix<interface_num>="<ifconfig_settings>"
+
+     Example usage:
+
+     ifconfig_ix0="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:
+
+     FreeBSD 7 or later:
+
+     cd ixgbe-x.x.x/src
+
+     cp *.[ch] /usr/src/sys/dev/ixgbe
+   
+     cp Makefile.kernel /usr/src/sys/modules/ixgbe/Makefile
+
+     Edit the kernel configuration file (i.e., GENERIC or MYKERNEL) in 
+     /usr/src/sys/i386/conf (replace "i386" with the appropriate system 
+     architecture if necessary), and ensure the following line is present:
+
+    device ixgbe
+
+   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.
+
+
+Configuration and Tuning
+=========================
+
+The driver supports Transmit/Receive Checksum Offload and Jumbo Frames on
+all 10 Gigabit adapters. 
+
+  Jumbo Frames
+  ------------
+  To enable Jumbo Frames, use the ifconfig utility to increase the MTU
+  beyond 1500 bytes.
+
+  NOTES:
+
+       - 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 ix <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 vlan 10 vlandev ixgbe0
+
+  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
+
+
+  Checksum Offload
+  ----------------
+  
+  Checksum offloading supports both TCP and UDP packets and is 
+  supported for both transmit and receive. 
+
+  Checksum offloading can be enabled or disabled using ifconfig. 
+  Both transmit and receive offloading will be either enabled or 
+  disabled together. You cannot enable/disable one without the other.
+
+  To enable checksum offloading:
+
+         ifconfig <interface_num> rxcsum 
+
+  To disable checksum offloading:
+
+         ifconfig <interface_num> -rxcsum 
+
+  To confirm the current setting:
+
+         ifconfig <interface_num>
+
+  
+  TSO
+  ---
+
+  To disable:
+
+         ifconfig <interface_num> -tso 
+
+  To re-enable:
+
+         ifconfig <interface_num> tso
+
+  LRO
+  ___
+  
+   Large Receive Offload is available in version 1.4.4, it is on
+   by default. It can be toggled off and on by using:
+       sysctl dev.ix.X.enable_lro=[0,1]
+
+   NOTE: when changing this feature you MUST be sure the interface
+   is reinitialized, it is easy to do this with ifconfig down/up.
+   The LRO code will ultimately move into the kernel stack code,
+   but for this first release it was included with the driver.
+
+  Important system configuration changes:
+  ---------------------------------------
+
+  When there is a choice run on a 64bit OS rather than 32, it makes
+  a significant difference in improvement.
+
+  The default scheduler SCHED_4BSD is not smart about SMP locality issues. 
+  Significant improvement can be achieved by switching to the ULE scheduler.
+
+  This is done by changing the entry in the config file from SCHED_4BSD to 
+  SCHED_ULE. Note that this is only advisable on FreeBSD 7, on 6.X there have
+  been stability problems with ULE.
+
+  Change the file /etc/sysctl.conf, add the line:  
+ 
+         hw.intr_storm_threshold: 8000 (the default is 1000)
+
+  Best throughput results are seen with a large MTU; use 9000 if possible. 
+
+  The default number of descriptors is 256, increasing this to 1024 or even 
+  2048 may improve performance.
+
+
+Known Limitations
+=================
+  Under small packets UDP stress test with 10GbE driver, the FreeBSD system 
+  will drop UDP packets due to the fullness of socket buffers. You may want 
+  to change the driver's Flow Control variables to the minimum value for 
+  controlling packet reception.
+
+
+Support
+=======
+
+For general information and support, go to the Intel support website at:



Home | Main Index | Thread Index | Old Index