From 48295d31ca90d693356b632750630efd2f1b34eb Mon Sep 17 00:00:00 2001 From: Rodrigo Silva Date: Mon, 27 May 2024 13:47:27 -0400 Subject: [PATCH] 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 https://github.com/espressif/esp-idf/pull/13866 --- components/lwip/Kconfig | 10 ++++++++-- tools/ci/check_public_headers_exceptions.txt | 1 - 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/components/lwip/Kconfig b/components/lwip/Kconfig index 5d80561043eb..c28f5da5d265 100644 --- a/components/lwip/Kconfig +++ b/components/lwip/Kconfig @@ -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)" diff --git a/tools/ci/check_public_headers_exceptions.txt b/tools/ci/check_public_headers_exceptions.txt index eef90d868b0e..c3edbcbff603 100644 --- a/tools/ci/check_public_headers_exceptions.txt +++ b/tools/ci/check_public_headers_exceptions.txt @@ -60,7 +60,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