Skip to content

[23.05]: kernel: mac80211: mac80211 stops pushing data and packet rate drops to 0 with large buffer sizes #14895

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: openwrt-23.05
Choose a base branch
from

Conversation

morse-sophronia
Copy link

I am facing an issue, where my wireless driver is unable to push data with large buffer sizes and packet rate drops to 0.

With more investigation I see that there is an issue with the “wake_tx_queue " ieee80211_ops callback ieee80211_handle_wake_tx_queue in Openwrt.

Originally mac80211 v6.1.24 brought in the model, where the driver pulls data frames from the mac80211 queue instead of letting mac80211 push them via drv_tx(), if the driver indicates that it uses this model by implementing the .wake_tx_queue driver operation. This makes “.wake_tx_queue” an optional callback in v6.1.24.

Whereas, since openwrt pulls patches from newer versions, it did bring in patches from v6.2 which reverts this model, and again makes “.wake_tx_queue” a mandatory callback in Openwrt.

git.openwrt.org Git - openwrt/openwrt.git/blob - package/kernel/mac80211/patches/subsys/306-01-v6.2-wifi-mac80211-add-internal-handler-for-wake_tx_queue.patch

To mitigate this situation, we assign “ieee80211_handle_wake_tx_queue" as the wake_tx_queue callback in our wireless driver.

I also see that there was a regression in mac80211 which was fixed as a part of the following patch

https://patchwork.kernel.org/project/linux-wireless/patch/20221230121850.218810-1-alexander@wetzel-home.de/

This is cherry-picked into 6.1.24 Mac80211 as suitable for it, but Openwrt with its patches has brought back in the "wake_tx_push_queue" function but did not bring the changes from the above patch to fix the issue.

So if I bring that in as in the patch currently added everything is back to normal,

Signed-off-by: morse-sophronia <160552744+morse-sophronia@users.noreply.github.com>
@github-actions github-actions bot added core packages pull request/issue for core (in-tree) packages release/23.05 pull request/issue targeted (also) for OpenWrt 23.05 release labels Mar 15, 2024
@Leo-PL
Copy link
Contributor

Leo-PL commented Mar 18, 2024

I applied the patch to my tree and built fine on ath79. I'll be testing it for a short while, on wednesday I probably should have more detailed information.

@morse-sophronia
Copy link
Author

@Leo-PL Thanks that'll be of great help

…ivate keys are used

Signed-off-by: morse-sophronia <160552744+morse-sophronia@users.noreply.github.com>
@sppmasterspp
Copy link

sppmasterspp commented Mar 21, 2024

What is the difference with this PR #14929
except for the fact there is a second commit there.
Maybe it's for the main branch but the changed code is different.

@systemcrash
Copy link
Contributor

What is the difference with this PR #14929 except for the fact there is a second commit there. Maybe it's for the main branch but the changed code is different.

The two seem unrelated, and the pfx stuff probably should not be here. 🤷

@Leo-PL
Copy link
Contributor

Leo-PL commented Mar 21, 2024

Yeah, it simply looks pushed by mistake

@hauke
Copy link
Member

hauke commented Mar 21, 2024

Why don't you bring in the full patch from 6.1 stable? gregkh/linux@7b8fe53

….pfx) private keys are used"

This reverts commit a0da00b.
@morse-sophronia
Copy link
Author

@sppmasterspp @systemcrash @Leo-PL Yes the second commit was a mistake, that is unrelated to this issue, I have removed that commit

@morse-sophronia
Copy link
Author

@sppmasterspp
Copy link

sppmasterspp commented Mar 22, 2024

@morse-sophronia
I test this patch package/kernel/mac80211/patches/subsys/306-wifi-mac80211-proper-mark-iTXQs-for-resumption.patch on R7800 with ath10k driver and firmware (non -ct variant) running 23.05 snapshot NSS build (kernel 5.15.150) along with @Ansuel https://github.com/openwrt/openwrt/pull/12904/commits.
What should we expect? Do you want us to report anything?
Should we look for anything more specific?

@Leo-PL
Copy link
Contributor

Leo-PL commented Mar 24, 2024

I'm still waiting for more detailed feedback from folks at my local hackerspace. No explicit tests, but there seems to be an improvement. I can't really test that myself, because everything was working fine between Archer C7v2 and QCA6174 under Linux on my laptop - only some devices experienced troubles.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core packages pull request/issue for core (in-tree) packages release/23.05 pull request/issue targeted (also) for OpenWrt 23.05 release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants