Skip to content

Commit

Permalink
change: bump max sockets in lwip Kconfig
Browse files Browse the repository at this point in the history
Tested under ESP32S3, running 50 tasks, each with a client, and a server
listening to one client, totalizing 150 sockets/files open, forwarding
data from PPP to Ethernet and vice versa.
Reasoning for 255 total sockets/files is VFS local_fd_t being a uint8_t.
Since FD_SETSIZE is defined at tool level, a CMakeLists user definition
is needed in cases above 64 (the default value).

Merges #13866
  • Loading branch information
rdgoprslv authored and David Čermák committed Nov 13, 2024
1 parent 81c4470 commit 8f457ca
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
10 changes: 8 additions & 2 deletions components/lwip/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -135,13 +135,19 @@ menu "LWIP"

config LWIP_MAX_SOCKETS
int "Max number of open sockets"
range 1 16
range 1 253
default 10
help
The practical maximum limit is
determined by available heap memory at runtime.

Sockets take up a certain amount of memory, and allowing fewer
sockets to be open at the same time conserves memory. Specify
the maximum amount of sockets here. The valid value is from 1
to 16.
to 253. If using value above 61, update CMakeLists defining
FD_SETSIZE to the number of sockets used plus the
expected open files (minimum of +3 for stdout, stderr and stdin).


config LWIP_USE_ONLY_LWIP_SELECT
bool "Support LWIP socket select() only (DEPRECATED)"
Expand Down
1 change: 0 additions & 1 deletion tools/ci/check_public_headers_exceptions.txt
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,6 @@ components/json/cJSON/
components/spiffs/include/spiffs_config.h

components/unity/unity/src/unity_internals.h
components/unity/unity/extras/
components/unity/include/unity_config.h
components/unity/include/unity_test_runner.h

Expand Down

0 comments on commit 8f457ca

Please sign in to comment.