Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
1. Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS'
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
THE POSSIBILITY OF SUCH DAMAGE.
$FreeBSD: releng/11.0/share/man/man4/bxe.4 267938 2014-06-26 21:46:14Z bapt $
.Dd April 29, 2012 .Dt BXE 4 .Os .Sh NAME .Nm bxe .Nd QLogic NetXtreme II Ethernet 10Gb PCIe adapter driver .Sh SYNOPSIS To compile this driver into the kernel, place the following lines in your kernel configuration file: d -ragged -offset indent .Cd "device bxe" .Ed
p Alternatively, to load the driver as a module at boot time, place the following line in .Xr loader.conf 5 : d -literal -offset indent if_bxe_load="YES" .Ed .Sh DESCRIPTION The .Nm driver provides support for PCIe 10Gb Ethernet adapters based on the QLogic NetXtreme II family of 10Gb chips. The driver supports Jumbo Frames, VLAN tagging, checksum offload (IPv4, TCP, UDP, IPv6-TCP, IPv6-UDP), MSI-X interrupts, TCP Segmentation Offload (TSO), Large Receive Offload (LRO), and Receive Side Scaling (RSS). .Sh HARDWARE The .Nm driver provides support for various NICs based on the QLogic NetXtreme II family of 10Gb Ethernet controller chips, including the following:
p l -bullet -compact t QLogic NetXtreme II BCM57710 10Gb t QLogic NetXtreme II BCM57711 10Gb t QLogic NetXtreme II BCM57711E 10Gb t QLogic NetXtreme II BCM57712 10Gb t QLogic NetXtreme II BCM57712-MF 10Gb t QLogic NetXtreme II BCM57800 10Gb t QLogic NetXtreme II BCM57800-MF 10Gb t QLogic NetXtreme II BCM57810 10Gb t QLogic NetXtreme II BCM57810-MF 10Gb t QLogic NetXtreme II BCM57840 10Gb / 20Gb t QLogic NetXtreme II BCM57840-MF 10Gb .El .Sh CONFIGURATION There a number of configuration parameters that can be set to tweak the driver's behavior. These parameters can be set via the .Xr loader.conf 5 file to take affect during the next system boot. The following parameters affect ALL instances of the driver. l -tag -width indent t Va hw.bxe.debug DEFAULT = 0
Sets the default logging level of the driver. See the Diagnostics and Debugging section below for more details. t Va hw.bxe.interrupt_mode DEFAULT = 2
Sets the default interrupt mode: 0=IRQ, 1=MSI, 2=MSIX. If set to MSIX and allocation fails, the driver will roll back and attempt MSI allocation. If MSI allocation fails, the driver will roll back and attempt fixed level IRQ allocation. If IRQ allocation fails, then the driver load fails. With MSI/MSIX, the driver attempts to allocate a vector for each queue in addition to one more for default processing. t Va hw.bxe.queue_count DEFAULT = 4
Sets the default number of fast path packet processing queues. Note that one MSI/MSIX interrupt vector is allocated per-queue. t Va hw.bxe.max_rx_bufs DEFAULT = 0
Sets the maximum number of receive buffers to allocate per-queue. Zero(0) means to allocate a receive buffer for every buffer descriptor. By default this equates to 4080 buffers per-queue which is the maximum value for this config parameter. t Va hw.bxe.hc_rx_ticks DEFAULT = 25
Sets the number of ticks for host interrupt coalescing in the receive path. t Va hw.bxe.hc_tx_ticks DEFAULT = 50
Sets the number of ticks for host interrupt coalescing in the transmit path. t Va hw.bxe.rx_budget DEFAULT = 0xffffffff
Sets the maximum number of receive packets to process in an interrupt. If the budget is reached then the remaining/pending packets will be processed in a scheduled taskqueue. t Va hw.bxe.max_aggregation_size DEFAULT = 32768
Sets the maximum LRO aggregration byte size. The higher the value the more packets the hardware will aggregate. Maximum is 65K. t Va hw.bxe.mrrs DEFAULT = -1
Sets the PCI MRRS: -1=Auto, 0=128B, 1=256B, 2=512B, 3=1KB t Va hw.bxe.autogreeen DEFAULT = 0
Set AutoGrEEEN: 0=HW_DEFAULT, 1=FORCE_ON, 2=FORCE_OFF t Va hw.bxe.udp_rss DEFAULT = 0
Enable/Disable 4-tuple RSS for UDP: 0=DISABLED, 1=ENABLED .El
p Special care must be taken when modifying the number of queues and receive buffers. FreeBSD imposes a limit on the maximum number of .Xr mbuf 9 allocations. If buffer allocations fail, the interface initialization will fail and the interface will not be usable. The driver does not make a best effort for buffer allocations. It is an all or nothing effort.
p You can tweak the .Xr mbuf 9 allocation limit using .Xr sysctl 8 and view the current usage with .Xr netstat 1 as follows: d -literal -offset indent # netstat -m # sysctl kern.ipc.nmbclusters # sysctl kern.ipc.nmbclusters=<#> .Ed
p There are additional configuration parameters that can be set on a per-instance basis to dynamically override the default configuration. The '#' below must be replaced with the driver instance / interface unit number: l -tag -width indent t Va dev.bxe.#.debug DEFAULT = 0
Sets the default logging level of the driver instance. See .Va hw.bxe.debug above and the Diagnostics and Debugging section below for more details. t Va dev.bxe.#.rx_budget DEFAULT = 0xffffffff
Sets the maximum number of receive packets to process in an interrupt for the driver instance. See .Va hw.bxe.rx_budget above for more details. .El
p Additional items can be configured using .Xr ifconfig 8 : l -tag -width indent t Va MTU - Maximum Transmission Unit DEFAULT = 1500
RANGE = 46-9184
# ifconfig bxe# mtu <n> t Va Promiscuous Mode DEFAULT = OFF
# ifconfig bxe# [ promisc | -promisc ] t Va Rx/Tx Checksum Offload DEFAULT = RX/TX CSUM ON
Note that the Rx and Tx settings are not independent.
# ifconfig bxe# [ rxcsum | -rxcsum | txcsum | -txcsum ] t Va TSO - TCP Segmentation Offload DEFAULT = ON
# ifconfig bxe# [ tso | -tso | tso6 | -tso6 ] t Va LRO - TCP Large Receive Offload DEFAULT = ON
# ifconfig bxe# [ lro | -lro ] .El .Sh DIAGNOSTICS AND DEBUGGING There are many statistics exposed by .Nm via .Xr sysctl 8 .
p To dump the default driver configuration: d -literal -offset indent # sysctl -a | grep hw.bxe .Ed
p To dump every instance's configuration and detailed statistics: d -literal -offset indent # sysctl -a | grep dev.bxe .Ed
p To dump information for a single instance (replace the '#' with the driver instance / interface unit number): d -literal -offset indent # sysctl -a | grep dev.bxe.# .Ed
p To dump information for all the queues of a single instance: d -literal -offset indent # sysctl -a | grep dev.bxe.#.queue .Ed
p To dump information for a single queue of a single instance (replace the additional '#' with the queue number): d -literal -offset indent # sysctl -a | grep dev.bxe.#.queue.# .Ed
p The .Nm driver has the ability to dump a ton of debug messages to the system log. The default level of logging can be set with the .Va hw.bxe.debug .Xr sysctl 8 . Take care with this setting as it can result in too many logs being dumped. Since this parameter is the default one, it affects every instance and will dramatically change the timing in the driver. A better alternative to aid in debugging is to dynamically change the debug level of a specific instance with the .Va dev.bxe.#.debug .Xr sysctl 8 . This allows you to turn on/off logging of various debug groups on-the-fly.
p The different debug groups that can be toggled are: d -literal -offset indent DBG_LOAD 0x00000001 /* load and unload */ DBG_INTR 0x00000002 /* interrupt handling */ DBG_SP 0x00000004 /* slowpath handling */ DBG_STATS 0x00000008 /* stats updates */ DBG_TX 0x00000010 /* packet transmit */ DBG_RX 0x00000020 /* packet receive */ DBG_PHY 0x00000040 /* phy/link handling */ DBG_IOCTL 0x00000080 /* ioctl handling */ DBG_MBUF 0x00000100 /* dumping mbuf info */ DBG_REGS 0x00000200 /* register access */ DBG_LRO 0x00000400 /* lro processing */ DBG_ASSERT 0x80000000 /* debug assert */ DBG_ALL 0xFFFFFFFF /* flying monkeys */ .Ed
p For example, to debug an issue in the receive path on bxe0: d -literal -offset indent # sysctl dev.bxe.0.debug=0x22 .Ed
p When finished turn the logging back off: d -literal -offset indent # sysctl dev.bxe.0.debug=0 .Ed .Sh SUPPORT For support questions please contact your QLogic approved reseller or QLogic Technical Support at
a http://support.qlogic.com , or by E-mail at .Aq Mt support@qlogic.com . .Sh SEE ALSO .Xr netstat 1 , .Xr altq 4 , .Xr arp 4 , .Xr netintro 4 , .Xr ng_ether 4 , .Xr vlan 4 , .Xr ifconfig 8 .Sh HISTORY The .Nm device driver first appeared in .Fx 9.0 . .Sh AUTHORS The .Nm driver was written by .An Eric Davis Aq Mt edavis@broadcom.com , .An David Christensen Aq Mt davidch@broadcom.com , and .An Gary Zambrano Aq Mt zambrano@broadcom.com .