ixgb.txt 17.0 KB
Newer Older
1 2
.. SPDX-License-Identifier: GPL-2.0+

3 4
Linux Base Driver for 10 Gigabit Intel(R) Ethernet Network Connection
=====================================================================
L
Linus Torvalds 已提交
5

6
October 1, 2018
L
Linus Torvalds 已提交
7 8 9 10 11 12 13 14 15


Contents
========

- In This Release
- Identifying Your Adapter
- Command Line Parameters
- Improving Performance
J
Jesse Brandeburg 已提交
16 17
- Additional Configurations
- Known Issues/Troubleshooting
L
Linus Torvalds 已提交
18 19 20
- Support


J
Jesse Brandeburg 已提交
21

L
Linus Torvalds 已提交
22 23 24
In This Release
===============

J
Jesse Brandeburg 已提交
25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42
This file describes the ixgb Linux Base Driver for the 10 Gigabit Intel(R)
Network Connection.  This driver includes support for Itanium(R)2-based
systems.

For questions related to hardware requirements, refer to the documentation
supplied with your 10 Gigabit adapter.  All hardware requirements listed apply
to use with Linux.

The following features are available in this kernel:
 - Native VLANs
 - Channel Bonding (teaming)
 - SNMP

Channel Bonding documentation can be found in the Linux kernel source:
/Documentation/networking/bonding.txt

The driver information previously displayed in the /proc filesystem is not
supported in this release.  Alternatively, you can use ethtool (version 1.6
43
or later), lspci, and iproute2 to obtain the same information.
J
Jesse Brandeburg 已提交
44 45 46

Instructions on updating ethtool can be found in the section "Additional
Configurations" later in this document.
L
Linus Torvalds 已提交
47 48 49 50 51


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

J
Jesse Brandeburg 已提交
52 53 54
The following Intel network adapters are compatible with the drivers in this
release:

55 56 57 58 59 60 61
+------------+------------------------------+----------------------------------+
| Controller | Adapter Name                 | Physical Layer                   |
+============+==============================+==================================+
| 82597EX    | Intel(R) PRO/10GbE LR/SR/CX4 | - 10G Base-LR (fiber)            |
|            | Server Adapters              | - 10G Base-SR (fiber)            |
|            |                              | - 10G Base-CX4 (copper)          |
+------------+------------------------------+----------------------------------+
J
Jesse Brandeburg 已提交
62 63 64 65

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

66
    https://support.intel.com
L
Linus Torvalds 已提交
67 68 69 70 71


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

J
Jesse Brandeburg 已提交
72 73
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
74
this syntax::
L
Linus Torvalds 已提交
75

76
    modprobe ixgb [<option>=<VAL1>,<VAL2>,...]
L
Linus Torvalds 已提交
77

78
For example, with two 10GbE PCI adapters, entering::
L
Linus Torvalds 已提交
79

80
    modprobe ixgb TxDescriptors=80,128
L
Linus Torvalds 已提交
81

J
Jesse Brandeburg 已提交
82
loads the ixgb driver with 80 TX resources for the first adapter and 128 TX
L
Linus Torvalds 已提交
83 84 85
resources for the second adapter.

The default value for each parameter is generally the recommended setting,
J
Jesse Brandeburg 已提交
86
unless otherwise noted.
L
Linus Torvalds 已提交
87

88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103
Copybreak
---------
:Valid Range: 0-XXXX
:Default Value: 256

    This is the maximum size of packet that is copied to a new buffer on
    receive.

Debug
-----
:Valid Range: 0-16 (0=none,...,16=all)
:Default Value: 0

    This parameter adjusts the level of debug messages displayed in the
    system logs.

L
Linus Torvalds 已提交
104
FlowControl
105 106 107 108
-----------
:Valid Range: 0-3 (0=none, 1=Rx only, 2=Tx only, 3=Rx&Tx)
:Default Value: 1 if no EEPROM, otherwise read from EEPROM

J
Jesse Brandeburg 已提交
109 110 111
    This parameter controls the automatic generation(Tx) and response(Rx) to
    Ethernet PAUSE frames.  There are hardware bugs associated with enabling
    Tx flow control so beware.
L
Linus Torvalds 已提交
112 113

RxDescriptors
114 115 116 117
-------------
:Valid Range: 64-4096
:Default Value: 1024

J
Jesse Brandeburg 已提交
118 119 120 121 122
    This value is the number of receive descriptors allocated by the driver.
    Increasing this value allows the driver to buffer more incoming packets.
    Each descriptor is 16 bytes.  A receive buffer is also allocated for
    each descriptor and can be either 2048, 4056, 8192, or 16384 bytes,
    depending on the MTU setting.  When the MTU size is 1500 or less, the
L
Linus Torvalds 已提交
123
    receive buffer size is 2048 bytes. When the MTU is greater than 1500 the
