Skip to content

Commit

Permalink
net: sockets: change socketpair related buffer and heap size
Browse files Browse the repository at this point in the history
Latest supplicant uses 1K buffer size for sending control message via
socketpair, so reducing the NET_SOCKETPAIR_BUFFER_SIZE to save memory
footprint. There are 4 socketpairs for supplicant only case, and 6
socketpairs for hostapd case, update the heap size correspondingly.

Signed-off-by: Maochen Wang <[email protected]>
  • Loading branch information
MaochenWang1 authored and kartben committed Jan 2, 2025
1 parent 8b403ba commit f9901e8
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions subsys/net/lib/sockets/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -332,7 +332,7 @@ if NET_SOCKETPAIR

config NET_SOCKETPAIR_BUFFER_SIZE
int "Size of the intermediate buffer, in bytes"
default 4096 if WIFI_NM_WPA_SUPPLICANT
default 1024 if WIFI_NM_WPA_SUPPLICANT
default 64
range 1 4096
help
Expand Down Expand Up @@ -363,7 +363,8 @@ if NET_SOCKETPAIR_HEAP

config HEAP_MEM_POOL_ADD_SIZE_SOCKETPAIR
int
default 32000 if WIFI_NM_WPA_SUPPLICANT
default 13696 if WIFI_NM_HOSTAPD_AP
default 9120 if WIFI_NM_WPA_SUPPLICANT
default 256

endif # NET_SOCKETPAIR_HEAP
Expand Down

0 comments on commit f9901e8

Please sign in to comment.