-
Notifications
You must be signed in to change notification settings - Fork 6.8k
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
HEAP configuration related change #82903
Merged
kartben
merged 5 commits into
zephyrproject-rtos:main
from
nxp-upstream:main_mc_heap_related_change
Dec 16, 2024
Merged
HEAP configuration related change #82903
kartben
merged 5 commits into
zephyrproject-rtos:main
from
nxp-upstream:main_mc_heap_related_change
Dec 16, 2024
Conversation
This file contains 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
zephyrbot
added
platform: NXP Drivers
NXP Semiconductors, drivers
area: Wi-Fi
Wi-Fi
area: Networking
area: Sockets
Networking sockets
area: Samples
Samples
labels
Dec 12, 2024
jukkar
previously approved these changes
Dec 12, 2024
krish2718
previously approved these changes
Dec 12, 2024
Use HEAP_MEM_POOL_ADD_SIZE_ to add heap for NXP Wi-Fi. For supplicant case, define less heap, as CONFIG_HEAP_MEM_POOL_ADD_SIZE_HOSTAP and CONFIG_HEAP_MEM_POOL_ADD_SIZE_SOCKETPAIR are also enabled. Signed-off-by: Maochen Wang <[email protected]>
Hostapd consumes more heap than supplicant AP case, so increase the default value of hostapd case. Signed-off-by: Maochen Wang <[email protected]>
Remove CONFIG_HEAP_MEM_POOL_SIZE for RW612, it will use HEAP_MEM_POOL_ADD_SIZE_ way to add all module's heap size together, to better control heap size for different case. Signed-off-by: Maochen Wang <[email protected]>
Don't check 'HEAP_MEM_POOL_SIZE != 0', as HEAP_MEM_POOL_SIZE might be 0, but HEAP_MEM_POOL_ADD_SIZE_xxx is defined, which means the actual heap size is not zero. So check KERNEL_MEM_POOL instead. Signed-off-by: Maochen Wang <[email protected]>
For the latest upstream, if MBEDTLS_ENABLE_HEAP is not enabled, it will default select MBEDTLS_PSA_STATIC_KEY_SLOTS, and consume extra SRAM for about 35KB. Therefore, default enable MBEDTLS_ENABLE_HEAP. Signed-off-by: Maochen Wang <[email protected]>
MaochenWang1
force-pushed
the
main_mc_heap_related_change
branch
from
December 12, 2024 11:19
ef823a2
to
f86f1f3
Compare
Hi @jukkar @krish2718 rebase to fix the conflict, please review again. |
jukkar
approved these changes
Dec 12, 2024
FYI @Rex-Chen-NXP |
Hi @jukkar @dleach02 @krish2718 please help review, thanks |
krish2718
approved these changes
Dec 16, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
area: Networking
area: Samples
Samples
area: Sockets
Networking sockets
area: Wi-Fi
Wi-Fi
platform: NXP Drivers
NXP Semiconductors, drivers
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.
drivers: wifi: nxp: add heap for NXP Wi-Fi
Use HEAP_MEM_POOL_ADD_SIZE_ to add heap for NXP Wi-Fi. For supplicant case, define less heap, as CONFIG_HEAP_MEM_POOL_ADD_SIZE_HOSTAP and CONFIG_HEAP_MEM_POOL_ADD_SIZE_SOCKETPAIR are also enabled.
hostap: increase the default heap size of hostapd case
Hostapd consumes more heap than supplicant AP case, so increase the default value of hostapd case.
samples: wifi: shell: remove CONFIG_HEAP_MEM_POOL_SIZE for RW612
Remove CONFIG_HEAP_MEM_POOL_SIZE for RW612, it will use HEAP_MEM_POOL_ADD_SIZE_ way to add all module's heap size together, to better control heap size for different case.
net: sockets: choose SOCKETPAIR_HEAP when MEM_POOL enabled
Don't check 'HEAP_MEM_POOL_SIZE != 0', as HEAP_MEM_POOL_SIZE might be 0, but HEAP_MEM_POOL_ADD_SIZE_xxx is defined, which means the actual heap size is not zero. So check KERNEL_MEM_POOL instead.
samples: wifi: shell: use MBEDTLS_ENABLE_HEAP for RW612
For the latest upstream, if MBEDTLS_ENABLE_HEAP is not enabled, it will default select MBEDTLS_PSA_STATIC_KEY_SLOTS, and consume extra SRAM for about 35KB. Therefore, default enable MBEDTLS_ENABLE_HEAP.