16af45170SJohn Baldwin.\" Copyright (c) 2011-2016, Chelsio Inc 26af45170SJohn Baldwin.\" All rights reserved. 36af45170SJohn Baldwin.\" 46af45170SJohn Baldwin.\" Redistribution and use in source and binary forms, with or without 56af45170SJohn Baldwin.\" modification, are permitted provided that the following conditions are met: 66af45170SJohn Baldwin.\" 76af45170SJohn Baldwin.\" 1. Redistributions of source code must retain the above copyright notice, 86af45170SJohn Baldwin.\" this list of conditions and the following disclaimer. 96af45170SJohn Baldwin.\" 106af45170SJohn Baldwin.\" 2. Redistributions in binary form must reproduce the above copyright 116af45170SJohn Baldwin.\" notice, this list of conditions and the following disclaimer in the 126af45170SJohn Baldwin.\" documentation and/or other materials provided with the distribution. 136af45170SJohn Baldwin.\" 146af45170SJohn Baldwin.\" 3. Neither the name of the Chelsio Inc nor the names of its 156af45170SJohn Baldwin.\" contributors may be used to endorse or promote products derived from 166af45170SJohn Baldwin.\" this software without specific prior written permission. 176af45170SJohn Baldwin.\" 186af45170SJohn Baldwin.\" THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 196af45170SJohn Baldwin.\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 206af45170SJohn Baldwin.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 216af45170SJohn Baldwin.\" ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE 226af45170SJohn Baldwin.\" LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 236af45170SJohn Baldwin.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 246af45170SJohn Baldwin.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 256af45170SJohn Baldwin.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 266af45170SJohn Baldwin.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 276af45170SJohn Baldwin.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 286af45170SJohn Baldwin.\" POSSIBILITY OF SUCH DAMAGE. 296af45170SJohn Baldwin.\" 306af45170SJohn Baldwin.\" * Other names and brands may be claimed as the property of others. 316af45170SJohn Baldwin.\" 32*4deab7aeSKristof Provost.Dd November 10, 2022 336af45170SJohn Baldwin.Dt CXGBEV 4 346af45170SJohn Baldwin.Os 356af45170SJohn Baldwin.Sh NAME 366af45170SJohn Baldwin.Nm cxgbev 37f6e648b8SJohn Baldwin.Nd "Chelsio T4-, T5-, and T6-based 100Gb, 40Gb, 25Gb, 10Gb, and 1Gb Ethernet VF driver" 386af45170SJohn Baldwin.Sh SYNOPSIS 396af45170SJohn BaldwinTo compile this driver into the kernel, 406af45170SJohn Baldwinplace the following lines in your 416af45170SJohn Baldwinkernel configuration file: 426af45170SJohn Baldwin.Bd -ragged -offset indent 436af45170SJohn Baldwin.Cd "device cxgbe" 446af45170SJohn Baldwin.Cd "device cxgbev" 456af45170SJohn Baldwin.Ed 466af45170SJohn Baldwin.Pp 476af45170SJohn BaldwinTo load the driver as a 486af45170SJohn Baldwinmodule at boot time, place the following line in 496af45170SJohn Baldwin.Xr loader.conf 5 : 506af45170SJohn Baldwin.Bd -literal -offset indent 516af45170SJohn Baldwinif_cxgbev_load="YES" 526af45170SJohn Baldwin.Ed 536af45170SJohn Baldwin.Sh DESCRIPTION 546af45170SJohn BaldwinThe 556af45170SJohn Baldwin.Nm 566af45170SJohn Baldwindriver provides support for Virtual Functions on PCI Express Ethernet adapters 57f6e648b8SJohn Baldwinbased on the Chelsio Terminator 4, Terminator 5, and Terminator 6 ASICs 58f6e648b8SJohn Baldwin(T4, T5, and T6). 596af45170SJohn BaldwinThe driver supports Jumbo Frames, Transmit/Receive checksum offload, 606af45170SJohn BaldwinTCP segmentation offload (TSO), Large Receive Offload (LRO), VLAN 616af45170SJohn Baldwintag insertion/extraction, VLAN checksum offload, VLAN TSO, and 626af45170SJohn BaldwinReceive Side Steering (RSS). 636af45170SJohn BaldwinFor further hardware information and questions related to hardware 646af45170SJohn Baldwinrequirements, see 656af45170SJohn Baldwin.Pa http://www.chelsio.com/ . 666af45170SJohn Baldwin.Pp 67f6e648b8SJohn BaldwinThe 68f6e648b8SJohn Baldwin.Nm 69f6e648b8SJohn Baldwindriver uses different names for devices based on the associated ASIC: 70f6e648b8SJohn Baldwin.Bl -column -offset indent "ASIC" "Port Name" 71f6e648b8SJohn Baldwin.It Sy ASIC Ta Sy Port Name Ta Sy Parent Device 72f6e648b8SJohn Baldwin.It T4 Ta cxgbev Ta t4vf 73f6e648b8SJohn Baldwin.It T5 Ta cxlv Ta t5vf 74f6e648b8SJohn Baldwin.It T6 Ta ccv Ta t6vf 75f6e648b8SJohn Baldwin.El 76f6e648b8SJohn Baldwin.Pp 77f6e648b8SJohn BaldwinLoader tunables with the hw.cxgbe prefix apply to VFs from all cards. 78f6e648b8SJohn BaldwinThe Physical Function driver for Chelsio Terminator adapters shares these 79f6e648b8SJohn Baldwintunables. 80f6e648b8SJohn BaldwinThe driver provides sysctl MIBs for both ports and parent devices using 81f6e648b8SJohn Baldwinthe names above. 82c4510a9bSJohn BaldwinFor example, a T5 VF provides port MIBs under dev.cxlv and 83f6e648b8SJohn Baldwinparent device MIBs under dev.t5vf. 84c4510a9bSJohn BaldwinReferences to sysctl MIBs in the remainder of this page use 85f6e648b8SJohn Baldwindev.<port> for port MIBs and dev.<nexus> for parent device MIBs. 866af45170SJohn Baldwin.Pp 876af45170SJohn BaldwinFor more information on configuring this device, see 886af45170SJohn Baldwin.Xr ifconfig 8 . 896af45170SJohn Baldwin.Sh HARDWARE 906af45170SJohn BaldwinThe 916af45170SJohn Baldwin.Nm 92f6e648b8SJohn Baldwindriver supports Virtual Functions on 100Gb and 25Gb Ethernet adapters 93f6e648b8SJohn Baldwinbased on the T6 ASIC: 94f6e648b8SJohn Baldwin.Pp 95f6e648b8SJohn Baldwin.Bl -bullet -compact 96f6e648b8SJohn Baldwin.It 97f6e648b8SJohn BaldwinChelsio T6225-CR 98f6e648b8SJohn Baldwin.It 99f6e648b8SJohn BaldwinChelsio T6225-SO-CR 100f6e648b8SJohn Baldwin.It 101f6e648b8SJohn BaldwinChelsio T62100-LP-CR 102f6e648b8SJohn Baldwin.It 103f6e648b8SJohn BaldwinChelsio T62100-SO-CR 104f6e648b8SJohn Baldwin.It 105f6e648b8SJohn BaldwinChelsio T62100-CR 106f6e648b8SJohn Baldwin.El 107f6e648b8SJohn Baldwin.Pp 108f6e648b8SJohn BaldwinThe 109f6e648b8SJohn Baldwin.Nm 1106af45170SJohn Baldwindriver supports Virtual Functions on 40Gb, 10Gb and 1Gb Ethernet adapters 1116af45170SJohn Baldwinbased on the T5 ASIC: 1126af45170SJohn Baldwin.Pp 1136af45170SJohn Baldwin.Bl -bullet -compact 1146af45170SJohn Baldwin.It 1156af45170SJohn BaldwinChelsio T580-CR 1166af45170SJohn Baldwin.It 1176af45170SJohn BaldwinChelsio T580-LP-CR 1186af45170SJohn Baldwin.It 1196af45170SJohn BaldwinChelsio T580-LP-SO-CR 1206af45170SJohn Baldwin.It 1216af45170SJohn BaldwinChelsio T560-CR 1226af45170SJohn Baldwin.It 1236af45170SJohn BaldwinChelsio T540-CR 1246af45170SJohn Baldwin.It 1256af45170SJohn BaldwinChelsio T540-LP-CR 1266af45170SJohn Baldwin.It 1276af45170SJohn BaldwinChelsio T522-CR 1286af45170SJohn Baldwin.It 1296af45170SJohn BaldwinChelsio T520-LL-CR 1306af45170SJohn Baldwin.It 1316af45170SJohn BaldwinChelsio T520-CR 1326af45170SJohn Baldwin.It 1336af45170SJohn BaldwinChelsio T520-SO 1346af45170SJohn Baldwin.It 1356af45170SJohn BaldwinChelsio T520-BT 1366af45170SJohn Baldwin.It 1376af45170SJohn BaldwinChelsio T504-BT 1386af45170SJohn Baldwin.El 1396af45170SJohn Baldwin.Pp 1406af45170SJohn BaldwinThe 1416af45170SJohn Baldwin.Nm 1426af45170SJohn Baldwindriver supports Virtual Functions on 10Gb and 1Gb Ethernet adapters based 1436af45170SJohn Baldwinon the T4 ASIC: 1446af45170SJohn Baldwin.Pp 1456af45170SJohn Baldwin.Bl -bullet -compact 1466af45170SJohn Baldwin.It 1476af45170SJohn BaldwinChelsio T420-CR 1486af45170SJohn Baldwin.It 1496af45170SJohn BaldwinChelsio T422-CR 1506af45170SJohn Baldwin.It 1516af45170SJohn BaldwinChelsio T440-CR 1526af45170SJohn Baldwin.It 1536af45170SJohn BaldwinChelsio T420-BCH 1546af45170SJohn Baldwin.It 1556af45170SJohn BaldwinChelsio T440-BCH 1566af45170SJohn Baldwin.It 1576af45170SJohn BaldwinChelsio T440-CH 1586af45170SJohn Baldwin.It 1596af45170SJohn BaldwinChelsio T420-SO 1606af45170SJohn Baldwin.It 1616af45170SJohn BaldwinChelsio T420-CX 1626af45170SJohn Baldwin.It 1636af45170SJohn BaldwinChelsio T420-BT 1646af45170SJohn Baldwin.It 1656af45170SJohn BaldwinChelsio T404-BT 1666af45170SJohn Baldwin.El 1676af45170SJohn Baldwin.Sh LOADER TUNABLES 1686af45170SJohn BaldwinTunables can be set at the 1696af45170SJohn Baldwin.Xr loader 8 1706af45170SJohn Baldwinprompt before booting the kernel or stored in 1716af45170SJohn Baldwin.Xr loader.conf 5 . 1726af45170SJohn Baldwin.Bl -tag -width indent 1738c61c6bbSNavdeep Parhar.It Va hw.cxgbe.ntxq 1748c61c6bbSNavdeep ParharNumber of tx queues used for a port. 1756af45170SJohn BaldwinThe default is 16 or the number 1766af45170SJohn Baldwinof CPU cores in the system, whichever is less. 1778c61c6bbSNavdeep Parhar.It Va hw.cxgbe.nrxq 1788c61c6bbSNavdeep ParharNumber of rx queues used for a port. 1796af45170SJohn BaldwinThe default is 8 or the number 1806af45170SJohn Baldwinof CPU cores in the system, whichever is less. 1818c61c6bbSNavdeep Parhar.It Va hw.cxgbe.holdoff_timer_idx 182c4510a9bSJohn BaldwinTimer index value used to delay interrupts. 1836af45170SJohn BaldwinThe holdoff timer list has the values 1, 5, 10, 50, 100, and 200 1846af45170SJohn Baldwinby default (all values are in microseconds) and the index selects a 1856af45170SJohn Baldwinvalue from this list. 1866af45170SJohn BaldwinThe default value is 1 which means the timer value is 5us. 1876af45170SJohn BaldwinDifferent interfaces can be assigned different values at any time via the 188f6e648b8SJohn Baldwindev.<port>.X.holdoff_tmr_idx sysctl. 1898c61c6bbSNavdeep Parhar.It Va hw.cxgbe.holdoff_pktc_idx 190c4510a9bSJohn BaldwinPacket-count index value used to delay interrupts. 191c4510a9bSJohn BaldwinThe packet-count list has the values 1, 8, 16, and 32 by default, 1926af45170SJohn Baldwinand the index selects a value from this list. 1936af45170SJohn BaldwinThe default value is -1 which means packet counting is disabled and interrupts 1946af45170SJohn Baldwinare generated based solely on the holdoff timer value. 1956af45170SJohn BaldwinDifferent interfaces can be assigned different values via the 196f6e648b8SJohn Baldwindev.<port>.X.holdoff_pktc_idx sysctl. 1976af45170SJohn BaldwinThis sysctl works only when the interface has never been marked up (as done by 1986af45170SJohn Baldwinifconfig up). 1996af45170SJohn Baldwin.It Va hw.cxgbe.qsize_txq 200c4510a9bSJohn BaldwinNumber of entries in a transmit queue's descriptor ring. 2016af45170SJohn BaldwinA buf_ring of the same size is also allocated for additional 2026af45170SJohn Baldwinsoftware queuing. 2036af45170SJohn BaldwinSee 2046af45170SJohn Baldwin.Xr ifnet 9 . 2056af45170SJohn BaldwinThe default value is 1024. 2066af45170SJohn BaldwinDifferent interfaces can be assigned different values via the 207f6e648b8SJohn Baldwindev.<port>.X.qsize_txq sysctl. 2086af45170SJohn BaldwinThis sysctl works only when the interface has never been marked up (as done by 2096af45170SJohn Baldwinifconfig up). 2106af45170SJohn Baldwin.It Va hw.cxgbe.qsize_rxq 211c4510a9bSJohn BaldwinNumber of entries in a receive queue's descriptor ring. 2126af45170SJohn BaldwinThe default value is 1024. 2136af45170SJohn BaldwinDifferent interfaces can be assigned different values via the 214f6e648b8SJohn Baldwindev.<port>.X.qsize_rxq sysctl. 2156af45170SJohn BaldwinThis sysctl works only when the interface has never been marked up (as done by 2166af45170SJohn Baldwinifconfig up). 2176af45170SJohn Baldwin.It Va hw.cxgbe.interrupt_types 218c4510a9bSJohn BaldwinPermitted interrupt types. 219c4510a9bSJohn BaldwinBit 0 represents INTx (line interrupts), bit 1 MSI, and bit 2 MSI-X. 2206af45170SJohn BaldwinThe default is 7 (all allowed). 221c4510a9bSJohn BaldwinThe driver selects the best possible type out of the allowed types. 222c4510a9bSJohn BaldwinNote that Virtual Functions do not support INTx interrupts and fail 223c4510a9bSJohn Baldwinto attach if neither MSI nor MSI-X are enabled. 2246af45170SJohn Baldwin.It Va hw.cxgbe.fl_pktshift 225c4510a9bSJohn BaldwinNumber of padding bytes inserted before the beginning of an Ethernet 2266af45170SJohn Baldwinframe in the receive buffer. 2276af45170SJohn BaldwinThe default value of 2 ensures that the Ethernet payload (usually the IP header) 2286af45170SJohn Baldwinis at a 4 byte aligned address. 2296af45170SJohn Baldwin0-7 are all valid values. 2306af45170SJohn Baldwin.It Va hw.cxgbe.fl_pad 2316af45170SJohn BaldwinA non-zero value ensures that writes from the hardware to a receive buffer are 2326af45170SJohn Baldwinpadded up to the specified boundary. 2336af45170SJohn BaldwinThe default is -1 which lets the driver pick a pad boundary. 2346af45170SJohn Baldwin0 disables trailer padding completely. 2356af45170SJohn Baldwin.It Va hw.cxgbe.buffer_packing 2366af45170SJohn BaldwinAllow the hardware to deliver multiple frames in the same receive buffer 2376af45170SJohn Baldwinopportunistically. 2386af45170SJohn BaldwinThe default is -1 which lets the driver decide. 2396af45170SJohn Baldwin0 or 1 explicitly disable or enable this feature. 2406af45170SJohn Baldwin.It Va hw.cxgbe.allow_mbufs_in_cluster 2416af45170SJohn Baldwin1 allows the driver to lay down one or more mbufs within the receive buffer 2426af45170SJohn Baldwinopportunistically. 2436af45170SJohn BaldwinThis is the default. 2446af45170SJohn Baldwin0 prohibits the driver from doing so. 2456af45170SJohn Baldwin.It Va hw.cxgbe.largest_rx_cluster 2466af45170SJohn Baldwin.It Va hw.cxgbe.safest_rx_cluster 2476af45170SJohn BaldwinSizes of rx clusters. 2486af45170SJohn BaldwinEach of these must be set to one of the sizes available 2496af45170SJohn Baldwin(usually 2048, 4096, 9216, and 16384) and largest_rx_cluster must be greater 2506af45170SJohn Baldwinthan or equal to safest_rx_cluster. 2516af45170SJohn BaldwinThe defaults are 16384 and 4096 respectively. 252c4510a9bSJohn BaldwinThe driver never attempts to allocate a receive buffer larger than 253c4510a9bSJohn Baldwinlargest_rx_cluster and falls back to allocating buffers of 2546af45170SJohn Baldwinsafest_rx_cluster size if an allocation larger than safest_rx_cluster fails. 2556af45170SJohn BaldwinNote that largest_rx_cluster merely establishes a ceiling -- the driver is 2566af45170SJohn Baldwinallowed to allocate buffers of smaller sizes. 2576af45170SJohn Baldwin.El 2586af45170SJohn Baldwin.Pp 2596af45170SJohn BaldwinCertain settings and resources for Virtual Functions are dictated 2606af45170SJohn Baldwinby the parent Physical Function driver. 261c4510a9bSJohn BaldwinFor example, the Physical Function driver limits the number of queues 262c4510a9bSJohn Baldwinavailable to a Virtual Function. 2636af45170SJohn BaldwinSome of these limits can be adjusted in the firmware configuration file 2646af45170SJohn Baldwinused with the Physical Function driver. 2656af45170SJohn Baldwin.Pp 2666af45170SJohn BaldwinThe PAUSE settings on the port of a Virtual Function are inherited from 2676af45170SJohn Baldwinthe settings of the same port on the Physical Function. 2686af45170SJohn BaldwinVirtual Functions cannot modify the setting and track changes made to 2696af45170SJohn Baldwinthe associated port's setting by the Physical Function driver. 2706af45170SJohn Baldwin.Pp 2716af45170SJohn BaldwinReceive queues on a Virtual Function always drop packets in response to 2726af45170SJohn Baldwincongestion 2736af45170SJohn Baldwin.Po 2746af45170SJohn Baldwinequivalent to setting 2756af45170SJohn Baldwin.Va hw.cxgbe.cong_drop 2766af45170SJohn Baldwinto 1 2776af45170SJohn Baldwin.Pc . 2786af45170SJohn Baldwin.Pp 2796af45170SJohn BaldwinThe VF driver currently depends on the PF driver. 280c4510a9bSJohn BaldwinAs a result, loading the VF driver also loads the PF driver as a 2816af45170SJohn Baldwindependency. 2826af45170SJohn Baldwin.Sh SUPPORT 2836af45170SJohn BaldwinFor general information and support, 2846af45170SJohn Baldwingo to the Chelsio support website at: 2856af45170SJohn Baldwin.Pa http://www.chelsio.com/ . 2866af45170SJohn Baldwin.Pp 2876af45170SJohn BaldwinIf an issue is identified with this driver with a supported adapter, 2886af45170SJohn Baldwinemail all the specific information related to the issue to 2896af45170SJohn Baldwin.Aq Mt support@chelsio.com . 2906af45170SJohn Baldwin.Sh SEE ALSO 2916af45170SJohn Baldwin.Xr arp 4 , 2926af45170SJohn Baldwin.Xr cxgbe 4 , 2936af45170SJohn Baldwin.Xr netintro 4 , 2946af45170SJohn Baldwin.Xr ng_ether 4 , 2956af45170SJohn Baldwin.Xr ifconfig 8 2966af45170SJohn Baldwin.Sh HISTORY 2976af45170SJohn BaldwinThe 2986af45170SJohn Baldwin.Nm 2996af45170SJohn Baldwindevice driver first appeared in 300f6e648b8SJohn Baldwin.Fx 11.1 301f6e648b8SJohn Baldwinand 3021e0358deSGlen Barber.Fx 11.1 . 3036af45170SJohn Baldwin.Sh AUTHORS 3046af45170SJohn Baldwin.An -nosplit 3056af45170SJohn BaldwinThe 3066af45170SJohn Baldwin.Nm 3076af45170SJohn Baldwindriver was written by 3086af45170SJohn Baldwin.An Navdeep Parhar Aq Mt np@FreeBSD.org 3096af45170SJohn Baldwinand 3106af45170SJohn Baldwin.An John Baldwin Aq Mt jhb@FreeBSD.org . 311