mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Anthony Pighin <anthony.pighin@nokia.com>
To: Vladimir Oltean <vladimir.oltean@nxp.com>
Cc: Madalin Bucur <madalin.bucur@nxp.com>,
	"Christophe Leroy (CS GROUP)" <chleroy@kernel.org>,
	Claudiu Manoil <claudiu.manoil@nxp.com>,
	Camelia Groza <camelia.groza@nxp.com>,
	linuxppc-dev@lists.ozlabs.org,
	linux-arm-kernel@lists.infradead.org, stable@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] soc: fsl: qbman: flush the private memory before enabling QMan and BMan
Date: Fri,  4 Dec 2026 13:08:19 -0500	[thread overview]
Message-ID: <20261204180819.2719449-1-anthony.pighin@nokia.com> (raw)
In-Reply-To: <axLVEuiVAv2MyZQi@lxl00025.wbi.nxp.com>

Hi Vladimir,

On Fri, Dec 04, 2026 at 07:06:03PM +0200, Vladimir Oltean wrote:
> If I'm right it also means your patch does not fix the bug you're
> actually trying to track down, correct?

Correct. Thanks for pushing back on the FBPR theory. It was wrong, and
your questions are what got us to the real bug.

> There is clearly a misunderstanding here. I never said an all-zero frame
> descriptor. I said the buffer address is zero.

Understood, I misread you there.

> I have a suspicion that your problem may be fixed by the patch below.
> Please try.

It is, and thanks for digging into bman_release() to find it. Your
analysis showed exactly where to force the race, which is what made
a reproducer possible.

I tested on an LS1043A board running v6.18.62 with CONFIG_PREEMPT=y,
where dpaa_bp_seed() runs during probe in udevd task context.

First, without your patch, I added a debug hook to bman_release() just
before the second get_affine_portal(), where bm_rcr_start() has already
returned an entry but the portal is no longer held. The hook acts only
on the first two releases from dpaa_bp_seed().

On the first release the hook migrated the task to another CPU.
bman_release() filled the entry in the old CPU's RCR, then committed
the current entry of the new CPU's RCR, which had never been written.

  bman-dbg: migrate udevd/125 cpu 3 -> 0 (now 0), ret 0
  bman-dbg: pool 0 filled ffff800081225000 slot 0, committing ffff800080eb9000 slot 0 on cpu 0: bpid 0 bufs 0 0 0 0 0 0 0 0

On the second it made a nested bman_release() on the same portal, the
case your commit message describes. The entry the outer call committed
was all zeroes, as you expected.

  bman-dbg: pool 0 filled ffff800080eb9040 slot 1, committing ffff800080eb9080 slot 2 on cpu 0: bpid 0 bufs 0 0 0 0 0 0 0 0

That put 16 zero addresses into BPID 0, and FMan received 16 frames
into them 1.5 s after link up.

  [   25.765468] fsl_dpaa_mac 1ae4000.ethernet mgmt: Link is Up - 1Gbps/Full - flow control off
  [   27.236335] rx_default_dqrr(mgmt): NULL buffer! format=0, offset=256, length=1514, status=0x4
  ... 15 more identical lines

With your patch, the hook at the same point found preemption and IRQs
disabled and could not act. Each committed entry was the one just
filled, there were no NULL buffers, and mgmt passed traffic normally.

The footprint matches our field reports. Recent hits on v6.6.59 and
v6.12.57 all come at boot, on mgmt, within a few seconds of link up,
with real lengths and parse status. For example:

  [   31.769753] fsl_dpaa_mac 1ae4000.ethernet mgmt: Link is Up - 1Gbps/Full - flow control off
  [   32.939955] rx_default_dqrr(mgmt): NULL buffer! format=0, offset=256, length=1514, status=0x4
  [   32.939982] rx_default_dqrr(mgmt): NULL buffer! format=0, offset=256, length=1514, status=0x4
  [   32.939989] rx_default_dqrr(mgmt): NULL buffer! format=0, offset=256, length=1514, status=0x4
  [   32.939995] rx_default_dqrr(mgmt): NULL buffer! format=0, offset=256, length=1514, status=0x4
  [   32.940002] rx_default_dqrr(mgmt): NULL buffer! format=0, offset=256, length=1514, status=0x4

Those logs can't tell which of the two cases occurred. The migration
case needs no second caller, only a preemption in the window. Nothing
else releases buffers during probe on our board, so it is the likelier
of the two. You may want to add it to your commit message.

Tested-by: Anthony Pighin <anthony.pighin@nokia.com>

That leaves the QMan part of my patch, which you said you were already
writing a fix for. Having the full PFDR fix in one commit from you may
be the better approach. Or would you prefer a v2 from me with only the
QMan change?

Thanks,
Anthony

  reply	other threads:[~2026-12-04 18:08 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20261203160158.766599-1-anthony.pighin@nokia.com>
     [not found] ` <AM0PR04MB119140B526AAAD4A5DC387C19EC4B2@AM0PR04MB11914.eurprd04.prod.outlook.com>
2026-12-03 17:01   ` Vladimir Oltean
2026-12-03 18:59     ` Anthony Pighin
2026-12-03 21:52       ` Vladimir Oltean
2026-12-03 23:05         ` Anthony Pighin
2026-12-04 10:35           ` Vladimir Oltean
2026-12-04 14:03             ` Anthony Pighin
2026-12-04 17:06               ` Vladimir Oltean
2026-12-04 18:08                 ` Anthony Pighin [this message]
2026-12-04 20:49                   ` Vladimir Oltean
2026-12-04 23:46                     ` Anthony Pighin
2026-12-05  0:00                       ` Anthony Pighin
2026-12-03 19:14     ` Christophe Leroy (CS GROUP)

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20261204180819.2719449-1-anthony.pighin@nokia.com \
    --to=anthony.pighin@nokia.com \
    --cc=camelia.groza@nxp.com \
    --cc=chleroy@kernel.org \
    --cc=claudiu.manoil@nxp.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=madalin.bucur@nxp.com \
    --cc=stable@vger.kernel.org \
    --cc=vladimir.oltean@nxp.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®