From: Johannes Berg <johannes@sipsolutions.net>
To: Alexander Wetzel <alexander@wetzel-home.de>
Cc: linux-wireless@vger.kernel.org
Subject: Re: [RFC] mac80211: Switch all drivers over to iTXQs
Date: Fri, 08 Jul 2022 23:11:56 +0200 [thread overview]
Message-ID: <b2d6360f289ea0de4985a2909919049ff0f53e2b.camel@sipsolutions.net> (raw)
In-Reply-To: <20220707143230.21686-1-alexander@wetzel-home.de>
Nice!
I see your follow-up, but a few comments anyway here on this version.
> + /* Driver has no native support for iTXQ, handle the queues */
> + ieee80211_txq_schedule_start(&local->hw, txq->txq.ac);
> + while ((queue = ieee80211_next_txq(&local->hw, txq->txq.ac)) != NULL) {
> + control.sta = queue->sta;
> + while ((skb = ieee80211_tx_dequeue(&local->hw, queue)))
> + drv_tx(local, &control, skb);
Yeah, I think I see how that might not work right - you don't
necessarily want to pull out everything here.
But it should be easy to break out here, I guess, and continue if the
driver restarts the corresponding queue?
> -/* Indicate which queue to use. */
> u16 ieee80211_select_queue(struct ieee80211_sub_if_data *sdata,
> struct sk_buff *skb)
> {
> -[...]
> + /* mac80211 only supports iTXQ nowadays. Only calculate the hash while
> + * the skb is still hot in the CPU cache
> + */
> + skb_get_hash(skb);
> + return 0;
Hmm. Is that really worth keeping? I'd probably rather remove the
netdev_select_queue callbacks completely.
Regardless, once this works I'm sure we can make a lot of cleanups
elsewhere, e.g. a couple of "!txq" checks in tx.c (tx_prep_agg,
amsdu_aggregate).
Eventually with this implementation I think it'd be worth doing it for
all the cases where ieee80211_get_txq() returns NULL or for where it's
skipped in ieee80211_queue_skb(), i.e.
* monitor mode,
* management frames,
* after-DTIM
* PS response
* STA not uploaded
as well, and just going into the mac80211 iTXQ scheduling code you wrote
in wake_tx_queue() for those cases.
That way, we could get rid of all the special cases in
ieee80211_queue_skb() and callers that depend on the return value.
That would allow us to remove a LOT of code, all the stuff handling
local->pending (tx_pending), tx_frags, etc.
johannes
next prev parent reply other threads:[~2022-07-08 21:12 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
2022-07-08 21:11 ` Johannes Berg [this message]
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=b2d6360f289ea0de4985a2909919049ff0f53e2b.camel@sipsolutions.net \
--to=johannes@sipsolutions.net \
--cc=alexander@wetzel-home.de \
--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).