1.\" Copyright (c) 2011-2014, 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 December 2, 2015 35.Dt CXGBE 4 36.Os 37.Sh NAME 38.Nm cxgbe 39.Nd "Chelsio T4 and T5 based 40Gb, 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" 54if_cxgbe_load="YES" 55.Ed 56.Sh DESCRIPTION 57The 58.Nm 59driver provides support for PCI Express Ethernet adapters based on 60the Chelsio Terminator 4 and Terminator 5 ASICs (T4 and T5). 61The driver supports Jumbo Frames, Transmit/Receive checksum offload, 62TCP segmentation offload (TSO), Large Receive Offload (LRO), VLAN 63tag insertion/extraction, VLAN checksum offload, VLAN TSO, and 64Receive Side Steering (RSS). 65For further hardware information and questions related to hardware 66requirements, see 67.Pa http://www.chelsio.com/ . 68.Pp 69Note that ports of T5 cards are named cxl and attach to a t5nex parent device 70(in contrast to ports named cxgbe that attach to a t4nex parent for a T4 card). 71Loader tunables with the hw.cxgbe prefix apply to both T4 and T5 cards. 72The sysctl MIBs are at dev.t5nex and dev.cxl for T5 cards and at dev.t4nex and 73dev.cxgbe for T4 cards. 74.Pp 75For more information on configuring this device, see 76.Xr ifconfig 8 . 77.Sh HARDWARE 78The 79.Nm 80driver supports 40Gb, 10Gb and 1Gb Ethernet adapters based on the T5 ASIC: 81.Pp 82.Bl -bullet -compact 83.It 84Chelsio T580-CR 85.It 86Chelsio T580-LP-CR 87.It 88Chelsio T580-LP-SO-CR 89.It 90Chelsio T560-CR 91.It 92Chelsio T540-CR 93.It 94Chelsio T540-LP-CR 95.It 96Chelsio T522-CR 97.It 98Chelsio T520-LL-CR 99.It 100Chelsio T520-CR 101.It 102Chelsio T520-SO 103.It 104Chelsio T520-BT 105.It 106Chelsio T504-BT 107.El 108.Pp 109The 110.Nm 111driver supports 10Gb and 1Gb Ethernet adapters based on the T4 ASIC: 112.Pp 113.Bl -bullet -compact 114.It 115Chelsio T420-CR 116.It 117Chelsio T422-CR 118.It 119Chelsio T440-CR 120.It 121Chelsio T420-BCH 122.It 123Chelsio T440-BCH 124.It 125Chelsio T440-CH 126.It 127Chelsio T420-SO 128.It 129Chelsio T420-CX 130.It 131Chelsio T420-BT 132.It 133Chelsio T404-BT 134.El 135.Sh LOADER TUNABLES 136Tunables can be set at the 137.Xr loader 8 138prompt before booting the kernel or stored in 139.Xr loader.conf 5 . 140.Bl -tag -width indent 141.It Va hw.cxgbe.ntxq10g 142The number of tx queues to use for a 10Gb or 40Gb port. 143The default is 16 or the number 144of CPU cores in the system, whichever is less. 145.It Va hw.cxgbe.nrxq10g 146The number of rx queues to use for a 10Gb or 40Gb port. 147The default is 8 or the number 148of CPU cores in the system, whichever is less. 149.It Va hw.cxgbe.ntxq1g 150The number of tx queues to use for a 1Gb port. 151The default is 4 or the number 152of CPU cores in the system, whichever is less. 153.It Va hw.cxgbe.nrxq1g 154The number of rx queues to use for a 1Gb port. 155The default is 2 or the number 156of CPU cores in the system, whichever is less. 157.It Va hw.cxgbe.nofldtxq10g 158The number of TOE tx queues to use for a 10Gb or 40Gb port. 159The default is 8 or the 160number of CPU cores in the system, whichever is less. 161.It Va hw.cxgbe.nofldrxq10g 162The number of TOE rx queues to use for a 10Gb or 40Gb port. 163The default is 2 or the 164number of CPU cores in the system, whichever is less. 165.It Va hw.cxgbe.nofldtxq1g 166The number of TOE tx queues to use for a 1Gb port. 167The default is 2 or the 168number of CPU cores in the system, whichever is less. 169.It Va hw.cxgbe.nofldrxq1g 170The number of TOE rx queues to use for a 1Gb port. 171The default is 1. 172.It Va hw.cxgbe.num_vis 173The number of virtual interfaces (VIs) created for each port. 174Each virtual interface creates a separate network interface. 175The first virtual interface on each port is required and represents 176the primary network interface on the port. 177Additional virtual interfaces on a port are named vcxgbe (T4) or 178vcxl (T5) and only use a single rx and tx queue. 179Additional virtual interfaces use a single pair of queues 180for rx and tx as well an additional pair of queues for TOE rx and tx. 181The default is 1. 182.It Va hw.cxgbe.holdoff_timer_idx_10G 183.It Va hw.cxgbe.holdoff_timer_idx_1G 184The timer index value to use to delay interrupts. 185The holdoff timer list has the values 1, 5, 10, 50, 100, and 200 186by default (all values are in microseconds) and the index selects a 187value from this list. 188The default value is 1 which means the timer value is 5us. 189Different interfaces can be assigned different values at any time via the 190dev.cxgbe.X.holdoff_tmr_idx or dev.cxl.X.holdoff_tmr_idx sysctl. 191.It Va hw.cxgbe.holdoff_pktc_idx_10G 192.It Va hw.cxgbe.holdoff_pktc_idx_1G 193The packet-count index value to use to delay interrupts. 194The packet-count list has the values 1, 8, 16, and 32 by default 195and the index selects a value from this list. 196The default value is -1 which means packet counting is disabled and interrupts 197are generated based solely on the holdoff timer value. 198Different interfaces can be assigned different values via the 199dev.cxgbe.X.holdoff_pktc_idx or dev.cxl.X.holdoff_pktc_idx sysctl. 200This sysctl works only when the interface has never been marked up (as done by 201ifconfig up). 202.It Va hw.cxgbe.qsize_txq 203The size, in number of entries, of the descriptor ring used for a tx 204queue. 205A buf_ring of the same size is also allocated for additional 206software queuing. 207See 208.Xr ifnet 9 . 209The default value is 1024. 210Different interfaces can be assigned different values via the 211dev.cxgbe.X.qsize_txq sysctl or dev.cxl.X.qsize_txq sysctl. 212This sysctl works only when the interface has never been marked up (as done by 213ifconfig up). 214.It Va hw.cxgbe.qsize_rxq 215The size, in number of entries, of the descriptor ring used for an 216rx queue. 217The default value is 1024. 218Different interfaces can be assigned different values via the 219dev.cxgbe.X.qsize_rxq or dev.cxl.X.qsize_rxq sysctl. 220This sysctl works only when the interface has never been marked up (as done by 221ifconfig up). 222.It Va hw.cxgbe.interrupt_types 223The interrupt types that the driver is allowed to use. 224Bit 0 represents INTx (line interrupts), bit 1 MSI, bit 2 MSI-X. 225The default is 7 (all allowed). 226The driver will select the best possible type out of the allowed types by 227itself. 228.It Va hw.cxgbe.fw_install 2290 prohibits the driver from installing a firmware on the card. 2301 allows the driver to install a new firmware if internal driver 231heuristics indicate that the new firmware is preferable to the one 232already on the card. 2332 instructs the driver to always install the new firmware on the card as 234long as it is compatible with the driver and is a different version than 235the one already on the card. 236The default is 1. 237.It Va hw.cxgbe.fl_pktshift 238The number of bytes of padding inserted before the beginning of an Ethernet 239frame in the receive buffer. 240The default value of 2 ensures that the Ethernet payload (usually the IP header) 241is at a 4 byte aligned address. 2420-7 are all valid values. 243.It Va hw.cxgbe.fl_pad 244A non-zero value ensures that writes from the hardware to a receive buffer are 245padded up to the specified boundary. 246The default is -1 which lets the driver pick a pad boundary. 2470 disables trailer padding completely. 248.It Va hw.cxgbe.cong_drop 249Controls the hardware response to congestion. 250-1 disables congestion feedback and is not recommended. 2510 instructs the hardware to backpressure its pipeline on congestion. 252This usually results in the port emitting PAUSE frames. 2531 instructs the hardware to drop frames destined for congested queues. 254.It Va hw.cxgbe.pause_settings 255PAUSE frame settings. 256Bit 0 is rx_pause, bit 1 is tx_pause. 257rx_pause = 1 instructs the hardware to heed incoming PAUSE frames, 0 instructs 258it to ignore them. 259tx_pause = 1 allows the hardware to emit PAUSE frames when its receive FIFO 260reaches a high threshold, 0 prohibits the hardware from emitting PAUSE frames. 261The default is 3 (both rx_pause and tx_pause = 1). 262This tunable establishes the default PAUSE settings for all ports. 263Settings can be displayed and controlled on a per-port basis via the 264dev.cxgbe.X.pause_settings (dev.cxl.X.pause_settings for T5 cards) sysctl. 265.It Va hw.cxgbe.buffer_packing 266Allow the hardware to deliver multiple frames in the same receive buffer 267opportunistically. 268The default is -1 which lets the driver decide. 2690 or 1 explicitly disable or enable this feature. 270.It Va hw.cxgbe.allow_mbufs_in_cluster 2711 allows the driver to lay down one or more mbufs within the receive buffer 272opportunistically. 273This is the default. 2740 prohibits the driver from doing so. 275.It Va hw.cxgbe.largest_rx_cluster 276.It Va hw.cxgbe.safest_rx_cluster 277Sizes of rx clusters. 278Each of these must be set to one of the sizes available 279(usually 2048, 4096, 9216, and 16384) and largest_rx_cluster must be greater 280than or equal to safest_rx_cluster. 281The defaults are 16384 and 4096 respectively. 282The driver will never attempt to allocate a receive buffer larger than 283largest_rx_cluster and will fall back to allocating buffers of 284safest_rx_cluster size if an allocation larger than safest_rx_cluster fails. 285Note that largest_rx_cluster merely establishes a ceiling -- the driver is 286allowed to allocate buffers of smaller sizes. 287.It Va hw.cxgbe.config_file 288Select a pre-packaged device configuration file. 289A configuration file contains a recipe for partitioning and configuring the 290hardware resources on the card. 291This tunable is for specialized applications only and should not be used in 292normal operation. 293The configuration profile currently in use is available in the dev.t4nex.X.cf 294and dev.t4nex.X.cfcsum (dev.t5nex for T5 cards) sysctls. 295.It Va hw.cxgbe.linkcaps_allowed 296.It Va hw.cxgbe.niccaps_allowed 297.It Va hw.cxgbe.toecaps_allowed 298.It Va hw.cxgbe.rdmacaps_allowed 299.It Va hw.cxgbe.iscsicaps_allowed 300.It Va hw.cxgbe.fcoecaps_allowed 301Disallowing capabilities provides a hint to the driver and firmware to not 302reserve hardware resources for that feature. 303Each of these is a bit field with a bit for each sub-capability within the 304capability. 305This tunable is for specialized applications only and should not be used in 306normal operation. 307The capabilities for which hardware resources have been reserved are listed in 308dev.t4nex.X.*caps or dev.t5nex.X.*caps sysctls. 309.El 310.Sh SUPPORT 311For general information and support, 312go to the Chelsio support website at: 313.Pa http://www.chelsio.com/ . 314.Pp 315If an issue is identified with this driver with a supported adapter, 316email all the specific information related to the issue to 317.Aq Mt support@chelsio.com . 318.Sh SEE ALSO 319.Xr altq 4 , 320.Xr arp 4 , 321.Xr cxgb 4 , 322.Xr cxgbev 4 , 323.Xr netintro 4 , 324.Xr ng_ether 4 , 325.Xr ifconfig 8 326.Sh HISTORY 327The 328.Nm 329device driver first appeared in 330.Fx 9.0 . 331Support for T5 cards first appeared in 332.Fx 9.2 333and 334.Fx 10.0 . 335.Sh AUTHORS 336.An -nosplit 337The 338.Nm 339driver was written by 340.An Navdeep Parhar Aq Mt np@FreeBSD.org . 341