vserver 1.9.5.x5
[linux-2.6.git] / Documentation / networking / ixgb.txt
1 Linux* Base Driver for the Intel(R) PRO/10GbE Family of Adapters
2 ================================================================
3
4 September 13, 2004
5
6
7 Contents
8 ========
9
10 - In This Release
11 - Identifying Your Adapter
12 - Command Line Parameters
13 - Improving Performance
14 - Support
15
16
17 In This Release
18 ===============
19
20 This file describes the Linux* Base Driver for the Intel(R) PRO/10GbE Family 
21 of Adapters, version 1.0.x.  This driver includes support for Itanium(TM)2 and
22 EM64T systems.
23
24 For questions related to hardware requirements, refer to the documentation 
25 supplied with your Intel PRO/10GbE adapter. All hardware requirements listed 
26 apply to use with Linux.
27
28 Identifying Your Adapter
29 ========================
30
31 To verify your Intel adapter is supported, find the board ID number on the 
32 adapter. Look for a label that has a barcode and a number in the format  
33 A12345-001. 
34
35 Use the above information and the Adapter & Driver ID Guide at:
36
37   http://support.intel.com/support/network/adapter/pro100/21397.htm
38
39 For the latest Intel network drivers for Linux, go to:
40
41     http://downloadfinder.intel.com/scripts-df/support_intel.asp
42
43 Command Line Parameters
44 =======================
45
46 If the driver is built as a module, the  following optional parameters are 
47 used by entering them on the command line with the modprobe or insmod command
48 using this syntax:
49
50      modprobe ixgb [<option>=<VAL1>,<VAL2>,...]
51
52      insmod ixgb [<option>=<VAL1>,<VAL2>,...]
53
54 For example, with two PRO/10GbE PCI adapters, entering:
55
56     insmod ixgb TxDescriptors=80,128
57
58 loads the ixgb driver with 80 TX resources for the first adapter and 128 TX 
59 resources for the second adapter.
60
61 The default value for each parameter is generally the recommended setting,
62 unless otherwise noted. Also, if the driver is statically built into the
63 kernel, the driver is loaded with the default values for all the parameters.
64 Ethtool can be used to change some of the parameters at runtime.
65
66 FlowControl
67 Valid Range: 0-3 (0=none, 1=Rx only, 2=Tx only, 3=Rx&Tx)
68 Default: Read from the EEPROM
69          If EEPROM is not detected, default is 3
70     This parameter controls the automatic generation(Tx) and response(Rx) to 
71     Ethernet PAUSE frames.
72
73 RxDescriptors
74 Valid Range: 64-4096
75 Default Value: 1024
76     This value is the number of receive descriptors allocated by the driver. 
77     Increasing this value allows the driver to buffer more incoming packets. 
78     Each descriptor is 16 bytes.  A receive buffer is also allocated for 
79     each descriptor and can be either 2048, 4056, 8192, or 16384 bytes, 
80     depending on the MTU setting. When the MTU size is 1500 or less, the 
81     receive buffer size is 2048 bytes. When the MTU is greater than 1500 the
82     receive buffer size will be either 4056, 8192, or 16384 bytes. The 
83     maximum MTU size is 16114.
84
85 RxIntDelay
86 Valid Range: 0-65535 (0=off)
87 Default Value: 6
88     This value delays the generation of receive interrupts in units of 
89     0.8192 microseconds.  Receive interrupt reduction can improve CPU 
90     efficiency if properly tuned for specific network traffic. Increasing 
91     this value adds extra latency to frame reception and can end up 
92     decreasing the throughput of TCP traffic. If the system is reporting 
93     dropped receives, this value may be set too high, causing the driver to 
94     run out of available receive descriptors.
95
96 TxDescriptors
97 Valid Range: 64-4096
98 Default Value: 256
99     This value is the number of transmit descriptors allocated by the driver.
100     Increasing this value allows the driver to queue more transmits. Each 
101     descriptor is 16 bytes.
102
103 XsumRX
104 Valid Range: 0-1
105 Default Value: 1
106     A value of '1' indicates that the driver should enable IP checksum
107     offload for received packets (both UDP and TCP) to the adapter hardware.
108
109 XsumTX
110 Valid Range: 0-1
111 Default Value: 1
112     A value of '1' indicates that the driver should enable IP checksum
113     offload for transmitted packets (both UDP and TCP) to the adapter 
114     hardware.
115
116 Improving Performance
117 =====================
118
119 With the Intel PRO/10 GbE adapter, the default Linux configuration will very 
120 likely limit the total available throughput artificially.  There is a set of 
121 things that when applied together increase the ability of Linux to transmit 
122 and receive data.  The following enhancements were originally acquired from
123 settings published at http://www.spec.org/web99 for various submitted results 
124 using Linux.
125
126 NOTE: These changes are only suggestions, and serve as a starting point for 
127 tuning your network performance.
128
129 The changes are made in three major ways, listed in order of greatest effect:
130 - Use ifconfig to modify the mtu (maximum transmission unit) and the txqueuelen 
131   parameter.
132 - Use sysctl to modify /proc parameters (essentially kernel tuning)
133 - Use setpci to modify the MMRBC field in PCI-X configuration space to increase 
134   transmit burst lengths on the bus.
135
136 NOTE: setpci modifies the adapter's configuration registers to allow it to read 
137 up to 4k bytes at a time (for transmits).  However, for some systems the 
138 behavior after modifying this register may be undefined (possibly errors of some 
139 kind). A power-cycle, hard reset or explicitly setting the e6 register back to 
140 22 (setpci -d 8086:1048 e6.b=22) may be required to get back to a stable 
141 configuration.
142
143 - COPY these lines and paste them into ixgb_perf.sh:
144 #!/bin/bash
145 echo "configuring network performance , edit this file to change the interface"
146 # set mmrbc to 4k reads, modify only Intel 10GbE device IDs
147 setpci -d 8086:1048 e6.b=2e
148 # set the MTU (max transmission unit) - it requires your switch and clients to change too!
149 # set the txqueuelen
150 # your ixgb adapter should be loaded as eth1 for this to work, change if needed
151 ifconfig eth1 mtu 9000 txqueuelen 1000 up
152 # call the sysctl utility to modify /proc/sys entries 
153 sysctl -p ./sysctl_ixgb.conf 
154 - END ixgb_perf.sh
155
156 - COPY these lines and paste them into sysctl_ixgb.conf:
157 # some of the defaults may be different for your kernel
158 # call this file with sysctl -p <this file>
159 # these are just suggested values that worked well to increase throughput in
160 # several network benchmark tests, your mileage may vary
161
162 ### IPV4 specific settings
163 net.ipv4.tcp_timestamps = 0 # turns TCP timestamp support off, default 1, reduces CPU use
164 net.ipv4.tcp_sack = 0 # turn SACK support off, default on
165 # on systems with a VERY fast bus -> memory interface this is the big gainer 
166 net.ipv4.tcp_rmem = 10000000 10000000 10000000 # sets min/default/max TCP read buffer, default 4096 87380 174760
167 net.ipv4.tcp_wmem = 10000000 10000000 10000000 # sets min/pressure/max TCP write buffer, default 4096 16384 131072
168 net.ipv4.tcp_mem = 10000000 10000000 10000000 # sets min/pressure/max TCP buffer space, default 31744 32256 32768
169
170 ### CORE settings (mostly for socket and UDP effect)
171 net.core.rmem_max = 524287 # maximum receive socket buffer size, default 131071
172 net.core.wmem_max = 524287 # maximum send socket buffer size, default 131071
173 net.core.rmem_default = 524287 # default receive socket buffer size, default 65535
174 net.core.wmem_default = 524287 # default send socket buffer size, default 65535
175 net.core.optmem_max = 524287 # maximum amount of option memory buffers, default 10240
176 net.core.netdev_max_backlog = 300000 # number of unprocessed input packets before kernel starts dropping them, default 300
177 - END sysctl_ixgb.conf
178
179 Edit the ixgb_perf.sh script if necessary to change eth1 to whatever interface 
180 your ixgb driver is using.
181
182 NOTE: Unless these scripts are added to the boot process, these changes will 
183 only last only until the next system reboot.
184
185
186 Resolving Slow UDP Traffic
187 --------------------------
188
189 If your server does not seem to be able to receive UDP traffic as fast as it 
190 can receive TCP traffic, it could be because Linux, by default, does not set 
191 the network stack buffers as large as they need to be to support high UDP 
192 transfer rates. One way to alleviate this problem is to allow more memory to 
193 be used by the IP stack to store incoming data. 
194
195 For instance, use the commands: 
196     sysctl -w net.core.rmem_max=262143
197 and
198     sysctl -w net.core.rmem_default=262143
199 to increase the read buffer memory max and default to 262143 (256k - 1) from 
200 defaults of max=131071 (128k - 1) and default=65535 (64k - 1). These variables 
201 will increase the amount of memory used by the network stack for receives, and 
202 can be increased significantly more if necessary for your application.
203
204 Support
205 =======
206
207 For general information and support, go to the Intel support website at:
208
209     http://support.intel.com
210
211 If an issue is identified with the released source code on the supported
212 kernel with a supported adapter, email the specific information related to 
213 the issue to linux.nics@intel.com.