Skip to content
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

Conversation

MaochenWang1
Copy link
Collaborator

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.

jukkar
jukkar previously approved these changes Dec 12, 2024
krish2718
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 MaochenWang1 dismissed stale reviews from krish2718 and jukkar via f86f1f3 December 12, 2024 11:19
@MaochenWang1 MaochenWang1 force-pushed the main_mc_heap_related_change branch from ef823a2 to f86f1f3 Compare December 12, 2024 11:19
@MaochenWang1
Copy link
Collaborator Author

Hi @jukkar @krish2718 rebase to fix the conflict, please review again.

@MaochenWang1
Copy link
Collaborator Author

FYI @Rex-Chen-NXP

@MaochenWang1
Copy link
Collaborator Author

Hi @jukkar @dleach02 @krish2718 please help review, thanks

@kartben kartben merged commit 00e8cdc into zephyrproject-rtos:main Dec 16, 2024
25 checks passed
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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants