Re: [PATCH wireless-next] wifi: mac80211: flush TX for a new key only if it needs tailroom
From: Christopher Griffin
Date: Sat Nov 07 2026 - 20:05:33 EST
(Resent as plain text; the lists dropped the first one.)
Hi Johannes,
I see this is marked Rejected in patchwork, but I didn't find a reply
on the list. Could you tell me what was wrong with it, or what you
would want instead? I'd like to get the underlying problem fixed one
way or another.
The problem, in short: ieee80211_key_link() counts every new key as
needing tailroom before ieee80211_key_replace() uploads it to the
driver, so whenever crypto_tx_tailroom_needed_cnt goes from 0 to 1 the
key install waits in synchronize_net(). On an AP whose driver holds no
other software key (no PMF, so no software BIP key keeping the count
up), that is every pairwise key install at the end of a 4-way
handshake: 30-65 ms at HZ=100, with hostapd blocked and serving no one
meanwhile. We measured it on ath11k, ath10k and mt76 APs; with the
patch the same installs took 0-2 ms.
If the problem is the ordering (the count now goes up only after the
upload, or only if the upload left the key in software), I can rework
it. If it's the approach as a whole, a pointer to the direction you'd
prefer would help.
Thanks,
Christopher Griffin <christophergriffin05@xxxxxxxxx>