linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Alexander Wetzel <alexander@wetzel-home.de>
To: Johannes Berg <johannes@sipsolutions.net>
Cc: linux-wireless@vger.kernel.org
Subject: Re: [RFC] mac80211: Switch all drivers over to iTXQs
Date: Fri, 8 Jul 2022 18:42:32 +0200	[thread overview]
Message-ID: <ba8e3ae1-70a9-e016-6c44-ae0c52f97e8e@wetzel-home.de> (raw)
In-Reply-To: <20220707143230.21686-1-alexander@wetzel-home.de>

> This patch is working for at least iwldvm. It exposes what seems to
> be an existing iwldvm driver bug, though. Driver and card continues
> to work, making that a minor side show for now. (I started to look into
> that a bit, maybe more about that in another mail later.)
> Initial tests are indicating comparable speeds in my setup for iwldvm,
> maybe trending to be a bit slower.
> 
> For now I'm interested what I may have missed or what should be done
> differently, so we dare to merge it. I'll planning to run some more
> tests and use iwldvm with this patch on my main workstation for some
> days at least.

I followed up on the iwldvm driver issue.
The problem is, that the push API drivers are expecting that tx 
immediately stops after calling ieee80211_stop_queue(). And this patch 
breaks that.

For iwldvm this happens:
- the HW queues are getting full, iwldvm calls ieee80211_stop_queue()

- the (patched) mac80211 stops the queue but is not aborting the running
   wake_tx_queue() tasklet. Which goes on to hand over skbs to the driver

- The driver runs out of the "internal reserve" hw buffers and starts to
   add the new skbs to the overflow queue

- some hw buffers are reclaimed and the driver tries to process the skbs
   in the overflow q

- For that it releases the internal lock for tx, assuming mac80211
   stopped handing over skbs

- the still running wake_tx_queue() function from mac80211 hands over
   the next skb, grapping the slot(s) intended to be used for the skbs in
   the driver overflow queue.

- which breaks an iwlwifi internal rule how sequence numbers are mapped
   to hw queue slots, causing the warning I got.

I'll fix that and send a new patch.

Alexander

  reply	other threads:[~2022-07-08 16:42 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-07 14:32 [RFC] mac80211: Switch all drivers over to iTXQs Alexander Wetzel
2022-07-08 16:42 ` Alexander Wetzel [this message]
2022-07-08 21:11 ` Johannes Berg
2022-07-21  1:44 ` [mac80211] 722bb2177a: hwsim.ap_fragmentation_open.fail kernel test robot

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=ba8e3ae1-70a9-e016-6c44-ae0c52f97e8e@wetzel-home.de \
    --to=alexander@wetzel-home.de \
    --cc=johannes@sipsolutions.net \
    --cc=linux-wireless@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).