From: Ben Greear <greearb@candelatech.com>
To: Alexander Wetzel <alexander@wetzel-home.de>,
Felix Fietkau <nbd@nbd.name>,
linux-wireless@vger.kernel.org
Cc: Johannes Berg <johannes@sipsolutions.net>
Subject: Re: [PATCH] mac80211: Ensure vif queues are operational after start
Date: Fri, 16 Sep 2022 10:10:21 -0700 [thread overview]
Message-ID: <243e00a7-9945-dc81-e5dc-9206958c78a1@candelatech.com> (raw)
In-Reply-To: <1a1d993e-58cd-6f42-38c9-ea7a9fe6456f@wetzel-home.de>
On 9/16/22 9:38 AM, Alexander Wetzel wrote:
> On 15.09.22 22:39, Ben Greear wrote:
>
>> From reading the original patch description, it was to stop an NPE when AP was stopped. I have been testing
>> this patch below and it fixes the problems I saw with multiple vdevs. I was worried that
>> the code in the 'list_for_each_entry_rcu(sta, &local->sta_list, list) {' might still need to run
>> to keep everything in sync (and my patch allows that to happen), but I do not know if that is true or not.
>>
>
> I'm not sure if it's still save to wake the queues for the vif we are tearing down and assumed the intend was to skip those, too.
>
> But it looks like all stations for the vif are deleted prior to setting sdata->bss = NULL, so the outcome should be the same.
>
> Your solution removes potentially set IEEE80211_TXQ_STOP_NETIF_TX flags, reducing the risk that a queue restart during vif setup ends up with inoperable queues.
> But the only way to set IEEE80211_TXQ_STOP_NETIF_TX seems to be during ieee80211_tx_dequeue(). Which should not be possible to be called as long as
> SDATA_STATE_RUNNING was never set for the vif.
>
> But I'm on thin ice here:-)
I spent two days debugging this and have only barest understanding of how all of the atf/fq/txq logic
is supposed to work.
But, I think my test case was a bit different from yours, and in my test case, before my patch,
it failed 100% of the time:
create two station vdevs on same (mtk7916) radio
admin one up (this works)
admin second one up (this fails, tx path is hung, because sdata->vif.txqs_stopped[ac] was true).
In general, I'd like to keep start/stop state as in-sync everywhere as possible, and I think my patch
might be better at that than yours since it goes through the sta list (and, maybe too, I'm completely
wrong about that).
Potentially, static void __ieee80211_wake_txqs(struct ieee80211_sub_if_data *sdata, int ac)
should just be called each time a vdev goes admin up.
But since my original test case failed so reliably, the __ieee80211_wake_txqs method must not actually be
called when secondary vdevs go admin up. I am not sure if that is per design or some other
bug.
Hoping the 2-3 people who understand this logic well will chime in :)
Thanks,
Ben
--
Ben Greear <greearb@candelatech.com>
Candela Technologies Inc http://www.candelatech.com
next prev parent reply other threads:[~2022-09-16 17:10 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-09-15 13:09 [PATCH] mac80211: Ensure vif queues are operational after start Alexander Wetzel
2022-09-15 16:18 ` Felix Fietkau
2022-09-15 19:59 ` Alexander Wetzel
2022-09-15 20:06 ` Alexander Wetzel
2022-09-15 20:39 ` Ben Greear
2022-09-16 16:38 ` Alexander Wetzel
2022-09-16 17:10 ` Ben Greear [this message]
2022-09-16 5:38 ` Kalle Valo
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=243e00a7-9945-dc81-e5dc-9206958c78a1@candelatech.com \
--to=greearb@candelatech.com \
--cc=alexander@wetzel-home.de \
--cc=johannes@sipsolutions.net \
--cc=linux-wireless@vger.kernel.org \
--cc=nbd@nbd.name \
/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.