ixgb.txt 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433
  1. Linux Base Driver for 10 Gigabit Intel(R) Ethernet Network Connection
  2. =====================================================================
  3. March 14, 2011
  4. Contents
  5. ========
  6. - In This Release
  7. - Identifying Your Adapter
  8. - Building and Installation
  9. - Command Line Parameters
  10. - Improving Performance
  11. - Additional Configurations
  12. - Known Issues/Troubleshooting
  13. - Support
  14. In This Release
  15. ===============
  16. This file describes the ixgb Linux Base Driver for the 10 Gigabit Intel(R)
  17. Network Connection. This driver includes support for Itanium(R)2-based
  18. systems.
  19. For questions related to hardware requirements, refer to the documentation
  20. supplied with your 10 Gigabit adapter. All hardware requirements listed apply
  21. to use with Linux.
  22. The following features are available in this kernel:
  23. - Native VLANs
  24. - Channel Bonding (teaming)
  25. - SNMP
  26. Channel Bonding documentation can be found in the Linux kernel source:
  27. /Documentation/networking/bonding.txt
  28. The driver information previously displayed in the /proc filesystem is not
  29. supported in this release. Alternatively, you can use ethtool (version 1.6
  30. or later), lspci, and iproute2 to obtain the same information.
  31. Instructions on updating ethtool can be found in the section "Additional
  32. Configurations" later in this document.
  33. Identifying Your Adapter
  34. ========================
  35. The following Intel network adapters are compatible with the drivers in this
  36. release:
  37. Controller Adapter Name Physical Layer
  38. ---------- ------------ --------------
  39. 82597EX Intel(R) PRO/10GbE LR/SR/CX4 10G Base-LR (1310 nm optical fiber)
  40. Server Adapters 10G Base-SR (850 nm optical fiber)
  41. 10G Base-CX4(twin-axial copper cabling)
  42. For more information on how to identify your adapter, go to the Adapter &
  43. Driver ID Guide at:
  44. http://support.intel.com/support/network/sb/CS-012904.htm
  45. Building and Installation
  46. =========================
  47. select m for "Intel(R) PRO/10GbE support" located at:
  48. Location:
  49. -> Device Drivers
  50. -> Network device support (NETDEVICES [=y])
  51. -> Ethernet (10000 Mbit) (NETDEV_10000 [=y])
  52. 1. make modules && make modules_install
  53. 2. Load the module:
  54.     modprobe ixgb <parameter>=<value>
  55. The insmod command can be used if the full
  56. path to the driver module is specified. For example:
  57. insmod /lib/modules/<KERNEL VERSION>/kernel/drivers/net/ixgb/ixgb.ko
  58. With 2.6 based kernels also make sure that older ixgb drivers are
  59. removed from the kernel, before loading the new module:
  60. rmmod ixgb; modprobe ixgb
  61. 3. Assign an IP address to the interface by entering the following, where
  62. x is the interface number:
  63. ip addr add ethx <IP_address>
  64. 4. Verify that the interface works. Enter the following, where <IP_address>
  65. is the IP address for another machine on the same subnet as the interface
  66. that is being tested:
  67. ping <IP_address>
  68. Command Line Parameters
  69. =======================
  70. If the driver is built as a module, the following optional parameters are
  71. used by entering them on the command line with the modprobe command using
  72. this syntax:
  73. modprobe ixgb [<option>=<VAL1>,<VAL2>,...]
  74. For example, with two 10GbE PCI adapters, entering:
  75. modprobe ixgb TxDescriptors=80,128
  76. loads the ixgb driver with 80 TX resources for the first adapter and 128 TX
  77. resources for the second adapter.
  78. The default value for each parameter is generally the recommended setting,
  79. unless otherwise noted.
  80. FlowControl
  81. Valid Range: 0-3 (0=none, 1=Rx only, 2=Tx only, 3=Rx&Tx)
  82. Default: Read from the EEPROM
  83. If EEPROM is not detected, default is 1
  84. This parameter controls the automatic generation(Tx) and response(Rx) to
  85. Ethernet PAUSE frames. There are hardware bugs associated with enabling
  86. Tx flow control so beware.
  87. RxDescriptors
  88. Valid Range: 64-512
  89. Default Value: 512
  90. This value is the number of receive descriptors allocated by the driver.
  91. Increasing this value allows the driver to buffer more incoming packets.
  92. Each descriptor is 16 bytes. A receive buffer is also allocated for
  93. each descriptor and can be either 2048, 4056, 8192, or 16384 bytes,
  94. depending on the MTU setting. When the MTU size is 1500 or less, the
  95. receive buffer size is 2048 bytes. When the MTU is greater than 1500 the
  96. receive buffer size will be either 4056, 8192, or 16384 bytes. The
  97. maximum MTU size is 16114.
  98. RxIntDelay
  99. Valid Range: 0-65535 (0=off)
  100. Default Value: 72
  101. This value delays the generation of receive interrupts in units of
  102. 0.8192 microseconds. Receive interrupt reduction can improve CPU
  103. efficiency if properly tuned for specific network traffic. Increasing
  104. this value adds extra latency to frame reception and can end up
  105. decreasing the throughput of TCP traffic. If the system is reporting
  106. dropped receives, this value may be set too high, causing the driver to
  107. run out of available receive descriptors.
  108. TxDescriptors
  109. Valid Range: 64-4096
  110. Default Value: 256
  111. This value is the number of transmit descriptors allocated by the driver.
  112. Increasing this value allows the driver to queue more transmits. Each
  113. descriptor is 16 bytes.
  114. XsumRX
  115. Valid Range: 0-1
  116. Default Value: 1
  117. A value of '1' indicates that the driver should enable IP checksum
  118. offload for received packets (both UDP and TCP) to the adapter hardware.
  119. Improving Performance
  120. =====================
  121. With the 10 Gigabit server adapters, the default Linux configuration will
  122. very likely limit the total available throughput artificially. There is a set
  123. of configuration changes that, when applied together, will increase the ability
  124. of Linux to transmit and receive data. The following enhancements were
  125. originally acquired from settings published at http://www.spec.org/web99/ for
  126. various submitted results using Linux.
  127. NOTE: These changes are only suggestions, and serve as a starting point for
  128. tuning your network performance.
  129. The changes are made in three major ways, listed in order of greatest effect:
  130. - Use ip link 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. NOTE: setpci modifies the adapter's configuration registers to allow it to read
  136. up to 4k bytes at a time (for transmits). However, for some systems the
  137. behavior after modifying this register may be undefined (possibly errors of
  138. some kind). A power-cycle, hard reset or explicitly setting the e6 register
  139. back to 22 (setpci -d 8086:1a48 e6.b=22) may be required to get back to a
  140. stable configuration.
  141. - COPY these lines and paste them into ixgb_perf.sh:
  142. #!/bin/bash
  143. echo "configuring network performance , edit this file to change the interface
  144. or device ID of 10GbE card"
  145. # set mmrbc to 4k reads, modify only Intel 10GbE device IDs
  146. # replace 1a48 with appropriate 10GbE device's ID installed on the system,
  147. # if needed.
  148. setpci -d 8086:1a48 e6.b=2e
  149. # set the MTU (max transmission unit) - it requires your switch and clients
  150. # to change as well.
  151. # set the txqueuelen
  152. # your ixgb adapter should be loaded as eth1 for this to work, change if needed
  153. ip li set dev eth1 mtu 9000 txqueuelen 1000 up
  154. # call the sysctl utility to modify /proc/sys entries
  155. sysctl -p ./sysctl_ixgb.conf
  156. - END ixgb_perf.sh
  157. - COPY these lines and paste them into sysctl_ixgb.conf:
  158. # some of the defaults may be different for your kernel
  159. # call this file with sysctl -p <this file>
  160. # these are just suggested values that worked well to increase throughput in
  161. # several network benchmark tests, your mileage may vary
  162. ### IPV4 specific settings
  163. # turn TCP timestamp support off, default 1, reduces CPU use
  164. net.ipv4.tcp_timestamps = 0
  165. # turn SACK support off, default on
  166. # on systems with a VERY fast bus -> memory interface this is the big gainer
  167. net.ipv4.tcp_sack = 0
  168. # set min/default/max TCP read buffer, default 4096 87380 174760
  169. net.ipv4.tcp_rmem = 10000000 10000000 10000000
  170. # set min/pressure/max TCP write buffer, default 4096 16384 131072
  171. net.ipv4.tcp_wmem = 10000000 10000000 10000000
  172. # set min/pressure/max TCP buffer space, default 31744 32256 32768
  173. net.ipv4.tcp_mem = 10000000 10000000 10000000
  174. ### CORE settings (mostly for socket and UDP effect)
  175. # set maximum receive socket buffer size, default 131071
  176. net.core.rmem_max = 524287
  177. # set maximum send socket buffer size, default 131071
  178. net.core.wmem_max = 524287
  179. # set default receive socket buffer size, default 65535
  180. net.core.rmem_default = 524287
  181. # set default send socket buffer size, default 65535
  182. net.core.wmem_default = 524287
  183. # set maximum amount of option memory buffers, default 10240
  184. net.core.optmem_max = 524287
  185. # set number of unprocessed input packets before kernel starts dropping them; default 300
  186. net.core.netdev_max_backlog = 300000
  187. - END sysctl_ixgb.conf
  188. Edit the ixgb_perf.sh script if necessary to change eth1 to whatever interface
  189. your ixgb driver is using and/or replace '1a48' with appropriate 10GbE device's
  190. ID installed on the system.
  191. NOTE: Unless these scripts are added to the boot process, these changes will
  192. only last only until the next system reboot.
  193. Resolving Slow UDP Traffic
  194. --------------------------
  195. If your server does not seem to be able to receive UDP traffic as fast as it
  196. can receive TCP traffic, it could be because Linux, by default, does not set
  197. the network stack buffers as large as they need to be to support high UDP
  198. transfer rates. One way to alleviate this problem is to allow more memory to
  199. be used by the IP stack to store incoming data.
  200. For instance, use the commands:
  201. sysctl -w net.core.rmem_max=262143
  202. and
  203. sysctl -w net.core.rmem_default=262143
  204. to increase the read buffer memory max and default to 262143 (256k - 1) from
  205. defaults of max=131071 (128k - 1) and default=65535 (64k - 1). These variables
  206. will increase the amount of memory used by the network stack for receives, and
  207. can be increased significantly more if necessary for your application.
  208. Additional Configurations
  209. =========================
  210. Configuring the Driver on Different Distributions
  211. -------------------------------------------------
  212. Configuring a network driver to load properly when the system is started is
  213. distribution dependent. Typically, the configuration process involves adding
  214. an alias line to /etc/modprobe.conf as well as editing other system startup
  215. scripts and/or configuration files. Many popular Linux distributions ship
  216. with tools to make these changes for you. To learn the proper way to
  217. configure a network device for your system, refer to your distribution
  218. documentation. If during this process you are asked for the driver or module
  219. name, the name for the Linux Base Driver for the Intel 10GbE Family of
  220. Adapters is ixgb.
  221. Viewing Link Messages
  222. ---------------------
  223. Link messages will not be displayed to the console if the distribution is
  224. restricting system messages. In order to see network driver link messages on
  225. your console, set dmesg to eight by entering the following:
  226. dmesg -n 8
  227. NOTE: This setting is not saved across reboots.
  228. Jumbo Frames
  229. ------------
  230. The driver supports Jumbo Frames for all adapters. Jumbo Frames support is
  231. enabled by changing the MTU to a value larger than the default of 1500.
  232. The maximum value for the MTU is 16114. Use the ip command to
  233. increase the MTU size. For example:
  234. ip li set dev ethx mtu 9000
  235. The maximum MTU setting for Jumbo Frames is 16114. This value coincides
  236. with the maximum Jumbo Frames size of 16128.
  237. ethtool
  238. -------
  239. The driver utilizes the ethtool interface for driver configuration and
  240. diagnostics, as well as displaying statistical information. The ethtool
  241. version 1.6 or later is required for this functionality.
  242. The latest release of ethtool can be found from
  243. http://ftp.kernel.org/pub/software/network/ethtool/
  244. NOTE: The ethtool version 1.6 only supports a limited set of ethtool options.
  245. Support for a more complete ethtool feature set can be enabled by
  246. upgrading to the latest version.
  247. NAPI
  248. ----
  249. NAPI (Rx polling mode) is supported in the ixgb driver. NAPI is enabled
  250. or disabled based on the configuration of the kernel. see CONFIG_IXGB_NAPI
  251. See www.cyberus.ca/~hadi/usenix-paper.tgz for more information on NAPI.
  252. Known Issues/Troubleshooting
  253. ============================
  254. NOTE: After installing the driver, if your Intel Network Connection is not
  255. working, verify in the "In This Release" section of the readme that you have
  256. installed the correct driver.
  257. Intel(R) PRO/10GbE CX4 Server Adapter Cable Interoperability Issue with
  258. Fujitsu XENPAK Module in SmartBits Chassis
  259. ---------------------------------------------------------------------
  260. Excessive CRC errors may be observed if the Intel(R) PRO/10GbE CX4
  261. Server adapter is connected to a Fujitsu XENPAK CX4 module in a SmartBits
  262. chassis using 15 m/24AWG cable assemblies manufactured by Fujitsu or Leoni.
  263. The CRC errors may be received either by the Intel(R) PRO/10GbE CX4
  264. Server adapter or the SmartBits. If this situation occurs using a different
  265. cable assembly may resolve the issue.
  266. CX4 Server Adapter Cable Interoperability Issues with HP Procurve 3400cl
  267. Switch Port
  268. ------------------------------------------------------------------------
  269. Excessive CRC errors may be observed if the Intel(R) PRO/10GbE CX4 Server
  270. adapter is connected to an HP Procurve 3400cl switch port using short cables
  271. (1 m or shorter). If this situation occurs, using a longer cable may resolve
  272. the issue.
  273. Excessive CRC errors may be observed using Fujitsu 24AWG cable assemblies that
  274. Are 10 m or longer or where using a Leoni 15 m/24AWG cable assembly. The CRC
  275. errors may be received either by the CX4 Server adapter or at the switch. If
  276. this situation occurs, using a different cable assembly may resolve the issue.
  277. Jumbo Frames System Requirement
  278. -------------------------------
  279. Memory allocation failures have been observed on Linux systems with 64 MB
  280. of RAM or less that are running Jumbo Frames. If you are using Jumbo
  281. Frames, your system may require more than the advertised minimum
  282. requirement of 64 MB of system memory.
  283. Performance Degradation with Jumbo Frames
  284. -----------------------------------------
  285. Degradation in throughput performance may be observed in some Jumbo frames
  286. environments. If this is observed, increasing the application's socket buffer
  287. size and/or increasing the /proc/sys/net/ipv4/tcp_*mem entry values may help.
  288. See the specific application manual and /usr/src/linux*/Documentation/
  289. networking/ip-sysctl.txt for more details.
  290. Allocating Rx Buffers when Using Jumbo Frames
  291. ---------------------------------------------
  292. Allocating Rx buffers when using Jumbo Frames on 2.6.x kernels may fail if
  293. the available memory is heavily fragmented. This issue may be seen with PCI-X
  294. adapters or with packet split disabled. This can be reduced or eliminated
  295. by changing the amount of available memory for receive buffer allocation, by
  296. increasing /proc/sys/vm/min_free_kbytes.
  297. Multiple Interfaces on Same Ethernet Broadcast Network
  298. ------------------------------------------------------
  299. Due to the default ARP behavior on Linux, it is not possible to have
  300. one system on two IP networks in the same Ethernet broadcast domain
  301. (non-partitioned switch) behave as expected. All Ethernet interfaces
  302. will respond to IP traffic for any IP address assigned to the system.
  303. This results in unbalanced receive traffic.
  304. If you have multiple interfaces in a server, do either of the following:
  305. - Turn on ARP filtering by entering:
  306. echo 1 > /proc/sys/net/ipv4/conf/all/arp_filter
  307. - Install the interfaces in separate broadcast domains - either in
  308. different switches or in a switch partitioned to VLANs.
  309. UDP Stress Test Dropped Packet Issue
  310. --------------------------------------
  311. Under small packets UDP stress test with 10GbE driver, the Linux system
  312. may drop UDP packets due to the fullness of socket buffers. You may want
  313. to change the driver's Flow Control variables to the minimum value for
  314. controlling packet reception.
  315. Tx Hangs Possible Under Stress
  316. ------------------------------
  317. Under stress conditions, if TX hangs occur, turning off TSO
  318. "ethtool -K eth0 tso off" may resolve the problem.
  319. Support
  320. =======
  321. For general information, go to the Intel support website at:
  322. http://support.intel.com
  323. or the Intel Wired Networking project hosted by Sourceforge at:
  324. http://sourceforge.net/projects/e1000
  325. If an issue is identified with the released source code on the supported
  326. kernel with a supported adapter, email the specific information related
  327. to the issue to e1000-devel@lists.sf.net