BXE(4)

πŸ“¦
version 15.1 Β· 2 versions
, in freebsd 15.1

πŸ’– NAME πŸ’–

bxe β€” QLogic NetXtreme II Ethernet 10Gb PCIe adapter driver. Okay bestie, welcome to the BXE(4) page from the Kernel Interfaces Manual β€” this is the whole vibe for this driver, and I promise it stays useful under all the sparkle. ✨

✨ SYNOPSIS ✨

To compile this driver into the kernel, put these lines in your kernel configuration file:

device bxe

Alternatively, to load the driver as a module at boot time, put this line in loader.conf(5):

if_bxe_load="YES"

🌸 DESCRIPTION 🌸

The bxe driver gives you support for PCIe 10Gb Ethernet adapters based on the QLogic NetXtreme II family of 10Gb chips. It 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). slay.

πŸ¦‹ HARDWARE πŸ¦‹

The bxe driver supports various NICs based on the QLogic NetXtreme II family of 10Gb Ethernet controller chips, including these icons:

  • 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

πŸŽ€ CONFIGURATION πŸŽ€

There are a number of configuration parameters you can set to tweak the driver’s behavior. You can set these via loader.conf(5) so they take effect during the next system boot. The following parameters affect ALL instances of the driver.

🌍 Global sysctl parameters

  • 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 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.
  • 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 to 4080 buffers 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 aggregation byte size. The higher the value, the more packets the hardware will aggregate. Maximum is 65K.
  • 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. (Yes, the sysctl name is literally spelled autogreeen β€” keep it exact, bestie πŸ’…)
  • hw.bxe.udp_rss β€” DEFAULT = 0. Enable/Disable 4-tuple RSS for UDP: 0=DISABLED, 1=ENABLED.
Warning, bestie: 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.

You can tweak the mbuf(9) allocation limit using sysctl(8) and view the current usage with netstat(1) as follows:

# netstat -m
# sysctl kern.ipc.nmbclusters
# sysctl kern.ipc.nmbclusters=<#>

🎯 Per-instance overrides

There are additional configuration parameters you can set on a per-instance basis to dynamically override the default configuration. The # below must be replaced with the driver instance / interface unit number:

  • dev.bxe.#.debug β€” DEFAULT = 0. Sets the default logging level of the driver instance. See hw.bxe.debug above 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. See hw.bxe.rx_budget above for more details.

πŸ› οΈ ifconfig(8) tweaks

Additional items can be configured using ifconfig(8):

  • MTU - Maximum Transmission Unit β€” DEFAULT = 1500; RANGE = 46-9184. Run # ifconfig bxe# mtu <n>.
  • Promiscuous Mode β€” DEFAULT = OFF. Run # ifconfig bxe# [ promisc | -promisc ].
  • Rx/Tx Checksum Offload β€” DEFAULT = RX/TX CSUM ON. Note that the Rx and Tx settings are not independent. Run # ifconfig bxe# [ rxcsum | -rxcsum | txcsum | -txcsum ].
  • TSO - TCP Segmentation Offload β€” DEFAULT = ON. Run # ifconfig bxe# [ tso | -tso | tso6 | -tso6 ].
  • LRO - TCP Large Receive Offload β€” DEFAULT = ON. Run # ifconfig bxe# [ lro | -lro ].

πŸ” DIAGNOSTICS AND DEBUGGING πŸ”

There are many statistics exposed by bxe via sysctl(8).

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, 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. 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.

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

When finished, turn the logging back off:

# 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’re the ones who can actually help with support stuff, no cap.

πŸ‘€ SEE ALSO πŸ‘€

πŸ“œ HISTORY πŸ“œ

The bxe device driver first appeared in FreeBSD 9.0.

πŸ‘‘ AUTHORS πŸ‘‘

The bxe driver was written by:

  • Eric Davis β€” edavis@broadcom.com
  • David Christensen β€” davidch@broadcom.com
  • Gary Zambrano β€” zambrano@broadcom.com

That’s the whole BXE(4) page from Debian, dated April 29, 2012 β€” bye bestie, go flex that 10Gb NIC πŸ’…πŸ’–

πŸ“¦ where this page comes from
  • freebsd 15.1: base 15.1
  • πŸ’– girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms