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