-
Notifications
You must be signed in to change notification settings - Fork 7.3k
wifi: nrf_wifi: net_if: allocate memory before mutex #88783
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
Merged
kartben
merged 2 commits into
zephyrproject-rtos:main
from
Embeint:250418_nrf_alloc_under_lock
Apr 22, 2025
Merged
wifi: nrf_wifi: net_if: allocate memory before mutex #88783
kartben
merged 2 commits into
zephyrproject-rtos:main
from
Embeint:250418_nrf_alloc_under_lock
Apr 22, 2025
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
9bae3e9
to
37774b1
Compare
krish2718
reviewed
Apr 18, 2025
961f834
to
c522ab7
Compare
krish2718
previously approved these changes
Apr 18, 2025
JarmouniA
reviewed
Apr 18, 2025
Allocate the memory in `nrf_wifi_if_send` *before* taking the nrf70 global mutex. This prevents the function from deadlocking the application if attempting to send under memory-pressure, since many of the memory release paths also happen under the global mutex. Signed-off-by: Jordan Yates <[email protected]>
Commit e33d9ee incorrectly stated that: > Now that nRF70 by default uses zero-copy fine-tune the configuration to get optimal memory while getting peak throughputs. This is incorrect since `NRF_WIFI_ZERO_COPY_TX` is only enabled by default for the nRF54L series. Update the data heap size so that the smaller value is only used when `NRF_WIFI_ZERO_COPY_TX` is enabled. Signed-off-by: Jordan Yates <[email protected]>
c522ab7
to
0460145
Compare
krish2718
approved these changes
Apr 18, 2025
jukkar
approved these changes
Apr 19, 2025
sachinthegreen
approved these changes
Apr 21, 2025
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Allocate the memory in
nrf_wifi_if_send
before taking the nrf70 global mutex. This prevents the function from deadlocking the application if attempting to send under memory-pressure, since many of the memory release paths also happen under the global mutex.Solves one of the deadlock paths from #88781
Also corrects the nRF70 data heap size in
samples/net/zperf
for nRF70 devices using a non-nRF54L host. A smaller heap size was incorrectly applied for all nRF70 applications, not just those that end up withNRF_WIFI_ZERO_COPY_TX
enabled.