Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

docs: networking: device drivers: convert chelsio/cxgb.txt to ReST

- add SPDX header;
- use copyright symbol;
- adjust titles and chapters, adding proper markups;
- comment out text-only TOC from html/pdf output;
- mark code blocks and literals as such;
- add notes markups;
- mark tables as such;
- mark lists as such;
- adjust identation, whitespaces and blank lines where needed;
- add to networking/index.rst.

Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>

authored by

Mauro Carvalho Chehab and committed by
David S. Miller
c839ce55 c958119a

+114 -72
+112 -71
Documentation/networking/device_drivers/chelsio/cxgb.txt Documentation/networking/device_drivers/chelsio/cxgb.rst
··· 1 - Chelsio N210 10Gb Ethernet Network Controller 1 + .. SPDX-License-Identifier: GPL-2.0 2 + .. include:: <isonum.txt> 2 3 3 - Driver Release Notes for Linux 4 + ============================================= 5 + Chelsio N210 10Gb Ethernet Network Controller 6 + ============================================= 4 7 5 - Version 2.1.1 8 + Driver Release Notes for Linux 6 9 7 - June 20, 2005 10 + Version 2.1.1 8 11 9 - CONTENTS 10 - ======== 12 + June 20, 2005 13 + 14 + .. Contents 15 + 11 16 INTRODUCTION 12 17 FEATURES 13 18 PERFORMANCE ··· 21 16 SUPPORT 22 17 23 18 24 - INTRODUCTION 19 + Introduction 25 20 ============ 26 21 27 22 This document describes the Linux driver for Chelsio 10Gb Ethernet Network ··· 29 24 compatible with the Chelsio N110 model 10Gb NICs. 30 25 31 26 32 - FEATURES 27 + Features 33 28 ======== 34 29 35 - Adaptive Interrupts (adaptive-rx) 36 - --------------------------------- 30 + Adaptive Interrupts (adaptive-rx) 31 + --------------------------------- 37 32 38 33 This feature provides an adaptive algorithm that adjusts the interrupt 39 34 coalescing parameters, allowing the driver to dynamically adapt the latency ··· 44 39 ethtool manpage for additional usage information. 45 40 46 41 By default, adaptive-rx is disabled. 47 - To enable adaptive-rx: 42 + To enable adaptive-rx:: 48 43 49 44 ethtool -C <interface> adaptive-rx on 50 45 51 - To disable adaptive-rx, use ethtool: 46 + To disable adaptive-rx, use ethtool:: 52 47 53 48 ethtool -C <interface> adaptive-rx off 54 49 55 50 After disabling adaptive-rx, the timer latency value will be set to 50us. 56 - You may set the timer latency after disabling adaptive-rx: 51 + You may set the timer latency after disabling adaptive-rx:: 57 52 58 53 ethtool -C <interface> rx-usecs <microseconds> 59 54 60 - An example to set the timer latency value to 100us on eth0: 55 + An example to set the timer latency value to 100us on eth0:: 61 56 62 57 ethtool -C eth0 rx-usecs 100 63 58 64 - You may also provide a timer latency value while disabling adaptive-rx: 59 + You may also provide a timer latency value while disabling adaptive-rx:: 65 60 66 61 ethtool -C <interface> adaptive-rx off rx-usecs <microseconds> 67 62 ··· 69 64 will be set to the specified value until changed by the user or until 70 65 adaptive-rx is enabled. 71 66 72 - To view the status of the adaptive-rx and timer latency values: 67 + To view the status of the adaptive-rx and timer latency values:: 73 68 74 69 ethtool -c <interface> 75 70 76 71 77 - TCP Segmentation Offloading (TSO) Support 78 - ----------------------------------------- 72 + TCP Segmentation Offloading (TSO) Support 73 + ----------------------------------------- 79 74 80 75 This feature, also known as "large send", enables a system's protocol stack 81 76 to offload portions of outbound TCP processing to a network interface card ··· 85 80 Please see the ethtool manpage for additional usage information. 86 81 87 82 By default, TSO is enabled. 88 - To disable TSO: 83 + To disable TSO:: 89 84 90 85 ethtool -K <interface> tso off 91 86 92 - To enable TSO: 87 + To enable TSO:: 93 88 94 89 ethtool -K <interface> tso on 95 90 96 - To view the status of TSO: 91 + To view the status of TSO:: 97 92 98 93 ethtool -k <interface> 99 94 100 95 101 - PERFORMANCE 96 + Performance 102 97 =========== 103 98 104 99 The following information is provided as an example of how to change system ··· 116 111 your system. You may want to write a script that runs at boot-up which 117 112 includes the optimal settings for your system. 118 113 119 - Setting PCI Latency Timer: 120 - setpci -d 1425:* 0x0c.l=0x0000F800 114 + Setting PCI Latency Timer:: 121 115 122 - Disabling TCP timestamp: 116 + setpci -d 1425:: 117 + 118 + * 0x0c.l=0x0000F800 119 + 120 + Disabling TCP timestamp:: 121 + 123 122 sysctl -w net.ipv4.tcp_timestamps=0 124 123 125 - Disabling SACK: 124 + Disabling SACK:: 125 + 126 126 sysctl -w net.ipv4.tcp_sack=0 127 127 128 - Setting large number of incoming connection requests: 128 + Setting large number of incoming connection requests:: 129 + 129 130 sysctl -w net.ipv4.tcp_max_syn_backlog=3000 130 131 131 - Setting maximum receive socket buffer size: 132 + Setting maximum receive socket buffer size:: 133 + 132 134 sysctl -w net.core.rmem_max=1024000 133 135 134 - Setting maximum send socket buffer size: 136 + Setting maximum send socket buffer size:: 137 + 135 138 sysctl -w net.core.wmem_max=1024000 136 139 137 - Set smp_affinity (on a multiprocessor system) to a single CPU: 140 + Set smp_affinity (on a multiprocessor system) to a single CPU:: 141 + 138 142 echo 1 > /proc/irq/<interrupt_number>/smp_affinity 139 143 140 - Setting default receive socket buffer size: 144 + Setting default receive socket buffer size:: 145 + 141 146 sysctl -w net.core.rmem_default=524287 142 147 143 - Setting default send socket buffer size: 148 + Setting default send socket buffer size:: 149 + 144 150 sysctl -w net.core.wmem_default=524287 145 151 146 - Setting maximum option memory buffers: 152 + Setting maximum option memory buffers:: 153 + 147 154 sysctl -w net.core.optmem_max=524287 148 155 149 - Setting maximum backlog (# of unprocessed packets before kernel drops): 156 + Setting maximum backlog (# of unprocessed packets before kernel drops):: 157 + 150 158 sysctl -w net.core.netdev_max_backlog=300000 151 159 152 - Setting TCP read buffers (min/default/max): 160 + Setting TCP read buffers (min/default/max):: 161 + 153 162 sysctl -w net.ipv4.tcp_rmem="10000000 10000000 10000000" 154 163 155 - Setting TCP write buffers (min/pressure/max): 164 + Setting TCP write buffers (min/pressure/max):: 165 + 156 166 sysctl -w net.ipv4.tcp_wmem="10000000 10000000 10000000" 157 167 158 - Setting TCP buffer space (min/pressure/max): 168 + Setting TCP buffer space (min/pressure/max):: 169 + 159 170 sysctl -w net.ipv4.tcp_mem="10000000 10000000 10000000" 160 171 161 172 TCP window size for single connections: 173 + 162 174 The receive buffer (RX_WINDOW) size must be at least as large as the 163 175 Bandwidth-Delay Product of the communication link between the sender and 164 176 receiver. Due to the variations of RTT, you may want to increase the buffer 165 177 size up to 2 times the Bandwidth-Delay Product. Reference page 289 of 166 178 "TCP/IP Illustrated, Volume 1, The Protocols" by W. Richard Stevens. 167 - At 10Gb speeds, use the following formula: 179 + 180 + At 10Gb speeds, use the following formula:: 181 + 168 182 RX_WINDOW >= 1.25MBytes * RTT(in milliseconds) 169 183 Example for RTT with 100us: RX_WINDOW = (1,250,000 * 0.1) = 125,000 184 + 170 185 RX_WINDOW sizes of 256KB - 512KB should be sufficient. 171 - Setting the min, max, and default receive buffer (RX_WINDOW) size: 186 + 187 + Setting the min, max, and default receive buffer (RX_WINDOW) size:: 188 + 172 189 sysctl -w net.ipv4.tcp_rmem="<min> <default> <max>" 173 190 174 191 TCP window size for multiple connections: ··· 201 174 not supported on the machine. Experimentation may be necessary to attain 202 175 the correct value. This method is provided as a starting point for the 203 176 correct receive buffer size. 177 + 204 178 Setting the min, max, and default receive buffer (RX_WINDOW) size is 205 179 performed in the same manner as single connection. 206 180 207 181 208 - DRIVER MESSAGES 182 + Driver Messages 209 183 =============== 210 184 211 185 The following messages are the most common messages logged by syslog. These 212 186 may be found in /var/log/messages. 213 187 214 - Driver up: 188 + Driver up:: 189 + 215 190 Chelsio Network Driver - version 2.1.1 216 191 217 - NIC detected: 192 + NIC detected:: 193 + 218 194 eth#: Chelsio N210 1x10GBaseX NIC (rev #), PCIX 133MHz/64-bit 219 195 220 - Link up: 196 + Link up:: 197 + 221 198 eth#: link is up at 10 Gbps, full duplex 222 199 223 - Link down: 200 + Link down:: 201 + 224 202 eth#: link is down 225 203 226 204 227 - KNOWN ISSUES 205 + Known Issues 228 206 ============ 229 207 230 208 These issues have been identified during testing. The following information ··· 246 214 247 215 To eliminate the TCP retransmits, set smp_affinity on the particular 248 216 interrupt to a single CPU. You can locate the interrupt (IRQ) used on 249 - the N110/N210 by using ifconfig: 250 - ifconfig <dev_name> | grep Interrupt 251 - Set the smp_affinity to a single CPU: 252 - echo 1 > /proc/irq/<interrupt_number>/smp_affinity 217 + the N110/N210 by using ifconfig:: 218 + 219 + ifconfig <dev_name> | grep Interrupt 220 + 221 + Set the smp_affinity to a single CPU:: 222 + 223 + echo 1 > /proc/irq/<interrupt_number>/smp_affinity 253 224 254 225 It is highly suggested that you do not run the irqbalance daemon on your 255 226 system, as this will change any smp_affinity setting you have applied. 256 227 The irqbalance daemon runs on a 10 second interval and binds interrupts 257 - to the least loaded CPU determined by the daemon. To disable this daemon: 258 - chkconfig --level 2345 irqbalance off 228 + to the least loaded CPU determined by the daemon. To disable this daemon:: 229 + 230 + chkconfig --level 2345 irqbalance off 259 231 260 232 By default, some Linux distributions enable the kernel feature, 261 233 irqbalance, which performs the same function as the daemon. To disable 262 - this feature, add the following line to your bootloader: 263 - noirqbalance 234 + this feature, add the following line to your bootloader:: 264 235 265 - Example using the Grub bootloader: 266 - title Red Hat Enterprise Linux AS (2.4.21-27.ELsmp) 267 - root (hd0,0) 268 - kernel /vmlinuz-2.4.21-27.ELsmp ro root=/dev/hda3 noirqbalance 269 - initrd /initrd-2.4.21-27.ELsmp.img 236 + noirqbalance 237 + 238 + Example using the Grub bootloader:: 239 + 240 + title Red Hat Enterprise Linux AS (2.4.21-27.ELsmp) 241 + root (hd0,0) 242 + kernel /vmlinuz-2.4.21-27.ELsmp ro root=/dev/hda3 noirqbalance 243 + initrd /initrd-2.4.21-27.ELsmp.img 270 244 271 245 2. After running insmod, the driver is loaded and the incorrect network 272 246 interface is brought up without running ifup. ··· 315 277 AMD's provides three workarounds for this problem, however, Chelsio 316 278 recommends the first option for best performance with this bug: 317 279 318 - For 133Mhz secondary bus operation, limit the transaction length and 319 - the number of outstanding transactions, via BIOS configuration 320 - programming of the PCI-X card, to the following: 280 + For 133Mhz secondary bus operation, limit the transaction length and 281 + the number of outstanding transactions, via BIOS configuration 282 + programming of the PCI-X card, to the following: 321 283 322 - Data Length (bytes): 1k 323 - Total allowed outstanding transactions: 2 284 + Data Length (bytes): 1k 285 + 286 + Total allowed outstanding transactions: 2 324 287 325 288 Please refer to AMD 8131-HT/PCI-X Errata 26310 Rev 3.08 August 2004, 326 289 section 56, "133-MHz Mode Split Completion Data Corruption" for more ··· 332 293 have issues with these settings, please revert to the "safe" settings 333 294 and duplicate the problem before submitting a bug or asking for support. 334 295 335 - NOTE: The default setting on most systems is 8 outstanding transactions 336 - and 2k bytes data length. 296 + .. note:: 297 + 298 + The default setting on most systems is 8 outstanding transactions 299 + and 2k bytes data length. 337 300 338 301 4. On multiprocessor systems, it has been noted that an application which 339 302 is handling 10Gb networking can switch between CPUs causing degraded ··· 361 320 particular CPU: runon 0 ifup eth0 362 321 363 322 364 - SUPPORT 323 + Support 365 324 ======= 366 325 367 326 If you have problems with the software or hardware, please contact our 368 327 customer support team via email at support@chelsio.com or check our website 369 328 at http://www.chelsio.com 370 329 371 - =============================================================================== 330 + ------------------------------------------------------------------------------- 331 + 332 + :: 372 333 373 334 Chelsio Communications 374 335 370 San Aleso Ave. ··· 386 343 with this program; if not, write to the Free Software Foundation, Inc., 387 344 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 388 345 389 - THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED 346 + THIS SOFTWARE IS PROVIDED ``AS IS`` AND WITHOUT ANY EXPRESS OR IMPLIED 390 347 WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF 391 348 MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 392 349 393 - Copyright (c) 2003-2005 Chelsio Communications. All rights reserved. 394 - 395 - =============================================================================== 350 + Copyright |copy| 2003-2005 Chelsio Communications. All rights reserved.
+1
Documentation/networking/device_drivers/index.rst
··· 31 31 3com/vortex 32 32 amazon/ena 33 33 aquantia/atlantic 34 + chelsio/cxgb 34 35 35 36 .. only:: subproject and html 36 37
+1 -1
drivers/net/ethernet/chelsio/Kconfig
··· 26 26 This driver supports Chelsio gigabit and 10-gigabit 27 27 Ethernet cards. More information about adapter features and 28 28 performance tuning is in 29 - <file:Documentation/networking/device_drivers/chelsio/cxgb.txt>. 29 + <file:Documentation/networking/device_drivers/chelsio/cxgb.rst>. 30 30 31 31 For general information about Chelsio and our products, visit 32 32 our website at <http://www.chelsio.com>.