BXE(4)
π¦ NAME π¦
hii bestie π welcome to bxe(4), straight out of the Kernel Interfaces Manual β it's the glow-up era of your network card and we're all here for it.
bxe β the QLogic NetXtreme II Ethernet 10Gb PCIe adapter driver β¨
π SYNOPSIS π
okay so if you want this driver baked into your kernel (main character move, no cap), you drop these lines into your kernel configuration file:
device bxe
orrr, if you'd rather just load it as a module at boot time like a chill lowkey queen, put this line in loader.conf(5):
if_bxe_load="YES"
πΈ DESCRIPTION πΈ
so the bxe driver is the one holding it DOWN for PCIe 10Gb Ethernet adapters built on the QLogic NetXtreme II family of 10Gb chips π
and the features? it's giving everything:
- Jumbo Frames
- VLAN tagging
- checksum offload (
IPv4,TCP,UDP,IPv6-TCP,IPv6-UDP) - MSI-X interrupts
- TCP Segmentation Offload (TSO)
- Large Receive Offload (LRO)
- Receive Side Scaling (RSS)
ate. no crumbs. periodt π₯
π HARDWARE π
the bxe driver supports a whole squad of NICs based on the QLogic NetXtreme II family of 10Gb Ethernet controller chips, and the roster is:
- QLogic NetXtreme II BCM57710 10Gb
- QLogic NetXtreme II BCM57711 10Gb
- QLogic NetXtreme II BCM57711E 10Gb
- QLogic NetXtreme II BCM57712 10Gb
- QLogic NetXtreme II BCM57712-MF 10Gb
- QLogic NetXtreme II BCM57800 10Gb
- QLogic NetXtreme II BCM57800-MF 10Gb
- QLogic NetXtreme II BCM57810 10Gb
- QLogic NetXtreme II BCM57810-MF 10Gb
- QLogic NetXtreme II BCM57840 10Gb / 20Gb
- QLogic NetXtreme II BCM57840-MF 10Gb
that's the whole lineup, no gatekeeping π«Ά
β¨ CONFIGURATION β¨
okay so there are a number of configuration parameters you can set to tweak the driver's behavior, and you set them through the loader.conf(5) file so they take affect during the next system boot π
heads up bestie: the following parameters affect ALL instances of the driver. all of them. every single one.
hw.bxe.debugβDEFAULT = 0. Sets the default logging level of the driver. See the Diagnostics and Debugging section below for more details. πhw.bxe.interrupt_modeβDEFAULT = 2. Sets the default interrupt mode:0=IRQ,1=MSI,2=MSIX. If you set it to MSIX and the 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. And if IRQ allocation fails, then the driver load fails, periodt π. With MSI/MSIX, the driver attempts to allocate a vector for each queue in addition to one more for default processing.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.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 to4080buffers per-queue, which is the maximum value for this config parameter.hw.bxe.hc_rx_ticksβDEFAULT = 25. Sets the number of ticks for host interrupt coalescing in the receive path.hw.bxe.hc_tx_ticksβDEFAULT = 50. Sets the number of ticks for host interrupt coalescing in the transmit path.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.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 is65K.hw.bxe.mrrsβDEFAULT = -1. Sets the PCI MRRS:-1=Auto,0=128B,1=256B,2=512B,3=1KB.hw.bxe.autogreeenβDEFAULT = 0. Set AutoGrEEEN:0=HW_DEFAULT,1=FORCE_ON,2=FORCE_OFF.hw.bxe.udp_rssβDEFAULT = 0. Enable/Disable 4-tuple RSS for UDP:0=DISABLED,1=ENABLED.
π¨ bestie listen, special care must be taken when modifying the number of queues and receive buffers. FreeBSD imposes a limit on the maximum number of 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. it's giving β¨all or nothingβ¨ and it means it.
you can tweak the mbuf(9) allocation limit using sysctl(8) and view the current usage with netstat(1) like this:
# netstat -m
# sysctl kern.ipc.nmbclusters
# sysctl kern.ipc.nmbclusters=<#>
π per-instance config, because you're special π
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, okay? don't leave the#there, it's not a vibe.
dev.bxe.#.debugβDEFAULT = 0. Sets the default logging level of the driver instance. Seehw.bxe.debugabove and the Diagnostics and Debugging section below for more details.dev.bxe.#.rx_budgetβDEFAULT = 0xffffffff. Sets the maximum number of receive packets to process in an interrupt for the driver instance. Seehw.bxe.rx_budgetabove for more details.
π more things you can configure with ifconfig(8) π
MTU - Maximum Transmission Unit
DEFAULT = 1500RANGE = 46-9184
# ifconfig bxe# mtu <n>
Promiscuous Mode
DEFAULT = OFF
# ifconfig bxe# [ promisc | -promisc ]
Rx/Tx Checksum Offload
DEFAULT = RX/TX CSUM ON
note that the Rx and Tx settings are not independent, they're a package deal π
# ifconfig bxe# [ rxcsum | -rxcsum | txcsum | -txcsum ]
TSO - TCP Segmentation Offload
DEFAULT = ON
# ifconfig bxe# [ tso | -tso | tso6 | -tso6 ]
LRO - TCP Large Receive Offload
DEFAULT = ON
# ifconfig bxe# [ lro | -lro ]
π₯ DIAGNOSTICS AND DEBUGGING π₯
there are so many statistics exposed by bxe via sysctl(8), it's honestly iconic.
to dump the default driver configuration:
# sysctl -a | grep hw.bxe
to dump every instance's configuration and detailed statistics:
# sysctl -a | grep dev.bxe
to dump information for a single instance (replace the # with the driver instance / interface unit number):
# sysctl -a | grep dev.bxe.#
to dump information for all the queues of a single instance:
# sysctl -a | grep dev.bxe.#.queue
to dump information for a single queue of a single instance (replace the additional # with the queue number):
# sysctl -a | grep dev.bxe.#.queue.#
the bxe 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 hw.bxe.debug sysctl(8).
π take care with this setting, bestie, because 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. that's not a cute look.
a better alternative to aid in debugging is to dynamically change the debug level of a specific instance with the dev.bxe.#.debug sysctl(8). This allows you to turn on/off logging of various debug groups on-the-fly, which is genuinely such a slay π§
the different debug groups that can be toggled are:
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 */
for example, to debug an issue in the receive path on bxe0:
# sysctl dev.bxe.0.debug=0x22
and when you're finished, turn the logging back off like the responsible legend you are:
# sysctl dev.bxe.0.debug=0
π«Ά SUPPORT π«Ά
for support questions please contact your QLogic approved reseller or QLogic Technical Support at http://support.qlogic.com, or by E-mail at β¨support@qlogic.comβ©. they got you π
β SEE ALSO β
netstat(1), altq(4), arp(4), netintro(4), ng_ether(4), vlan(4), ifconfig(8)
π HISTORY π
the bxe device driver first appeared in FreeBSD 9.0. an era. a moment. π
π AUTHORS π
the bxe driver was written by:
- Eric Davis <
edavis@broadcom.com> - David Christensen <
davidch@broadcom.com> - Gary Zambrano <
zambrano@broadcom.com>
absolute legends, every single one π
and that's the whole page bestie!! this beauty is from Debian, dated April 29, 2012 β the BXE(4) manual, delivered to you with love, sysctl and sparkles πΈβ¨ go configure something iconic π
π¦ where this page comes from
- debian bookworm: freebsd-manpages 12.2-1 Β· BSD-2-Clause-FreeBSD AND BSD-4-Clause
- debian trixie: freebsd-manpages 12.2-2 Β· BSD-2-Clause-FreeBSD AND BSD-4-Clause
- ubuntu jammy: freebsd-manpages 12.2-1 Β· BSD-2-Clause-FreeBSD AND BSD-4-Clause
- ubuntu noble: freebsd-manpages 12.2-1 Β· BSD-2-Clause-FreeBSD AND BSD-4-Clause
- ubuntu questing: freebsd-manpages 12.2-2
- ubuntu resolute: freebsd-manpages 12.2-2build1 Β· BSD-2-Clause-FreeBSD AND BSD-4-Clause
- ubuntu stonking: freebsd-manpages 12.2-2build1 Β· BSD-2-Clause-FreeBSD AND BSD-4-Clause
- Copyright (c) 2014 Qlogic Corporation. All rights reserved
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms