xref: /freebsd/share/man/man4/cxgbev.4 (revision 2e3f49888ec8851bafb22011533217487764fdb0)
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.Dd November 10, 2022
33.Dt CXGBEV 4
34.Os
35.Sh NAME
36.Nm cxgbev
37.Nd "Chelsio T4-, T5-, and T6-based 100Gb, 40Gb, 25Gb, 10Gb, and 1Gb Ethernet VF driver"
38.Sh SYNOPSIS
39To compile this driver into the kernel,
40place the following lines in your
41kernel configuration file:
42.Bd -ragged -offset indent
43.Cd "device cxgbe"
44.Cd "device cxgbev"
45.Ed
46.Pp
47To load the driver as a
48module at boot time, place the following line in
49.Xr loader.conf 5 :
50.Bd -literal -offset indent
51if_cxgbev_load="YES"
52.Ed
53.Sh DESCRIPTION
54The
55.Nm
56driver provides support for Virtual Functions on PCI Express Ethernet adapters
57based on the Chelsio Terminator 4, Terminator 5, and Terminator 6 ASICs
58(T4, T5, and T6).
59The driver supports Jumbo Frames, Transmit/Receive checksum offload,
60TCP segmentation offload (TSO), Large Receive Offload (LRO), VLAN
61tag insertion/extraction, VLAN checksum offload, VLAN TSO, and
62Receive Side Steering (RSS).
63For further hardware information and questions related to hardware
64requirements, see
65.Pa http://www.chelsio.com/ .
66.Pp
67The
68.Nm
69driver uses different names for devices based on the associated ASIC:
70.Bl -column -offset indent "ASIC" "Port Name"
71.It Sy ASIC Ta Sy Port Name Ta Sy Parent Device
72.It T4 Ta cxgbev Ta t4vf
73.It T5 Ta cxlv Ta t5vf
74.It T6 Ta ccv Ta t6vf
75.El
76.Pp
77Loader tunables with the hw.cxgbe prefix apply to VFs from all cards.
78The Physical Function driver for Chelsio Terminator adapters shares these
79tunables.
80The driver provides sysctl MIBs for both ports and parent devices using
81the names above.
82For example, a T5 VF provides port MIBs under dev.cxlv and
83parent device MIBs under dev.t5vf.
84References to sysctl MIBs in the remainder of this page use
85dev.<port> for port MIBs and dev.<nexus> for parent device MIBs.
86.Pp
87For more information on configuring this device, see
88.Xr ifconfig 8 .
89.Sh HARDWARE
90The
91.Nm
92driver supports Virtual Functions on 100Gb and 25Gb Ethernet adapters
93based 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 Virtual Functions on 40Gb, 10Gb and 1Gb Ethernet adapters
111based on the T5 ASIC:
112.Pp
113.Bl -bullet -compact
114.It
115Chelsio T580-CR
116.It
117Chelsio T580-LP-CR
118.It
119Chelsio T580-LP-SO-CR
120.It
121Chelsio T560-CR
122.It
123Chelsio T540-CR
124.It
125Chelsio T540-LP-CR
126.It
127Chelsio T522-CR
128.It
129Chelsio T520-LL-CR
130.It
131Chelsio T520-CR
132.It
133Chelsio T520-SO
134.It
135Chelsio T520-BT
136.It
137Chelsio T504-BT
138.El
139.Pp
140The
141.Nm
142driver supports Virtual Functions on 10Gb and 1Gb Ethernet adapters based
143on the T4 ASIC:
144.Pp
145.Bl -bullet -compact
146.It
147Chelsio T420-CR
148.It
149Chelsio T422-CR
150.It
151Chelsio T440-CR
152.It
153Chelsio T420-BCH
154.It
155Chelsio T440-BCH
156.It
157Chelsio T440-CH
158.It
159Chelsio T420-SO
160.It
161Chelsio T420-CX
162.It
163Chelsio T420-BT
164.It
165Chelsio T404-BT
166.El
167.Sh LOADER TUNABLES
168Tunables can be set at the
169.Xr loader 8
170prompt before booting the kernel or stored in
171.Xr loader.conf 5 .
172.Bl -tag -width indent
173.It Va hw.cxgbe.ntxq
174Number of tx queues used for a port.
175The default is 16 or the number
176of CPU cores in the system, whichever is less.
177.It Va hw.cxgbe.nrxq
178Number of rx queues used for a port.
179The default is 8 or the number
180of CPU cores in the system, whichever is less.
181.It Va hw.cxgbe.holdoff_timer_idx
182Timer index value used to delay interrupts.
183The holdoff timer list has the values 1, 5, 10, 50, 100, and 200
184by default (all values are in microseconds) and the index selects a
185value from this list.
186The default value is 1 which means the timer value is 5us.
187Different interfaces can be assigned different values at any time via the
188dev.<port>.X.holdoff_tmr_idx sysctl.
189.It Va hw.cxgbe.holdoff_pktc_idx
190Packet-count index value used to delay interrupts.
191The packet-count list has the values 1, 8, 16, and 32 by default,
192and the index selects a value from this list.
193The default value is -1 which means packet counting is disabled and interrupts
194are generated based solely on the holdoff timer value.
195Different interfaces can be assigned different values via the
196dev.<port>.X.holdoff_pktc_idx sysctl.
197This sysctl works only when the interface has never been marked up (as done by
198ifconfig up).
199.It Va hw.cxgbe.qsize_txq
200Number of entries in a transmit queue's descriptor ring.
201A buf_ring of the same size is also allocated for additional
202software queuing.
203See
204.Xr ifnet 9 .
205The default value is 1024.
206Different interfaces can be assigned different values via the
207dev.<port>.X.qsize_txq sysctl.
208This sysctl works only when the interface has never been marked up (as done by
209ifconfig up).
210.It Va hw.cxgbe.qsize_rxq
211Number of entries in a receive queue's descriptor ring.
212The default value is 1024.
213Different interfaces can be assigned different values via the
214dev.<port>.X.qsize_rxq sysctl.
215This sysctl works only when the interface has never been marked up (as done by
216ifconfig up).
217.It Va hw.cxgbe.interrupt_types
218Permitted interrupt types.
219Bit 0 represents INTx (line interrupts), bit 1 MSI, and bit 2 MSI-X.
220The default is 7 (all allowed).
221The driver selects the best possible type out of the allowed types.
222Note that Virtual Functions do not support INTx interrupts and fail
223to attach if neither MSI nor MSI-X are enabled.
224.It Va hw.cxgbe.fl_pktshift
225Number of padding bytes inserted before the beginning of an Ethernet
226frame in the receive buffer.
227The default value of 2 ensures that the Ethernet payload (usually the IP header)
228is at a 4 byte aligned address.
2290-7 are all valid values.
230.It Va hw.cxgbe.fl_pad
231A non-zero value ensures that writes from the hardware to a receive buffer are
232padded up to the specified boundary.
233The default is -1 which lets the driver pick a pad boundary.
2340 disables trailer padding completely.
235.It Va hw.cxgbe.buffer_packing
236Allow the hardware to deliver multiple frames in the same receive buffer
237opportunistically.
238The default is -1 which lets the driver decide.
2390 or 1 explicitly disable or enable this feature.
240.It Va hw.cxgbe.allow_mbufs_in_cluster
2411 allows the driver to lay down one or more mbufs within the receive buffer
242opportunistically.
243This is the default.
2440 prohibits the driver from doing so.
245.It Va hw.cxgbe.largest_rx_cluster
246.It Va hw.cxgbe.safest_rx_cluster
247Sizes of rx clusters.
248Each of these must be set to one of the sizes available
249(usually 2048, 4096, 9216, and 16384) and largest_rx_cluster must be greater
250than or equal to safest_rx_cluster.
251The defaults are 16384 and 4096 respectively.
252The driver never attempts to allocate a receive buffer larger than
253largest_rx_cluster and falls back to allocating buffers of
254safest_rx_cluster size if an allocation larger than safest_rx_cluster fails.
255Note that largest_rx_cluster merely establishes a ceiling -- the driver is
256allowed to allocate buffers of smaller sizes.
257.El
258.Pp
259Certain settings and resources for Virtual Functions are dictated
260by the parent Physical Function driver.
261For example, the Physical Function driver limits the number of queues
262available to a Virtual Function.
263Some of these limits can be adjusted in the firmware configuration file
264used with the Physical Function driver.
265.Pp
266The PAUSE settings on the port of a Virtual Function are inherited from
267the settings of the same port on the Physical Function.
268Virtual Functions cannot modify the setting and track changes made to
269the associated port's setting by the Physical Function driver.
270.Pp
271Receive queues on a Virtual Function always drop packets in response to
272congestion
273.Po
274equivalent to setting
275.Va hw.cxgbe.cong_drop
276to 1
277.Pc .
278.Pp
279The VF driver currently depends on the PF driver.
280As a result, loading the VF driver also loads the PF driver as a
281dependency.
282.Sh SUPPORT
283For general information and support,
284go to the Chelsio support website at:
285.Pa http://www.chelsio.com/ .
286.Pp
287If an issue is identified with this driver with a supported adapter,
288email all the specific information related to the issue to
289.Aq Mt support@chelsio.com .
290.Sh SEE ALSO
291.Xr arp 4 ,
292.Xr cxgbe 4 ,
293.Xr netintro 4 ,
294.Xr ng_ether 4 ,
295.Xr ifconfig 8
296.Sh HISTORY
297The
298.Nm
299device driver first appeared in
300.Fx 11.1
301and
302.Fx 11.1 .
303.Sh AUTHORS
304.An -nosplit
305The
306.Nm
307driver was written by
308.An Navdeep Parhar Aq Mt np@FreeBSD.org
309and
310.An John Baldwin Aq Mt jhb@FreeBSD.org .
311