]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - share/man/man4/cxgbe.4
cxgbe(4): Updates to the drop features from r366532.
[FreeBSD/FreeBSD.git] / share / man / man4 / cxgbe.4
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 October 19, 2020
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
41 To compile this driver into the kernel,
42 place the following lines in your
43 kernel configuration file:
44 .Bd -ragged -offset indent
45 .Cd "device cxgbe"
46 .Ed
47 .Pp
48 To load the driver as a
49 module at boot time, place the following lines in
50 .Xr loader.conf 5 :
51 .Bd -literal -offset indent
52 t4fw_cfg_load="YES"
53 t5fw_cfg_load="YES"
54 t6fw_cfg_load="YES"
55 if_cxgbe_load="YES"
56 .Ed
57 .Sh DESCRIPTION
58 The
59 .Nm
60 driver provides support for PCI Express Ethernet adapters based on
61 the Chelsio Terminator 4, Terminator 5, and Terminator 6 ASICs (T4, T5, and T6).
62 The driver supports Jumbo Frames, Transmit/Receive checksum offload,
63 TCP segmentation offload (TSO), Large Receive Offload (LRO), VLAN
64 tag insertion/extraction, VLAN checksum offload, VLAN TSO, VXLAN checksum
65 offload, VXLAN TSO, and Receive Side Steering (RSS).
66 For further hardware information and questions related to hardware
67 requirements, see
68 .Pa http://www.chelsio.com/ .
69 .Pp
70 The
71 .Nm
72 driver 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
80 Loader tunables with the hw.cxgbe prefix apply to all cards.
81 The driver provides sysctl MIBs for both ports and parent devices using
82 the names above.
83 For example, a T5 adapter provides port MIBs under dev.cxl and
84 adapter-wide MIBs under dev.t5nex.
85 References to sysctl MIBs in the remainder of this page use
86 dev.<port> for port MIBs and dev.<nexus> for adapter-wide MIBs.
87 .Pp
88 For more information on configuring this device, see
89 .Xr ifconfig 8 .
90 .Sh HARDWARE
91 The
92 .Nm
93 driver supports 100Gb and 25Gb Ethernet adapters based on the T6 ASIC:
94 .Pp
95 .Bl -bullet -compact
96 .It
97 Chelsio T6225-CR
98 .It
99 Chelsio T6225-SO-CR
100 .It
101 Chelsio T62100-LP-CR
102 .It
103 Chelsio T62100-SO-CR
104 .It
105 Chelsio T62100-CR
106 .El
107 .Pp
108 The
109 .Nm
110 driver supports 40Gb, 10Gb and 1Gb Ethernet adapters based on the T5 ASIC:
111 .Pp
112 .Bl -bullet -compact
113 .It
114 Chelsio T580-CR
115 .It
116 Chelsio T580-LP-CR
117 .It
118 Chelsio T580-LP-SO-CR
119 .It
120 Chelsio T560-CR
121 .It
122 Chelsio T540-CR
123 .It
124 Chelsio T540-LP-CR
125 .It
126 Chelsio T522-CR
127 .It
128 Chelsio T520-LL-CR
129 .It
130 Chelsio T520-CR
131 .It
132 Chelsio T520-SO
133 .It
134 Chelsio T520-BT
135 .It
136 Chelsio T504-BT
137 .El
138 .Pp
139 The
140 .Nm
141 driver supports 10Gb and 1Gb Ethernet adapters based on the T4 ASIC:
142 .Pp
143 .Bl -bullet -compact
144 .It
145 Chelsio T420-CR
146 .It
147 Chelsio T422-CR
148 .It
149 Chelsio T440-CR
150 .It
151 Chelsio T420-BCH
152 .It
153 Chelsio T440-BCH
154 .It
155 Chelsio T440-CH
156 .It
157 Chelsio T420-SO
158 .It
159 Chelsio T420-CX
160 .It
161 Chelsio T420-BT
162 .It
163 Chelsio T404-BT
164 .El
165 .Sh LOADER TUNABLES
166 Tunables can be set at the
167 .Xr loader 8
168 prompt before booting the kernel or stored in
169 .Xr loader.conf 5 .
170 There are multiple tunables that control the number of queues of various
171 types.
172 A negative value for such a tunable instructs the driver to create
173 up to that many queues if there are enough CPU cores available.
174 .Bl -tag -width indent
175 .It Va hw.cxgbe.ntxq
176 Number of NIC tx queues used for a port.
177 The default is 16 or the number
178 of CPU cores in the system, whichever is less.
179 .It Va hw.cxgbe.nrxq
180 Number of NIC rx queues used for a port.
181 The default is 8 or the number
182 of CPU cores in the system, whichever is less.
183 .It Va hw.cxgbe.nofldtxq
184 Number of TOE tx queues used for a port.
185 The default is 8 or the
186 number of CPU cores in the system, whichever is less.
187 .It Va hw.cxgbe.nofldrxq
188 Number of TOE rx queues used for a port.
189 The default is 2 or the
190 number of CPU cores in the system, whichever is less.
191 .It Va hw.cxgbe.num_vis
192 Number of virtual interfaces (VIs) created for each port.
193 Each virtual interface creates a separate network interface.
194 The first virtual interface on each port is required and represents
195 the primary network interface on the port.
196 Additional virtual interfaces on a port are named using the Virtual Interface
197 name from the table above.
198 Additional virtual interfaces use a single pair of queues
199 for rx and tx as well an additional pair of queues for TOE rx and tx.
200 The default is 1.
201 .It Va hw.cxgbe.holdoff_timer_idx
202 .It Va hw.cxgbe.holdoff_timer_idx_ofld
203 Timer index value used to delay interrupts.
204 The holdoff timer list has the values 1, 5, 10, 50, 100, and 200
205 by default (all values are in microseconds) and the index selects a
206 value from this list.
207 holdoff_timer_idx_ofld applies to queues used for TOE rx.
208 The default value is 1 which means the timer value is 5us.
209 Different interfaces can be assigned different values at any time via the
210 dev.<port>.X.holdoff_tmr_idx and dev.<port>.X.holdoff_tmr_idx_ofld sysctls.
211 .It Va hw.cxgbe.holdoff_pktc_idx
212 .It Va hw.cxgbe.holdoff_pktc_idx_ofld
213 Packet-count index value used to delay interrupts.
214 The packet-count list has the values 1, 8, 16, and 32 by default,
215 and the index selects a value from this list.
216 holdoff_pktc_idx_ofld applies to queues used for TOE rx.
217 The default value is -1 which means packet counting is disabled and interrupts
218 are generated based solely on the holdoff timer value.
219 Different interfaces can be assigned different values via the
220 dev.<port>.X.holdoff_pktc_idx and dev.<port>.X.holdoff_pktc_idx_ofld sysctls.
221 These sysctls work only when the interface has never been marked up (as done by
222 ifconfig up).
223 .It Va hw.cxgbe.qsize_txq
224 Number of entries in a transmit queue's descriptor ring.
225 A buf_ring of the same size is also allocated for additional
226 software queuing.
227 See
228 .Xr ifnet 9 .
229 The default value is 1024.
230 Different interfaces can be assigned different values via the
231 dev.<port>.X.qsize_txq sysctl.
232 This sysctl works only when the interface has never been marked up (as done by
233 ifconfig up).
234 .It Va hw.cxgbe.qsize_rxq
235 Number of entries in a receive queue's descriptor ring.
236 The default value is 1024.
237 Different interfaces can be assigned different values via the
238 dev.<port>.X.qsize_rxq sysctl.
239 This sysctl works only when the interface has never been marked up (as done by
240 ifconfig up).
241 .It Va hw.cxgbe.interrupt_types
242 Permitted interrupt types.
243 Bit 0 represents INTx (line interrupts), bit 1 MSI, and bit 2 MSI-X.
244 The default is 7 (all allowed).
245 The driver selects the best possible type out of the allowed types.
246 .It Va hw.cxgbe.pcie_relaxed_ordering
247 PCIe Relaxed Ordering.
248 -1 indicates the driver should determine whether to enable or disable PCIe RO.
249 0 disables PCIe RO.
250 1 enables PCIe RO.
251 2 indicates the driver should not modify the PCIe RO setting.
252 The default is -1.
253 .It Va hw.cxgbe.fw_install
254 0 prohibits the driver from installing a firmware on the card.
255 1 allows the driver to install a new firmware if internal driver
256 heuristics indicate that the new firmware is preferable to the one
257 already on the card.
258 2 instructs the driver to always install the new firmware on the card as
259 long as it is compatible with the driver and is a different version than
260 the one already on the card.
261 The default is 1.
262 .It Va hw.cxgbe.fl_pktshift
263 Number of padding bytes inserted before the beginning of an Ethernet
264 frame in the receive buffer.
265 The default value is 0.
266 A value of of 2 would ensure that the Ethernet payload (usually the IP header)
267 is at a 4 byte aligned address.
268 0-7 are all valid values.
269 .It Va hw.cxgbe.fl_pad
270 A non-zero value ensures that writes from the hardware to a receive buffer are
271 padded up to the specified boundary.
272 The default is -1 which lets the driver pick a pad boundary.
273 0 disables trailer padding completely.
274 .It Va hw.cxgbe.cong_drop
275 Controls the hardware response to congestion.
276 -1 disables congestion feedback and is not recommended.
277 0 instructs the hardware to backpressure its pipeline on congestion.
278 This usually results in the port emitting PAUSE frames.
279 1 instructs the hardware to drop frames destined for congested queues.
280 .It Va hw.cxgbe.pause_settings
281 PAUSE frame settings.
282 Bit 0 is rx_pause, bit 1 is tx_pause, bit 2 is pause_autoneg.
283 rx_pause = 1 instructs the hardware to heed incoming PAUSE frames, 0 instructs
284 it to ignore them.
285 tx_pause = 1 allows the hardware to emit PAUSE frames when its receive FIFO
286 reaches a high threshold, 0 prohibits the hardware from emitting PAUSE frames.
287 pause_autoneg = 1 overrides the rx_pause and tx_pause bits and instructs the
288 hardware to negotiate PAUSE settings with the link peer.
289 The default is 7 (all three = 1).
290 This tunable establishes the default PAUSE settings for all ports.
291 Settings can be displayed and controlled on a per-port basis via the
292 dev.<port>.X.pause_settings sysctl.
293 .It Va hw.cxgbe.fec
294 Forward Error Correction settings.
295 -1 (default) means driver should automatically pick a value.
296 0 disables FEC.
297 Finer grained control can be achieved by setting individual bits.
298 Bit 0 enables RS FEC, bit 1 enables BASE-R FEC (aka Firecode FEC), bit
299 2 enables NO FEC, and bit 6 enables the FEC that is recommended by the
300 transceiver/cable that is plugged in.
301 These bits can be set together in any combination.
302 This tunable establishes the default FEC settings for all ports.
303 Settings can be displayed and controlled on a per-port basis via the
304 dev.<port>.X.fec sysctl.
305 .It Va hw.cxgbe.autoneg
306 Link autonegotiation settings.
307 This tunable establishes the default autonegotiation settings for all ports.
308 Settings can be displayed and controlled on a per-port basis via the
309 dev.<port>.X.autoneg sysctl.
310 0 disables autonegotiation.
311 1 enables autonegotiation.
312 The default is -1 which lets the driver pick a value.
313 dev.<port>.X.autoneg is -1 for port and module combinations that do not support
314 autonegotiation.
315 .It Va hw.cxgbe.buffer_packing
316 Allow the hardware to deliver multiple frames in the same receive buffer
317 opportunistically.
318 The default is -1 which lets the driver decide.
319 0 or 1 explicitly disable or enable this feature.
320 .It Va hw.cxgbe.largest_rx_cluster
321 .It Va hw.cxgbe.safest_rx_cluster
322 Sizes of rx clusters.
323 Each of these must be set to one of the sizes available
324 (usually 2048, 4096, 9216, and 16384) and largest_rx_cluster must be greater
325 than or equal to safest_rx_cluster.
326 The defaults are 16384 and 4096 respectively.
327 The driver never attempts to allocate a receive buffer larger than
328 largest_rx_cluster and falls back to allocating buffers of
329 safest_rx_cluster size if an allocation larger than safest_rx_cluster fails.
330 Note that largest_rx_cluster merely establishes a ceiling -- the driver is
331 allowed to allocate buffers of smaller sizes.
332 .It Va hw.cxgbe.config_file
333 Select a pre-packaged device configuration file.
334 A configuration file contains a recipe for partitioning and configuring the
335 hardware resources on the card.
336 This tunable is for specialized applications only and should not be used in
337 normal operation.
338 The configuration profile currently in use is available in the dev.<nexus>.X.cf
339 and dev.<nexus>.X.cfcsum sysctls.
340 .It Va hw.cxgbe.linkcaps_allowed
341 .It Va hw.cxgbe.niccaps_allowed
342 .It Va hw.cxgbe.toecaps_allowed
343 .It Va hw.cxgbe.rdmacaps_allowed
344 .It Va hw.cxgbe.iscsicaps_allowed
345 .It Va hw.cxgbe.fcoecaps_allowed
346 Disallowing capabilities provides a hint to the driver and firmware to not
347 reserve hardware resources for that feature.
348 Each of these is a bit field with a bit for each sub-capability within the
349 capability.
350 This tunable is for specialized applications only and should not be used in
351 normal operation.
352 The capabilities for which hardware resources have been reserved are listed in
353 dev.<nexus>.X.*caps sysctls.
354 .It Va hw.cxgbe.tx_vm_wr
355 Setting this to 1 instructs the driver to use VM work requests to transmit data.
356 This lets PF interfaces transmit frames to VF interfaces over the internal
357 switch in the ASIC.
358 Note that the
359 .Xr cxgbev 4
360 VF driver always uses VM work requests and is not affected by this tunable.
361 The default value is 0 and should be changed only if PF and VF interfaces need
362 to communicate with each other.
363 Different interfaces can be assigned different values using the
364 dev.<port>.X.tx_vm_wr sysctl when the interface is administratively down.
365 .It Va hw.cxgbe.attack_filter
366 Set to 1 to enable the "attack filter".
367 Default is 0.
368 The attack filter will drop an incoming frame if any of these conditions is
369 true: src ip/ip6 == dst ip/ip6; tcp and src/dst ip is not unicast; src/dst ip is
370 loopback (127.x.y.z); src ip6 is not unicast; src/dst ip6 is loopback (::1/128)
371 or unspecified (::/128); tcp and src/dst ip6 is mcast (ff00::/8).
372 This facility is available on T4 and T5 based cards only.
373 .It Va hw.cxgbe.drop_ip_fragments
374 Set to 1 to drop all incoming IP fragments.
375 Default is 0.
376 Note that this drops valid frames.
377 .It Va hw.cxgbe.drop_pkts_with_l2_errors
378 Set to 1 to drop incoming frames with Layer 2 length or checksum errors.
379 Default is 1.
380 .It Va hw.cxgbe.drop_pkts_with_l3_errors
381 Set to 1 to drop incoming frames with IP version, length, or checksum errors.
382 The IP checksum is validated for TCP or UDP packets only.
383 Default is 0.
384 .It Va hw.cxgbe.drop_pkts_with_l4_errors
385 Set to 1 to drop incoming frames with Layer 4 (TCP or UDP) length,
386 checksum, or other errors.
387 Default is 0.
388 .El
389 .Sh SUPPORT
390 For general information and support,
391 go to the Chelsio support website at:
392 .Pa http://www.chelsio.com/ .
393 .Pp
394 If an issue is identified with this driver with a supported adapter,
395 email all the specific information related to the issue to
396 .Aq Mt support@chelsio.com .
397 .Sh SEE ALSO
398 .Xr altq 4 ,
399 .Xr arp 4 ,
400 .Xr ccr 4 ,
401 .Xr cxgb 4 ,
402 .Xr cxgbev 4 ,
403 .Xr netintro 4 ,
404 .Xr ng_ether 4 ,
405 .Xr ifconfig 8
406 .Sh HISTORY
407 The
408 .Nm
409 device driver first appeared in
410 .Fx 9.0 .
411 Support for T5 cards first appeared in
412 .Fx 9.2
413 and
414 .Fx 10.0 .
415 Support for T6 cards first appeared in
416 .Fx 11.1
417 and
418 .Fx 12.0 .
419 .Sh AUTHORS
420 .An -nosplit
421 The
422 .Nm
423 driver was written by
424 .An Navdeep Parhar Aq Mt np@FreeBSD.org .