Skip to content

Commit 48295d3

Browse files
rdgoprslvdavid-cermak
authored andcommitted
change: bump max sockets in lwip Kconfig
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
1 parent b1c8757 commit 48295d3

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

components/lwip/Kconfig

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -135,13 +135,19 @@ menu "LWIP"
135135

136136
config LWIP_MAX_SOCKETS
137137
int "Max number of open sockets"
138-
range 1 16
138+
range 1 253
139139
default 10
140140
help
141+
The practical maximum limit is
142+
determined by available heap memory at runtime.
143+
141144
Sockets take up a certain amount of memory, and allowing fewer
142145
sockets to be open at the same time conserves memory. Specify
143146
the maximum amount of sockets here. The valid value is from 1
144-
to 16.
147+
to 253. If using value above 61, update CMakeLists defining
148+
FD_SETSIZE to the number of sockets used plus the
149+
expected open files (minimum of +3 for stdout, stderr and stdin).
150+
145151

146152
config LWIP_USE_ONLY_LWIP_SELECT
147153
bool "Support LWIP socket select() only (DEPRECATED)"

tools/ci/check_public_headers_exceptions.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,6 @@ components/json/cJSON/
6060
components/spiffs/include/spiffs_config.h
6161

6262
components/unity/unity/src/unity_internals.h
63-
components/unity/unity/extras/
6463
components/unity/include/unity_config.h
6564
components/unity/include/unity_test_runner.h
6665

0 commit comments

Comments
 (0)