J
Jesse Brandeburg 已提交
124
    receive buffer size will be either 4056, 8192, or 16384 bytes.  The
L
Linus Torvalds 已提交
125 126
    maximum MTU size is 16114.

127 128 129 130 131 132 133 134 135
TxDescriptors
-------------
:Valid Range: 64-4096
:Default Value: 256

    This value is the number of transmit descriptors allocated by the driver.
    Increasing this value allows the driver to queue more transmits.  Each
    descriptor is 16 bytes.

L
Linus Torvalds 已提交
136
RxIntDelay
137 138 139 140
----------
:Valid Range: 0-65535 (0=off)
:Default Value: 72

J
Jesse Brandeburg 已提交
141 142 143 144 145 146
    This value delays the generation of receive interrupts in units of
    0.8192 microseconds.  Receive interrupt reduction can improve CPU
    efficiency if properly tuned for specific network traffic.  Increasing
    this value adds extra latency to frame reception and can end up
    decreasing the throughput of TCP traffic.  If the system is reporting
    dropped receives, this value may be set too high, causing the driver to
L
Linus Torvalds 已提交
147 148
    run out of available receive descriptors.

149 150 151 152 153 154 155 156 157 158 159
TxIntDelay
----------
:Valid Range: 0-65535 (0=off)
:Default Value: 32

    This value delays the generation of transmit interrupts in units of
    0.8192 microseconds.  Transmit interrupt reduction can improve CPU
    efficiency if properly tuned for specific network traffic.  Increasing
    this value adds extra latency to frame transmission and can end up
    decreasing the throughput of TCP traffic.  If this value is set too high,
    it will cause the driver to run out of available transmit descriptors.
L
Linus Torvalds 已提交
160 161

XsumRX
162 163 164 165
------
:Valid Range: 0-1
:Default Value: 1

L
Linus Torvalds 已提交
166 167 168
    A value of '1' indicates that the driver should enable IP checksum
    offload for received packets (both UDP and TCP) to the adapter hardware.

169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196
RxFCHighThresh
--------------
:Valid Range: 1,536-262,136 (0x600 - 0x3FFF8, 8 byte granularity)
:Default Value: 196,608 (0x30000)

    Receive Flow control high threshold (when we send a pause frame)

RxFCLowThresh
-------------
:Valid Range: 64-262,136 (0x40 - 0x3FFF8, 8 byte granularity)
:Default Value: 163,840 (0x28000)

    Receive Flow control low threshold (when we send a resume frame)

