Page MenuHomeFreeBSD

bxe(4): don't feed a zero page size to ilog2 during ILT init
ClosedPublic

Authored by nick_spun.io on Aug 1 2026, 6:13 PM.
Referenced Files
F169179071: D58587.diff
Mon, Aug 31, 5:41 PM
F169121599: D58587.id183219.diff
Mon, Aug 31, 11:47 AM
F169048120: D58587.id.diff
Mon, Aug 31, 6:03 AM
Unknown Object (File)
Mon, Aug 31, 4:12 AM
Unknown Object (File)
Sat, Aug 29, 2:42 AM
Unknown Object (File)
Fri, Aug 28, 10:24 PM
Unknown Object (File)
Thu, Aug 27, 3:01 AM
Unknown Object (File)
Thu, Aug 27, 1:46 AM
Subscribers

Details

Summary

FreeBSD's bxe hardwires CNIC_SUPPORT() to 0, so bxe_ilt_set_info()
never enters the block that initializes the SRC and TM ILT clients.
Those two clients are left zeroed (page_size 0, flags 0), yet
ecore_ilt_init_page_size() calls ecore_ilt_init_client_psz() for all
four clients unconditionally. For SRC and TM that evaluates
ILOG2(page_size >> 12), i.e. ilog2(0). On an INVARIANTS kernel ilog2()
asserts "ilog argument must be nonzero" and panics the machine the
first time the interface is brought up (bxe_init -> bxe_nic_load ->
bxe_init_hw -> ecore_ilt_init_page_size). On a non-INVARIANTS kernel
it silently programs a bogus page-size register instead.

Restore the else branch that upstream Linux bnx2x carries: when CNIC
is not supported, mark the SRC and TM clients with ILT_CLIENT_SKIP_INIT
and ILT_CLIENT_SKIP_MEM so ecore_ilt_init_client_psz() skips them.

Root-caused from a crash dump on a BCM57810 (device 0x168e): the ILT
clients showed CDU and QM populated and SRC and TM zeroed with no skip
flag set.

Signed-off-by: Nick Price <nick@spun.io>

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

adrian added a reviewer: network.
adrian added a project: network.

nice catch! lets see if we can find a broadcom peep to look at this.

This revision is now accepted and ready to land.Sun, Aug 2, 3:48 PM

oh and I just hit this myself on a power8 box that /has/ bxe in it!