All of lore.kernel.org
 help / color / mirror / Atom feed
From: Lorenzo Bianconi <lorenzo@kernel.org>
To: Florian Maurer <fmaurer@disroot.org>
Cc: Felix Fietkau <nbd@nbd.name>, Ryder Lee <ryder.lee@mediatek.com>,
	Shayne Chen <shayne.chen@mediatek.com>,
	Sean Wang <sean.wang@mediatek.com>,
	Matthias Brugger <matthias.bgg@gmail.com>,
	AngeloGioacchino Del Regno
	<angelogioacchino.delregno@collabora.com>,
	linux-wireless@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org,
	linux-mediatek@lists.infradead.org, stable@vger.kernel.org
Subject: Re: [PATCH wireless 1/2] wifi: mt76: npu: return rx slots to the NPU only after refilling them
Date: Tue, 17 Nov 2026 10:23:30 +0100	[thread overview]
Message-ID: <avwdEgGBeZWWGvzq@lore-qca> (raw)
In-Reply-To: <20261116162741.2438098-1-fmaurer@disroot.org>

[-- Attachment #1: Type: text/plain, Size: 2039 bytes --]

On Nov 16, Florian Maurer wrote:
> On Mon, Nov 09, 2026 at 12:00:15PM +0100, Lorenzo Bianconi wrote:
> > q->head and q->tail are not the same when we have refilled the queue
> > with new buffers. Moreover, I think if mt76_npu_fill_rx_queue() fails
> > [...] it is not correct to use q->head for dma_idx
> 
> You're right, q->tail it is. In my tests I could not tell your version
> and mine apart, so nothing speaks for head + 1.
> 
> > Can you please check the updated patch below?
> 
> Sorry for the delay. I tested it on the W1700K (kernel 6.18.55, mt76
> 467ae2e3) and it works: no oops, no rx stall.
> 
> What I ran: your diff as posted, plus read-only counters that write
> nothing to the descriptors. Load was 62 minutes of iperf3 from an
> ath11k mesh peer at 113-259 Mbit/s, with four busy loops at nice -20
> on the W1700K for 3 s every 18 s. In that time:
> 
> - 61.9 M frames on MT_RXQ_NPU1, 1.88 M on MT_RXQ_NPU0, of which 227781
>   span two slots
> - no oops, no page_pool warning
> - no descriptor that changed between consume and refill
> - no refill failure, no skb failure, no tx-free parse error
> 
> Tested-by: Florian Maurer <fmaurer@disroot.org>
> 
> I found another issue of the NPU while testing, so this took me some
> time as well:
> In one minute, 226 multi-slot frames in a row did not end on the slot
> with LAST. Slots of the rx ring go missing under this kind of load (I
> suspect the NPU drops them), and counting slots by PKT_COUNT then
> assembles the following frames one slot off, in your version and in
> mine. I think tx-free events are lost the same way.
> I will post it as a separate [BUG] report in the next days.
> 
> Optional: in my tree I made the poll report the budget as used when
> the skb allocation fails, so napi polls again instead of waiting for
> an interrupt. It never triggered here.
> 
> Please post your patch with the Tested-by. My 2/2 can be dropped.
> 
> Thanks,
> Florian

ack, I will do. Thanks for testing.

Regards,
Lorenzo

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

  reply	other threads:[~2026-11-17  9:23 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-06 11:51 [PATCH wireless 0/2] wifi: mt76: npu: fix rx ring handling Florian Maurer
2026-11-06 11:51 ` [PATCH wireless 1/2] wifi: mt76: npu: return rx slots to the NPU only after refilling them Florian Maurer
2026-11-06 14:21   ` Lorenzo Bianconi
2026-11-08 20:53     ` Florian Maurer
2026-11-09 11:00       ` Lorenzo Bianconi
2026-11-16 10:40         ` Lorenzo Bianconi
2026-11-16 16:27           ` Florian Maurer
2026-11-17  9:23             ` Lorenzo Bianconi [this message]
2026-11-06 11:51 ` [PATCH wireless 2/2] wifi: mt76: npu: read the rx slot count after the first slot is complete Florian Maurer
2026-11-06 14:26   ` Lorenzo Bianconi
2026-11-08 21:21     ` Florian Maurer

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=avwdEgGBeZWWGvzq@lore-qca \
    --to=lorenzo@kernel.org \
    --cc=angelogioacchino.delregno@collabora.com \
    --cc=fmaurer@disroot.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mediatek@lists.infradead.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=matthias.bgg@gmail.com \
    --cc=nbd@nbd.name \
    --cc=ryder.lee@mediatek.com \
    --cc=sean.wang@mediatek.com \
    --cc=shayne.chen@mediatek.com \
    --cc=stable@vger.kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.