FCReqTimeout
------------
:Valid Range: 1-65535
:Default Value: 65535

    Flow control request timeout (how long to pause the link partner's tx)

IntDelayEnable
--------------
:Value Range: 0,1
:Default Value: 1

    Interrupt Delay, 0 disables transmit interrupt delay and 1 enables it.

L
Linus Torvalds 已提交
197 198 199 200

Improving Performance
=====================

J
Jesse Brandeburg 已提交
201 202 203 204 205 206
With the 10 Gigabit server adapters, the default Linux configuration will
very likely limit the total available throughput artificially.  There is a set
of configuration changes that, when applied together, will increase the ability
of Linux to transmit and receive data.  The following enhancements were
originally acquired from settings published at http://www.spec.org/web99/ for
various submitted results using Linux.
L
Linus Torvalds 已提交
207

208 209 210
NOTE:
  These changes are only suggestions, and serve as a starting point for
  tuning your network performance.
L
Linus Torvalds 已提交
211 212

The changes are made in three major ways, listed in order of greatest effect:
213

214
- Use ip link to modify the mtu (maximum transmission unit) and the txqueuelen
L
Linus Torvalds 已提交
215 216
  parameter.
- Use sysctl to modify /proc parameters (essentially kernel tuning)
J
Jesse Brandeburg 已提交
217
- Use setpci to modify the MMRBC field in PCI-X configuration space to increase
L
Linus Torvalds 已提交
218 219
  transmit burst lengths on the bus.

220 221 222 223 224 225 226
NOTE:
  setpci modifies the adapter's configuration registers to allow it to read
  up to 4k bytes at a time (for transmits).  However, for some systems the
  behavior after modifying this register may be undefined (possibly errors of
  some kind).  A power-cycle, hard reset or explicitly setting the e6 register
  back to 22 (setpci -d 8086:1a48 e6.b=22) may be required to get back to a
  stable configuration.
L
Linus Torvalds 已提交
227 228

- COPY these lines and paste them into ixgb_perf.sh:
229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245

::

  #!/bin/bash
  echo "configuring network performance , edit this file to change the interface
  or device ID of 10GbE card"
  # set mmrbc to 4k reads, modify only Intel 10GbE device IDs
  # replace 1a48 with appropriate 10GbE device's ID installed on the system,
  # if needed.
  setpci -d 8086:1a48 e6.b=2e
  # set the MTU (max transmission unit) - it requires your switch and clients
  # to change as well.
  # set the txqueuelen
  # your ixgb adapter should be loaded as eth1 for this to work, change if needed
  ip li set dev eth1 mtu 9000 txqueuelen 1000 up
  # call the sysctl utility to modify /proc/sys entries
  sysctl -p ./sysctl_ixgb.conf
L
Linus Torvalds 已提交
246 247

- COPY these lines and paste them into sysctl_ixgb.conf:
248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281

::

  # some of the defaults may be different for your kernel
  # call this file with sysctl -p <this file>
  # these are just suggested values that worked well to increase throughput in
  # several network benchmark tests, your mileage may vary

  ### IPV4 specific settings
  # turn TCP timestamp support off, default 1, reduces CPU use
  net.ipv4.tcp_timestamps = 0
  # turn SACK support off, default on
  # on systems with a VERY fast bus -> memory interface this is the big gainer
  net.ipv4.tcp_sack = 0
  # set min/default/max TCP read buffer, default 4096 87380 174760
  net.ipv4.tcp_rmem = 10000000 10000000 10000000
  # set min/pressure/max TCP write buffer, default 4096 16384 131072
  net.ipv4.tcp_wmem = 10000000 10000000 10000000
  # set min/pressure/max TCP buffer space, default 31744 32256 32768
  net.ipv4.tcp_mem = 10000000 10000000 10000000

  ### CORE settings (mostly for socket and UDP effect)
  # set maximum receive socket buffer size, default 131071
  net.core.rmem_max = 524287
  # set maximum send socket buffer size, default 131071
  net.core.wmem_max = 524287
  # set default receive socket buffer size, default 65535
  net.core.rmem_default = 524287
  # set default send socket buffer size, default 65535
  net.core.wmem_default = 524287
  # set maximum amount of option memory buffers, default 10240
  net.core.optmem_max = 524287
  # set number of unprocessed input packets before kernel starts dropping them; default 300
  net.core.netdev_max_backlog = 300000
L
Linus Torvalds 已提交
282

J
Jesse Brandeburg 已提交
283 284 285
Edit the ixgb_perf.sh script if necessary to change eth1 to whatever interface
your ixgb driver is using and/or replace '1a48' with appropriate 10GbE device's
ID installed on the system.
L
Linus Torvalds 已提交
286

287 288 289
NOTE:
  Unless these scripts are added to the boot process, these changes will
  only last only until the next system reboot.
L
Linus Torvalds 已提交
290 291 292 293


Resolving Slow UDP Traffic
--------------------------
J
Jesse Brandeburg 已提交
294 295 296 297 298
If your server does not seem to be able to receive UDP traffic as fast as it
can receive TCP traffic, it could be because Linux, by default, does not set
the network stack buffers as large as they need to be to support high UDP
transfer rates.  One way to alleviate this problem is to allow more memory to
be used by the IP stack to store incoming data.
L
Linus Torvalds 已提交
299

300 301
For instance, use the commands::

L
Linus Torvalds 已提交
302
    sysctl -w net.core.rmem_max=262143
303 304 305

and::

L
Linus Torvalds 已提交
306
    sysctl -w net.core.rmem_default=262143
307

J
Jesse Brandeburg 已提交
308 309 310
to increase the read buffer memory max and default to 262143 (256k - 1) from
defaults of max=131071 (128k - 1) and default=65535 (64k - 1).  These variables
will increase the amount of memory used by the network stack for receives, and
L
Linus Torvalds 已提交
311 312
can be increased significantly more if necessary for your application.

J
Jesse Brandeburg 已提交
313 314 315 316

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

317 318 319 320 321 322 323 324 325 326 327
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/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 Intel 10GbE Family of
Adapters is ixgb.
J
Jesse Brandeburg 已提交
328

329 330 331 332 333
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::
J
Jesse Brandeburg 已提交
334

335
    dmesg -n 8
J
Jesse Brandeburg 已提交
336

337
NOTE: This setting is not saved across reboots.
J
Jesse Brandeburg 已提交
338

339 340 341 342 343 344
Jumbo Frames
------------
The driver supports Jumbo Frames for all adapters. Jumbo Frames support is
enabled by changing the MTU to a value larger than the default of 1500.
The maximum value for the MTU is 16114.  Use the ip command to
increase the MTU size.  For example::
J
Jesse Brandeburg 已提交
345

346
    ip li set dev ethx mtu 9000
J
Jesse Brandeburg 已提交
347

348 349
The maximum MTU setting for Jumbo Frames is 16114.  This value coincides
with the maximum Jumbo Frames size of 16128.
J
Jesse Brandeburg 已提交
350

351 352 353 354 355
Ethtool
-------
The driver utilizes the ethtool interface for driver configuration and
diagnostics, as well as displaying statistical information.  The ethtool
version 1.6 or later is required for this functionality.
J
Jesse Brandeburg 已提交
356

357 358
The latest release of ethtool can be found from
https://www.kernel.org/pub/software/network/ethtool/
J
Jesse Brandeburg 已提交
359

360 361 362 363
NOTE:
  The ethtool version 1.6 only supports a limited set of ethtool options.
  Support for a more complete ethtool feature set can be enabled by
  upgrading to the latest version.
J
Jesse Brandeburg 已提交
364

365 366 367
NAPI
----
NAPI (Rx polling mode) is supported in the ixgb driver.
J
Jesse Brandeburg 已提交
368

369 370
See https://wiki.linuxfoundation.org/networking/napi for more information on
NAPI.
J
Jesse Brandeburg 已提交
371 372 373 374 375


Known Issues/Troubleshooting
============================

376 377
NOTE:
  After installing the driver, if your Intel Network Connection is not
J
Jesse Brandeburg 已提交
378 379 380
  working, verify in the "In This Release" section of the readme that you have
  installed the correct driver.

381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436
Cable Interoperability Issue with Fujitsu XENPAK Module in SmartBits Chassis
----------------------------------------------------------------------------
Excessive CRC errors may be observed if the Intel(R) PRO/10GbE CX4
Server adapter is connected to a Fujitsu XENPAK CX4 module in a SmartBits
chassis using 15 m/24AWG cable assemblies manufactured by Fujitsu or Leoni.
The CRC errors may be received either by the Intel(R) PRO/10GbE CX4
Server adapter or the SmartBits. If this situation occurs using a different
cable assembly may resolve the issue.

Cable Interoperability Issues with HP Procurve 3400cl Switch Port
-----------------------------------------------------------------
Excessive CRC errors may be observed if the Intel(R) PRO/10GbE CX4 Server
adapter is connected to an HP Procurve 3400cl switch port using short cables
(1 m or shorter). If this situation occurs, using a longer cable may resolve
the issue.

Excessive CRC errors may be observed using Fujitsu 24AWG cable assemblies that
Are 10 m or longer or where using a Leoni 15 m/24AWG cable assembly. The CRC
errors may be received either by the CX4 Server adapter or at the switch. If
this situation occurs, using a different cable assembly may resolve the issue.

Jumbo Frames System Requirement
-------------------------------
Memory allocation failures have been observed on Linux systems with 64 MB
of RAM or less that are running Jumbo Frames.  If you are using Jumbo
Frames, your system may require more than the advertised minimum
requirement of 64 MB of system memory.

Performance Degradation with Jumbo Frames
-----------------------------------------
Degradation in throughput performance may be observed in some Jumbo frames
environments.  If this is observed, increasing the application's socket buffer
size and/or increasing the /proc/sys/net/ipv4/tcp_*mem entry values may help.
See the specific application manual and /usr/src/linux*/Documentation/
networking/ip-sysctl.txt for more details.

Allocating Rx Buffers when Using Jumbo Frames
---------------------------------------------
Allocating Rx buffers when using Jumbo Frames on 2.6.x kernels may fail if
the available memory is heavily fragmented. This issue may be seen with PCI-X
adapters or with packet split disabled. This can be reduced or eliminated
by changing the amount of available memory for receive buffer allocation, by
increasing /proc/sys/vm/min_free_kbytes.

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, do either of the following:

  - Turn on ARP filtering by entering::

J
Jesse Brandeburg 已提交
437 438 439 440 441
      echo 1 > /proc/sys/net/ipv4/conf/all/arp_filter

  - Install the interfaces in separate broadcast domains - either in
    different switches or in a switch partitioned to VLANs.

442 443 444 445 446 447
UDP Stress Test Dropped Packet Issue
--------------------------------------
Under small packets UDP stress test with 10GbE driver, the Linux system
may 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.
J
Jesse Brandeburg 已提交
448

449 450 451 452
Tx Hangs Possible Under Stress
------------------------------
Under stress conditions, if TX hangs occur, turning off TSO
"ethtool -K eth0 tso off" may resolve the problem.
J
Jesse Brandeburg 已提交
453 454


L
Linus Torvalds 已提交
455 456
Support
=======
J
Jesse Brandeburg 已提交
457
For general information, go to the Intel support website at:
L
Linus Torvalds 已提交
458

459
https://www.intel.com/support/
L
Linus Torvalds 已提交
460

J
Jesse Brandeburg 已提交
461 462
or the Intel Wired Networking project hosted by Sourceforge at:

463
https://sourceforge.net/projects/e1000
J
Jesse Brandeburg 已提交
464

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