1.\" Copyright (c) 2011-2016, Chelsio Inc 2.\" All rights reserved. 3.\" 4.\" Redistribution and use in source and binary forms, with or without 5.\" modification, are permitted provided that the following conditions are met: 6.\" 7.\" 1. Redistributions of source code must retain the above copyright notice, 8.\" this list of conditions and the following disclaimer. 9.\" 10.\" 2. Redistributions in binary form must reproduce the above copyright 11.\" notice, this list of conditions and the following disclaimer in the 12.\" documentation and/or other materials provided with the distribution. 13.\" 14.\" 3. Neither the name of the Chelsio Inc nor the names of its 15.\" contributors may be used to endorse or promote products derived from 16.\" this software without specific prior written permission. 17.\" 18.\" THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 19.\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 20.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 21.\" ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE 22.\" LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 23.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 24.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 25.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 26.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 27.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 28.\" POSSIBILITY OF SUCH DAMAGE. 29.\" 30.\" * Other names and brands may be claimed as the property of others. 31.\" 32.\" $FreeBSD$ 33.\" 34.Dd May 16, 2017 35.Dt CXGBE 4 36.Os 37.Sh NAME 38.Nm cxgbe 39.Nd "Chelsio T4-, T5-, and T6-based 100Gb, 40Gb, 25Gb, 10Gb, and 1Gb Ethernet adapter driver" 40.Sh SYNOPSIS 41To compile this driver into the kernel, 42place the following lines in your 43kernel configuration file: 44.Bd -ragged -offset indent 45.Cd "device cxgbe" 46.Ed 47.Pp 48To load the driver as a 49module at boot time, place the following lines in 50.Xr loader.conf 5 : 51.Bd -literal -offset indent 52t4fw_cfg_load="YES" 53t5fw_cfg_load="YES" 54t6fw_cfg_load="YES" 55if_cxgbe_load="YES" 56.Ed 57.Sh DESCRIPTION 58The 59.Nm 60driver provides support for PCI Express Ethernet adapters based on 61the Chelsio Terminator 4, Terminator 5, and Terminator 6 ASICs (T4, T5, and T6). 62The driver supports Jumbo Frames, Transmit/Receive checksum offload, 63TCP segmentation offload (TSO), Large Receive Offload (LRO), VLAN 64tag insertion/extraction, VLAN checksum offload, VLAN TSO, and 65Receive Side Steering (RSS). 66For further hardware information and questions related to hardware 67requirements, see 68.Pa http://www.chelsio.com/ . 69.Pp 70The 71.Nm 72driver uses different names for devices based on the associated ASIC: 73.Bl -column -offset indent "ASIC" "Port Name" "Parent Device" 74.It Sy ASIC Ta Sy Port Name Ta Sy Parent Device Ta Sy Virtual Interface 75.It T4 Ta cxgbe Ta t4nex Ta vcxgbe 76.It T5 Ta cxl Ta t5nex Ta vcxl 77.It T6 Ta cc Ta t6nex Ta vcc 78.El 79.Pp 80Loader tunables with the hw.cxgbe prefix apply to all cards. 81The driver provides sysctl MIBs for both ports and parent devices using 82the names above. 83For example, a T5 adapter provides port MIBs under dev.cxl and 84adapter-wide MIBs under dev.t5nex. 85References to sysctl MIBs in the remainder of this page use 86dev.<port> for port MIBs and dev.<nexus> for adapter-wide MIBs. 87.Pp 88For more information on configuring this device, see 89.Xr ifconfig 8 . 90.Sh HARDWARE 91The 92.Nm 93driver supports 100Gb and 25Gb Ethernet adapters based on the T6 ASIC: 94.Pp 95.Bl -bullet -compact 96.It 97Chelsio T6225-CR 98.It 99Chelsio T6225-SO-CR 100.It 101Chelsio T62100-LP-CR 102.It 103Chelsio T62100-SO-CR 104.It 105Chelsio T62100-CR 106.El 107.Pp 108The 109.Nm 110driver supports 40Gb, 10Gb and 1Gb Ethernet adapters based on the T5 ASIC: 111.Pp 112.Bl -bullet -compact 113.It 114Chelsio T580-CR 115.It 116Chelsio T580-LP-CR 117.It 118Chelsio T580-LP-SO-CR 119.It 120Chelsio T560-CR 121.It 122Chelsio T540-CR 123.It 124Chelsio T540-LP-CR 125.It 126Chelsio T522-CR 127.It 128Chelsio T520-LL-CR 129.It 130Chelsio T520-CR 131.It 132Chelsio T520-SO 133.It 134Chelsio T520-BT 135.It 136Chelsio T504-BT 137.El 138.Pp 139The 140.Nm 141driver supports 10Gb and 1Gb Ethernet adapters based on the T4 ASIC: 142.Pp 143.Bl -bullet -compact 144.It 145Chelsio T420-CR 146.It 147Chelsio T422-CR 148.It 149Chelsio T440-CR 150.It 151Chelsio T420-BCH 152.It 153Chelsio T440-BCH 154.It 155Chelsio T440-CH 156.It 157Chelsio T420-SO 158.It 159Chelsio T420-CX 160.It 161Chelsio T420-BT 162.It 163Chelsio T404-BT 164.El 165.Sh LOADER TUNABLES 166Tunables can be set at the 167.Xr loader 8 168prompt before booting the kernel or stored in 169.Xr loader.conf 5 . 170There are multiple tunables that control the number of queues of various 171types. 172A negative value for such a tunable instructs the driver to create 173up to that many queues if there are enough CPU cores available. 174.Bl -tag -width indent 175.It Va hw.cxgbe.ntxq10g 176Number of tx queues used for a 10Gb or higher-speed port. 177The default is 16 or the number 178of CPU cores in the system, whichever is less. 179.It Va hw.cxgbe.nrxq10g 180Number of rx queues used for a 10Gb or higher-speed port. 181The default is 8 or the number 182of CPU cores in the system, whichever is less. 183.It Va hw.cxgbe.ntxq1g 184Number of tx queues used for a 1Gb port. 185The default is 4 or the number 186of CPU cores in the system, whichever is less. 187.It Va hw.cxgbe.nrxq1g 188Number of rx queues used for a 1Gb port. 189The default is 2 or the number 190of CPU cores in the system, whichever is less. 191.It Va hw.cxgbe.nofldtxq10g 192Number of TOE tx queues used for a 10Gb or higher-speed port. 193The default is 8 or the 194number of CPU cores in the system, whichever is less. 195.It Va hw.cxgbe.nofldrxq10g 196Number of TOE rx queues used for a 10Gb or higher-speed port. 197The default is 2 or the 198number of CPU cores in the system, whichever is less. 199.It Va hw.cxgbe.nofldtxq1g 200Number of TOE tx queues used for a 1Gb port. 201The default is 2 or the 202number of CPU cores in the system, whichever is less. 203.It Va hw.cxgbe.nofldrxq1g 204Number of TOE rx queues used for a 1Gb port. 205The default is 1. 206.It Va hw.cxgbe.num_vis 207Number of virtual interfaces (VIs) created for each port. 208Each virtual interface creates a separate network interface. 209The first virtual interface on each port is required and represents 210the primary network interface on the port. 211Additional virtual interfaces on a port are named using the Virtual Interface 212name from the table above. 213Additional virtual interfaces use a single pair of queues 214for rx and tx as well an additional pair of queues for TOE rx and tx. 215The default is 1. 216.It Va hw.cxgbe.holdoff_timer_idx_10G 217.It Va hw.cxgbe.holdoff_timer_idx_1G 218.It Va hw.cxgbe.holdoff_timer_idx_ofld 219Timer index value used to delay interrupts. 220The holdoff timer list has the values 1, 5, 10, 50, 100, and 200 221by default (all values are in microseconds) and the index selects a 222value from this list. 223holdoff_timer_idx_ofld applies to queues used for TOE rx. 224The default value is 1 which means the timer value is 5us. 225Different interfaces can be assigned different values at any time via the 226dev.<port>.X.holdoff_tmr_idx and dev.<port>.X.holdoff_tmr_idx_ofld sysctls. 227.It Va hw.cxgbe.holdoff_pktc_idx_10G 228.It Va hw.cxgbe.holdoff_pktc_idx_1G 229.It Va hw.cxgbe.holdoff_pktc_idx_ofld 230Packet-count index value used to delay interrupts. 231The packet-count list has the values 1, 8, 16, and 32 by default, 232and the index selects a value from this list. 233holdoff_pktc_idx_ofld applies to queues used for TOE rx. 234The default value is -1 which means packet counting is disabled and interrupts 235are generated based solely on the holdoff timer value. 236Different interfaces can be assigned different values via the 237dev.<port>.X.holdoff_pktc_idx and dev.<port>.X.holdoff_pktc_idx_ofld sysctls. 238These sysctls work only when the interface has never been marked up (as done by 239ifconfig up). 240.It Va hw.cxgbe.qsize_txq 241Number of entries in a transmit queue's descriptor ring. 242A buf_ring of the same size is also allocated for additional 243software queuing. 244See 245.Xr ifnet 9 . 246The default value is 1024. 247Different interfaces can be assigned different values via the 248dev.<port>.X.qsize_txq sysctl. 249This sysctl works only when the interface has never been marked up (as done by 250ifconfig up). 251.It Va hw.cxgbe.qsize_rxq 252Number of entries in a receive queue's descriptor ring. 253The default value is 1024. 254Different interfaces can be assigned different values via the 255dev.<port>.X.qsize_rxq sysctl. 256This sysctl works only when the interface has never been marked up (as done by 257ifconfig up). 258.It Va hw.cxgbe.interrupt_types 259Permitted interrupt types. 260Bit 0 represents INTx (line interrupts), bit 1 MSI, and bit 2 MSI-X. 261The default is 7 (all allowed). 262The driver selects the best possible type out of the allowed types. 263.It Va hw.cxgbe.fw_install 2640 prohibits the driver from installing a firmware on the card. 2651 allows the driver to install a new firmware if internal driver 266heuristics indicate that the new firmware is preferable to the one 267already on the card. 2682 instructs the driver to always install the new firmware on the card as 269long as it is compatible with the driver and is a different version than 270the one already on the card. 271The default is 1. 272.It Va hw.cxgbe.fl_pktshift 273Number of padding bytes inserted before the beginning of an Ethernet 274frame in the receive buffer. 275The default value of 2 ensures that the Ethernet payload (usually the IP header) 276is at a 4 byte aligned address. 2770-7 are all valid values. 278.It Va hw.cxgbe.fl_pad 279A non-zero value ensures that writes from the hardware to a receive buffer are 280padded up to the specified boundary. 281The default is -1 which lets the driver pick a pad boundary. 2820 disables trailer padding completely. 283.It Va hw.cxgbe.cong_drop 284Controls the hardware response to congestion. 285-1 disables congestion feedback and is not recommended. 2860 instructs the hardware to backpressure its pipeline on congestion. 287This usually results in the port emitting PAUSE frames. 2881 instructs the hardware to drop frames destined for congested queues. 289.It Va hw.cxgbe.pause_settings 290PAUSE frame settings. 291Bit 0 is rx_pause, bit 1 is tx_pause. 292rx_pause = 1 instructs the hardware to heed incoming PAUSE frames, 0 instructs 293it to ignore them. 294tx_pause = 1 allows the hardware to emit PAUSE frames when its receive FIFO 295reaches a high threshold, 0 prohibits the hardware from emitting PAUSE frames. 296The default is 3 (both rx_pause and tx_pause = 1). 297This tunable establishes the default PAUSE settings for all ports. 298Settings can be displayed and controlled on a per-port basis via the 299dev.<port>.X.pause_settings sysctl. 300.It Va hw.cxgbe.fec 301FEC (Forward Error Correction) settings. 3020 diables FEC. 303Bit 0 enables RS FEC, bit 1 enables BASE-R RS, bit 3 is reserved. 304The default is -1 which lets the driver pick a value. 305This tunable establishes the default FEC settings for all ports. 306Settings can be displayed and controlled on a per-port basis via the 307dev.<port>.X.fec sysctl. 308.It Va hw.cxgbe.autoneg 309Link autonegotiation settings. 310This tunable establishes the default autonegotiation settings for all ports. 311Settings can be displayed and controlled on a per-port basis via the 312dev.<port>.X.autoneg sysctl. 3130 disables autonegotiation. 3141 enables autonegotiation. 315The default is -1 which lets the driver pick a value. 316dev.<port>.X.autoneg is -1 for port and module combinations that do not support 317autonegotiation. 318.It Va hw.cxgbe.buffer_packing 319Allow the hardware to deliver multiple frames in the same receive buffer 320opportunistically. 321The default is -1 which lets the driver decide. 3220 or 1 explicitly disable or enable this feature. 323.It Va hw.cxgbe.allow_mbufs_in_cluster 3241 allows the driver to lay down one or more mbufs within the receive buffer 325opportunistically. 326This is the default. 3270 prohibits the driver from doing so. 328.It Va hw.cxgbe.largest_rx_cluster 329.It Va hw.cxgbe.safest_rx_cluster 330Sizes of rx clusters. 331Each of these must be set to one of the sizes available 332(usually 2048, 4096, 9216, and 16384) and largest_rx_cluster must be greater 333than or equal to safest_rx_cluster. 334The defaults are 16384 and 4096 respectively. 335The driver never attempts to allocate a receive buffer larger than 336largest_rx_cluster and falls back to allocating buffers of 337safest_rx_cluster size if an allocation larger than safest_rx_cluster fails. 338Note that largest_rx_cluster merely establishes a ceiling -- the driver is 339allowed to allocate buffers of smaller sizes. 340.It Va hw.cxgbe.config_file 341Select a pre-packaged device configuration file. 342A configuration file contains a recipe for partitioning and configuring the 343hardware resources on the card. 344This tunable is for specialized applications only and should not be used in 345normal operation. 346The configuration profile currently in use is available in the dev.<nexus>.X.cf 347and dev.<nexus>.X.cfcsum sysctls. 348.It Va hw.cxgbe.linkcaps_allowed 349.It Va hw.cxgbe.niccaps_allowed 350.It Va hw.cxgbe.toecaps_allowed 351.It Va hw.cxgbe.rdmacaps_allowed 352.It Va hw.cxgbe.iscsicaps_allowed 353.It Va hw.cxgbe.fcoecaps_allowed 354Disallowing capabilities provides a hint to the driver and firmware to not 355reserve hardware resources for that feature. 356Each of these is a bit field with a bit for each sub-capability within the 357capability. 358This tunable is for specialized applications only and should not be used in 359normal operation. 360The capabilities for which hardware resources have been reserved are listed in 361dev.<nexus>.X.*caps sysctls. 362.El 363.Sh SUPPORT 364For general information and support, 365go to the Chelsio support website at: 366.Pa http://www.chelsio.com/ . 367.Pp 368If an issue is identified with this driver with a supported adapter, 369email all the specific information related to the issue to 370.Aq Mt support@chelsio.com . 371.Sh SEE ALSO 372.Xr altq 4 , 373.Xr arp 4 , 374.Xr ccr 4 , 375.Xr cxgb 4 , 376.Xr cxgbev 4 , 377.Xr netintro 4 , 378.Xr ng_ether 4 , 379.Xr ifconfig 8 380.Sh HISTORY 381The 382.Nm 383device driver first appeared in 384.Fx 9.0 . 385Support for T5 cards first appeared in 386.Fx 9.2 387and 388.Fx 10.0 . 389Support for T6 cards first appeared in 390.Fx 11.1 391and 392.Fx 12.0 . 393.Sh AUTHORS 394.An -nosplit 395The 396.Nm 397driver was written by 398.An Navdeep Parhar Aq Mt np@FreeBSD.org . 399