Merge branch 'lwip/acceptmbox_config' into 'master'

change(lwip): Added macro to configure TCP accept mailbox size

See merge request espressif/esp-idf!27276
This commit is contained in:
Abhik Roy
2024-01-03 15:55:12 +08:00
5 changed files with 18 additions and 1 deletions

View File

@@ -665,6 +665,20 @@ menu "LWIP"
mail box is full, the LWIP drops the packets. So generally we need to make sure the TCP
receive mail box is big enough to avoid packet drop between LWIP core and application.
config LWIP_TCP_ACCEPTMBOX_SIZE
int "Default TCP accept mail box size"
default 6
range 1 64 if !LWIP_WND_SCALE
range 1 255 if LWIP_WND_SCALE
help
Set TCP accept mail box size. Generally bigger value means supporting larger backlogs
but more memory. The recommended value is 6, but applications can set it to a lower value
if listening servers are meant to have a smaller backlog.
TCP accept mail box is a per socket mail box, when the application listens for connections
with a given listening TCP socket. If the mailbox is full, LWIP will send a RST packet and
the client will fail to connect.
config LWIP_TCP_QUEUE_OOSEQ
bool "Queue incoming out-of-order segments"
default y

View File

@@ -849,7 +849,7 @@ static inline uint32_t timeout_from_offered(uint32_t lease, uint32_t min)
* The queue size value itself is platform-dependent, but is passed to
* sys_mbox_new() when the acceptmbox is created.
*/
#define DEFAULT_ACCEPTMBOX_SIZE 6
#define DEFAULT_ACCEPTMBOX_SIZE CONFIG_LWIP_TCP_ACCEPTMBOX_SIZE
/**
* DEFAULT_THREAD_STACKSIZE: The stack size used by any other lwIP thread.