Re: [PATCH] soc: fsl: qbman: flush the private memory before enabling QMan and BMan
From: Anthony Pighin
Date: Fri Dec 04 2026 - 09:04:01 EST
Hi Vladimir,
On Fri, Dec 04, 2026 at 12:35:23PM +0200, Vladimir Oltean wrote:
> The fact is that I don't see how a zeroed FBPR could possibly fit your
> symptoms.
You are right. I tested it on an LS1043A with a private pool (BPID 1)
of 4096 dummy addresses. I rewrote one stored FBPR in DRAM through a
non-cacheable mapping, then drained the pool, with EMCI masked in
ERR_IER so its status stayed latched:
FBPR rewrite zero addresses EMCI buffers lost
BP0-BP7 zeroed 8 no 0
BP0-BP7 and FBPR_BPA zeroed 0 yes 3200
BP0-BP7 and BPID zeroed 0 yes 2856
all 64 bytes zeroed 0 yes 2904
Each time, CEAR held the index of the FBPR I had rewritten. A zeroed
FBPR drops the rest of the list and never yields zero addresses. The
reproducer behind my commit message zeroed only BP0-BP7, which is the
crafted case, so it does not support the field symptom. The BMan half
of the patch has no basis, and I'll drop it.
> Did you ever reproduce this problem with the upstream driver
> that you're patching?
We hit it with the upstream dpaa_eth driver (fsl_dpa). The oops was on
v5.15.135. The NULL buffer log is from v6.6.52, after we added the
check, which only drops and logs.
> You also didn't mention which interface was receiving traffic, and what
> BPID it was using?
mgmt/eth0, which is fm1-mac3 and the only DPAA interface on the board.
Its bpids file reads 0.
> To me, the more mundane explanation that
> someone is handing buffers with address 0 to bman_release() seems
> infinitely more likely than such an accidental corruption.
Releasing address 0 does reproduce the symptom, but not by any path I
can match to the field log. One all-zero FD enqueued to mgmt/eth0's Rx
error FQ gave:
fsl_dpaa_mac 1ae4000.ethernet mgmt: Err FD status = 0x00000000
rx_default_dqrr(mgmt): NULL buffer! format=0, offset=256, length=590, status=0x4
dpaa_fd_release() put address 0 into pool 0, and FMan received the next
frame into it. But that path logs "Err FD status" first, mgmt/eth0's
message level includes hw, and the field log has only the NULL buffer
lines. An all-zero FD on a Tx FQ was dropped without releasing
anything. I have not found what released the zero addresses on the
failing boot.
> Do you see the message below with the port under heavy traffic and the
> patch attached?
It does not appear to be traffic load dependent. Every hit came just
after the port was brought up, and in the v6.6.52 log the first NULL
buffer line is 1.2 s after link up.
The field logs can't show EMCI, since bman_isr() clears it without
printing it, so your patch would be worth having for that alone.
Thanks,
Anthony