linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Ben Greear <greearb@candelatech.com>
To: Johannes Berg <johannes@sipsolutions.net>,
	linux-wireless@vger.kernel.org
Cc: Kalle Valo <kvalo@codeaurora.org>
Subject: Re: [PATCH] mac80211: do not iterate active interfaces when in re-configure
Date: Wed, 16 Sep 2020 15:28:14 -0700	[thread overview]
Message-ID: <a38f8f2f-9de6-5e03-4df5-1b5fae584ecd@candelatech.com> (raw)
In-Reply-To: <cbe230f7270587e14ccee835561c437362e3933d.camel@sipsolutions.net>

On 7/30/20 8:03 AM, Johannes Berg wrote:
> On Thu, 2020-07-30 at 07:52 -0700, Ben Greear wrote:
> 
>>> Consider
>>>
>>> add interface wlan0
>>> add interface wlan1
>>> iterate active interfaces -> wlan0 wlan1
>>> add interface wlan2
>>> iterate active interfaces -> wlan0 wlan1 wlan2
>>>
>>> If you apply this scenario to a restart, which ought to be functionally
>>> equivalent to the normal startup, just compressed in time, you're
>>> basically saying that today you get
>>>
>>> add interface wlan0
>>> add interface wlan1
>>> iterate active interfaces -> wlan0 wlan1 wlan2 << problem here
>>> add interface wlan2
>>> iterate active interfaces -> wlan0 wlan1 wlan2
>>>
>>> which yeah, totally seems wrong.
>>>
>>> But fixing that to be
>>>
>>> add interface wlan0
>>> add interface wlan1
>>> iterate active interfaces ->
>>> <nothing>
>>> add interface wlan2
>>> iterate active interfaces -> <nothing>
>>> (or
>>> maybe -> wlan0 wlan1 wlan2 if the reconfig already completed)
>>>
>>> seems equally wrong?
>>
>> So, looks like there is a flags option passed to the iterate logic, and it is indeed called
>> directly from drivers.  So, I could just add a new flag value, and | it in when calling from ath10k.
>>
>> I'm not sure it would really solve the second case, but at least in practice,
>> that one doesn't seem to be a problem with ath10k, and the first case *was*
>> a problem.
>>
>> If that sounds OK to you, I'll work on the patch as described.
> 
> Right, that'd be the option 2. I described earlier. I can live with that
> even if I'd prefer to fix it as per 1. to "make sense". But I guess
> there could even be "more legitimate" cases to not want to iterate while
> restarting, even if I'm not really sure where that'd make sense?
> 
> I guess Kalle should comment on whether he'd accept that into the
> driver.
> 
> Kalle, as you can see above mac80211 appears to be broken wrt. iterating
> "active" interfaces during a restart - the iteration considers all
> interfaces active that were active before the restart, not just the ones
> that were already re-added to the driver. Ben says this causes trouble
> in ath10k.
> 
> IMHO the right fix for this would be to fix the iteration to only reach
> the ones that have been re-added, like I've said above. OTOH, Ben isn't
> really convinced that that's right, and has experience with a patch that
> makes mac80211 return *no* interfaces whatsoever in the iteration when
> done while in restart. Like I say there, it seems wrong to me.
> 
> But depending on what ath10k actually _does_ with this list, perhaps
> it's not an issue. Perhaps it's just transient state that it derives
> from it, so if it does it again after the reconfig is completed, it
> would in fact get all the information it needed.
> 
> I'm pretty sure this would break iwlwifi, so one option (less preferred)
> would be to add a flag to say "skip iteration in reconfig".
> 
> actually does the driver know it's in reconfig? Perhaps it could even do
> that completely on its own?
> 
> Anyway, the question is what you think about doing such a thing in the
> driver, if it fixes issues even if it's probably not really correct.
> 
> johannes

So, no response from Kalle on this for some time.  I thought I'd ping one
more time before I make an effort to create another out-of-tree patch.

Johannes, if you are OK with a new flag in mac80211, then I can patch ath10k-ct
driver regardless of whether other drivers use it.

Thanks,
Ben

-- 
Ben Greear <greearb@candelatech.com>
Candela Technologies Inc  http://www.candelatech.com

  reply	other threads:[~2020-09-16 22:28 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-25 16:53 [PATCH] mac80211: do not iterate active interfaces when in re-configure greearb
2020-07-30 11:48 ` Johannes Berg
2020-07-30 13:05   ` Ben Greear
2020-07-30 13:13     ` Johannes Berg
2020-07-30 13:27       ` Ben Greear
2020-07-30 13:41         ` Johannes Berg
2020-07-30 14:52           ` Ben Greear
2020-07-30 15:03             ` Johannes Berg
2020-09-16 22:28               ` Ben Greear [this message]
2020-09-21  8:50               ` 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=a38f8f2f-9de6-5e03-4df5-1b5fae584ecd@candelatech.com \
    --to=greearb@candelatech.com \
    --cc=johannes@sipsolutions.net \
    --cc=kvalo@codeaurora.org \
    --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).