xref: /freebsd/share/man/man4/bnxt.4 (revision 315ee00f)
1.\" Copyright (c) 2016 Broadcom, All Rights Reserved.
2.\" The term Broadcom refers to Broadcom Limited and/or its subsidiaries
3.\"
4.\" Redistribution and use in source and binary forms, with or without
5.\" modification, are permitted provided that the following conditions
6.\" are met:
7.\"
8.\" 1. Redistributions of source code must retain the above copyright
9.\"    notice, this list of conditions and the following disclaimer.
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.\" THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS'
15.\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
16.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
17.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
18.\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
19.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
20.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
21.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
22.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
23.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
24.\" THE POSSIBILITY OF SUCH DAMAGE.
25.\"
26.Dd August 18, 2020
27.Dt BNXT 4
28.Os
29.Sh NAME
30.Nm bnxt
31.Nd "Broadcom NetXtreme-C/NetXtreme-E Family Ethernet driver"
32.Sh SYNOPSIS
33To compile this driver into the kernel,
34place the following lines in your
35kernel configuration file:
36.Bd -ragged -offset indent
37.Cd "device iflib"
38.Cd "device bnxt"
39.Ed
40.Pp
41Alternatively, to load the driver as a
42module at boot time, place the following line in
43.Xr loader.conf 5 :
44.Bd -literal -offset indent
45if_bnxt_load="YES"
46.Ed
47.Sh DESCRIPTION
48The
49.Nm
50driver provides support for various NICs based on the Broadcom BCM57301/2/4,
51and BCM57402/4/6 Ethernet controller chips.
52.Pp
53For more information on configuring this device, see
54.Xr ifconfig 8 .
55.Sh HARDWARE
56The
57.Nm
58driver provides support for various NICs based on the Broadcom NetXtreme-C and
59NetXtreme-E families of Gigabit Ethernet controller chips, including the
60following:
61.Pp
62.Bl -bullet -compact
63.It
64Broadcom BCM57301 NetXtreme-C 10Gb Ethernet Controller
65.It
66Broadcom BCM57302 NetXtreme-C 10Gb/25Gb Ethernet Controller
67.It
68Broadcom BCM57304 NetXtreme-C 10Gb/25Gb/40Gb/50Gb Ethernet Controller
69.It
70Broadcom BCM57304 NetXtreme-C Ethernet Virtual Function
71.It
72Broadcom BCM57314 NetXtreme-C Ethernet Virtual Function
73.It
74Broadcom BCM57402 NetXtreme-E 10Gb Ethernet Controller
75.It
76Broadcom BCM57402 NetXtreme-E Ethernet Partition
77.It
78Broadcom BCM57404 NetXtreme-E 10Gb/25Gb Ethernet Controller
79.It
80Broadcom BCM57404 NetXtreme-E Ethernet Virtual Function
81.It
82Broadcom BCM57404 NetXtreme-E Partition
83.It
84Broadcom BCM57406 NetXtreme-E 10GBASE-T Ethernet Controller
85.It
86Broadcom BCM57406 NetXtreme-E Partition
87.It
88Broadcom BCM57407 NetXtreme-E 10GBase-T Ethernet Controller
89.It
90Broadcom BCM57407 NetXtreme-E 25Gb Ethernet Controller
91.It
92Broadcom BCM57407 NetXtreme-E Partition
93.It
94Broadcom BCM57412 NetXtreme-E Partition
95.It
96Broadcom BCM57414 NetXtreme-E Ethernet Virtual Function
97.It
98Broadcom BCM57414 NetXtreme-E Partition
99.It
100Broadcom BCM57416 NetXtreme-E Partition
101.It
102Broadcom BCM57417 NetXtreme-E Ethernet Partition
103.It
104Broadcom BCM57454 NetXtreme-E 10Gb/25Gb/40Gb/50Gb/100Gb Ethernet
105.El
106.Sh SYSCTL VARIABLES
107These variables must be set before loading the driver, either via
108.Xr loader.conf 5
109or through the use of
110.Xr kenv 1 .
111These are provided by the
112.Xr iflib 4
113framework, and might be better documented there.
114.Bl -tag -width indent
115.It Va dev.bnxt.X.iflib.override_nrxds
116Override the number of RX descriptors for each queue.
117The value is a comma separated list of three positive integers: the size of the
118completion ring,
119the size of the receive ring, and the size of the aggregation ring respectively.
120The completion ring should be at least the size of the aggregation ring plus
121four times the size of the receive ring.
122These numbers must be powers of two, and zero means to use the default.
123Defaults to 0,0,0.
124.It Va dev.bnxt.X.iflib.override_ntxds
125Override the number of TX descriptors for each queue.
126The value is a comma separated list of two positive integers: the size of the
127completion ring, and the size of the transmit ring respectively.
128The completion ring should be at least twice the size of the transmit ring.
129These numbers must be powers of two, and zero means to use the default.
130Defaults to 0,0.
131.It Va dev.bnxt.X.iflib.override_qs_enable
132When set, allows the number of transmit and receive queues to be different.
133If not set, the lower of the number of TX or RX queues will be used for both.
134.It Va dev.bnxt.X.iflib.override_nrxqs
135Set the number of RX queues.
136If zero, the number of RX queues is derived from the number of cores on the
137socket connected to the controller.
138Defaults to 0.
139.It Va dev.bnxt.X.iflib.override_ntxqs
140Set the number of TX queues.
141If zero, the number of TX queues is derived from the number of cores on the
142socket connected to the controller.
143.El
144.Pp
145These
146.Xr sysctl 8
147variables can be changed at any time:
148.Bl -tag -width indent
149.It Va dev.bnxt.X.vlan_only
150Require that incoming frames must have a VLAN tag on them that matches one that
151is configured for the NIC.
152Normally, both frames that have a matching VLAN tag and frames that have no
153VLAN tag are accepted.
154Defaults to 0.
155.It Va dev.bnxt.X.vlan_strip
156When non-zero the NIC strips VLAN tags on receive.
157Defaults to 0.
158.It Va dev.bnxt.X.rx_stall
159Enable buffering rather than dropping frames when there are no available host
160RX buffers for DMA.
161Defaults to 0.
162.It Va dev.bnxt.X.rss_type
163Comma-separated list of RSS hash types to support.
164Default is all types.
165Defaults to ipv4,tcp_ipv4,udp_ipv4,ipv6,tcp_ipv6,udp_ipv6.
166.It Va dev.bnxt.X.rss_key
167Current RSS key.
168Defaults to a randomly generated value which is generated for each device
169during attach.
170.It Va dev.bnxt.X.ver.hwrm_min_ver
171Minimum HWRM (HardWare Resource Manager) firmware API to support.
172If the firmware implements an older version, a warning will be printed, and the
173firmware should be upgraded.
174Defaults to 1.2.2.
175.El
176.Pp
177These
178.Xr sysctl 8
179variables are read-only:
180.Bl -tag -width indent
181.It Va dev.bnxt.X.if_name
182Current interface name of the device.
183This will normally be
184.Va bnxtX ,
185but this can be changed using
186.Cm ifconfig name .
187This sysctl allows correlating an interface with a child of
188.Va dev.bnxt .
189.It Va dev.bnxt.X.nvram.*
190Information about the NVRAM device which contains the device firmware.
191.It Va dev.bnxt.X.ver.*
192Version-related information about the device and firmware:
193.It Va dev.bnxt.X.ver.hwrm_if
194Supported HWRM API version of the currently running firmware.
195.It Va dev.bnxt.X.ver.driver_hwrm_if
196HWRM API version the driver was built to support.
197.It Va dev.bnxt.X.hwstats.*
198Per-queue statistics tracked by the hardware.
199.It Va dev.bnxt.X.hwstats.port_stats.*
200Per-port statistics tracked by the hardware.
201.It Va dev.bnxt.X.hwstats.rxq0.drop_pkts
202Number of packets dropped by hardware on queue zero.
203This number might seem high, but the count includes packets dropped due to
204incorrect destination MAC, unsubscribed multicast address, and other normal
205reasons to ignore Ethernet frames.
206.It Va dev.bnxt.X.hwstats.rxq0.tpa_*
207statistics related to HW LRO.
208.It Va dev.bnxt.X.hw_lro.*
209Enable / Disable HW LRO feature.
210Defaults to disable.
211Enabling HW LRO could cause issues when forwarding is enabled on host.
212.It Va dev.bnxt.X.fc
213Enable / Disable Flow Control feature.
214Defaults to Enable
215.El
216.Sh DIAGNOSTICS
217.Bl -diag
218.It "bnxt%d: %s command returned %s error."
219Device firmware rejected a command from the driver.
220There might be a driver/firmware HWRM API mismatch.
221.It "bnxt%d: Timeout sending %s (timeout: %d) seq %d"
222Device firmware unresponsive.
223A PCI device reset is likely needed.
224.It "bnxt%d: Timeout sending %s (timeout: %d) msg {0x%x 0x%x} len:%d v: %d"
225Partial firmware response.
226A PCI device reset is likely needed.
227.Pp
228As of this writing, the system must be rebooted to initiate a PCI device reset.
229.El
230.Sh SEE ALSO
231.Xr altq 4 ,
232.Xr arp 4 ,
233.Xr iflib 4 ,
234.Xr netintro 4 ,
235.Xr ng_ether 4 ,
236.Xr vlan 4 ,
237.Xr ifconfig 8
238.Sh HISTORY
239The
240.Nm
241device driver first appeared in
242.Fx 11.1 .
243.Sh AUTHORS
244.An -nosplit
245The
246.Nm
247driver was written by
248.An Jack Vogel Aq Mt jfvogel@gmail.com
249and
250.An Stephen Hurd Aq Mt shurd@freebsd.org ,
251and is currently maintained by
252.An Broadcom Limited Aq Mt freebsd.pdl@broadcom.com .
253