Create dedicated heap for supplicant #92438
Closed
rado17 wants to merge 2 commits intozephyrproject-rtos:mainfrom
Closed
Create dedicated heap for supplicant #92438rado17 wants to merge 2 commits intozephyrproject-rtos:mainfrom
rado17 wants to merge 2 commits intozephyrproject-rtos:mainfrom
Conversation
|
The following west manifest projects have changed revision in this Pull Request:
⛔ DNM label due to: 1 project with PR revision Note: This message is automatically posted and updated by the Manifest GitHub Action. |
MaochenWang1
reviewed
Jul 3, 2025
335be08 to
f1e8b0b
Compare
Create dedicated heap for supplicant operations and define the heap size. Signed-off-by: Ravi Dondaputi <ravi.dondaputi@nordicsemi.no>
Pull in changes for dedicated heap for supplicant operations. Signed-off-by: Ravi Dondaputi <ravi.dondaputi@nordicsemi.no>
f1e8b0b to
67ff9c4
Compare
|
krish2718
reviewed
Jul 9, 2025
Comment on lines
+27
to
+53
| config WIFI_NM_WPA_SUPPLICANT_GLOBAL_HEAP | ||
| bool "Use Zephyr kernel heap for Wi-Fi driver" | ||
| default y | ||
| help | ||
| Enable this option to use K_HEAP for memory allocations in supplicant. | ||
|
|
||
| if !WIFI_NM_WPA_SUPPLICANT_GLOBAL_HEAP | ||
| config WIFI_NM_WPA_SUPPLICANT_HEAP | ||
| int "Dedicated memory pool for wpa_supplicant" | ||
| def_int 66560 if WIFI_NM_HOSTAPD_AP | ||
| def_int 55000 if WIFI_NM_WPA_SUPPLICANT_CRYPTO_ENTERPRISE && WIFI_CREDENTIALS | ||
| def_int 48000 if WIFI_NM_WPA_SUPPLICANT_CRYPTO_ENTERPRISE | ||
| def_int 41808 if WIFI_NM_WPA_SUPPLICANT_AP | ||
| # 30K is mandatory, but might need more for long duration use cases | ||
| def_int 30000 | ||
| endif # !WIFI_NM_WPA_SUPPLICANT_GLOBAL_HEAP | ||
|
|
||
| if WIFI_NM_WPA_SUPPLICANT_GLOBAL_HEAP | ||
| config HEAP_MEM_POOL_ADD_SIZE_HOSTAP | ||
| def_int 66560 if WIFI_NM_HOSTAPD_AP | ||
| def_int 55000 if WIFI_NM_WPA_SUPPLICANT_CRYPTO_ENTERPRISE && WIFI_CREDENTIALS | ||
| def_int 48000 if WIFI_NM_WPA_SUPPLICANT_CRYPTO_ENTERPRISE | ||
| def_int 41808 if WIFI_NM_WPA_SUPPLICANT_AP | ||
| # 30K is mandatory, but might need more for long duration use cases | ||
| def_int 30000 | ||
| endif # WIFI_NM_WPA_SUPPLICANT_GLOBAL_HEAP | ||
|
|
Contributor
There was a problem hiding this comment.
You can de-duplicate this by something like:
+config WIFI_NM_WPA_SUPPLICANT_HEAP_SIZE
+ int
+ default 66560 if WIFI_NM_HOSTAPD_AP
+ default 55000 if WIFI_NM_WPA_SUPPLICANT_CRYPTO_ENTERPRISE && WIFI_CREDENTIALS
+ default 48000 if WIFI_NM_WPA_SUPPLICANT_CRYPTO_ENTERPRISE
+ default 41808 if WIFI_NM_WPA_SUPPLICANT_AP
+ # 30K is mandatory, but might need more for long duration use cases
+ default 30000
+
if !WIFI_NM_WPA_SUPPLICANT_GLOBAL_HEAP
config WIFI_NM_WPA_SUPPLICANT_HEAP
int "Dedicated memory pool for wpa_supplicant"
- def_int 66560 if WIFI_NM_HOSTAPD_AP
- def_int 55000 if WIFI_NM_WPA_SUPPLICANT_CRYPTO_ENTERPRISE && WIFI_CREDENTIALS
- def_int 48000 if WIFI_NM_WPA_SUPPLICANT_CRYPTO_ENTERPRISE
- def_int 41808 if WIFI_NM_WPA_SUPPLICANT_AP
- # 30K is mandatory, but might need more for long duration use cases
- def_int 30000
+ default WIFI_NM_WPA_SUPPLICANT_HEAP_SIZE
+ help
+ Dedicated memory pool size for wpa_supplicant.
endif # !WIFI_NM_WPA_SUPPLICANT_GLOBAL_HEAP
if WIFI_NM_WPA_SUPPLICANT_GLOBAL_HEAP
config HEAP_MEM_POOL_ADD_SIZE_HOSTAP
- def_int 66560 if WIFI_NM_HOSTAPD_AP
- def_int 55000 if WIFI_NM_WPA_SUPPLICANT_CRYPTO_ENTERPRISE && WIFI_CREDENTIALS
- def_int 48000 if WIFI_NM_WPA_SUPPLICANT_CRYPTO_ENTERPRISE
- def_int 41808 if WIFI_NM_WPA_SUPPLICANT_AP
- # 30K is mandatory, but might need more for long duration use cases
- def_int 30000
+ int
+ default WIFI_NM_WPA_SUPPLICANT_HEAP_SIZE
+ help
+ Additional heap size for wpa_supplicant when using global heap.
endif # WIFI_NM_WPA_SUPPLICANT_GLOBAL_HEAP
Contributor
|
Moved to #93085 |
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
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.



Create dedicated heap for supplicant operations. Currently, WPA supplicant uses the k_malloc, which is shared across various subsystems, and we cannot enforce a minimum availability. Using a dedicated HEAP that can be pre-allocated solves this by always having necessary memory .
Introduce an option for user to choose between dedicated heap and system heap.