On Thu, 6 Mar 2025, Adrian Chadd wrote:

On Thu, 6 Mar 2025 at 06:34, Bjoern A. Zeeb <b...@freebsd.org> wrote:



Or multiple:
- unlocked register writes
- rtwn_cmd_sleepable() which defers it to a task which doesn't fly but
   simply opens more problems, especially for the "SET" operation;
   otherwise you'll have to hold all packets until you get a callback
   (I presume) [and make sure crypto state doesn't change anymore].
   Even more fun, you have to make sure a del key is done before doing
   another set; which either will have to error or sleep again if the
   del is sitll pending so simply "reduces chances", or use the taskq
   for serialization as well (going back to holding packets while any
   crypto operation is in progress).


I did that for my ath10k driver - i buffered frames in a per-node queue
until the
key set/update finished, and then i unblocked. PITA, but it needed to be
done.
I had to do the buffering anyway - I needed to buffer frames until the
firmware
BSS JOIN command completed.

You also had a lot more taskqs I remember.

So if you'd like, after we get the crypto cleanup stuff finished enough and
landed, I can tackle seqno next (which removes the TX lock) and then I can
work on pushing some per-STA queue pause stuff into net80211 so we can
delay passing traffic until STA JOIN and key create/update. That way it's
fixed for everyone.

Defering bits into taskqs is not going to solve the problem.

It didn't work for state updates as we found out
        - because we are still swapping nodes under ourselves
It doesn't really work out here nicely either.

The queues are a thing to tackle at some point *but* before any of this the
question is the nt (NODE) lock being held inconsistently in the
downcalls. Until that isn't fixed any of the other other solutions won't
work well either.

I am off for a few hours;   I have manually extracted my "weekend
workaroud" into https://reviews.freebsd.org/D49256 from my TKIP branch
(assume code next to this had changes too) and started a build.
I'll go and test it tonight hopefully individually.  The TKIP branch has
been spinning for an hour and half or so already.

/bz

--
Bjoern A. Zeeb                                                     r15:7

Reply via email to