From af82516cfbdbebe0c265f7e7aaae148fd33e4e7a Mon Sep 17 00:00:00 2001 From: yuanjm Date: Mon, 8 Jun 2020 14:26:46 +0800 Subject: [PATCH] feat(lwip): make LWIP TCP rto time configurable --- components/lwip/Kconfig | 7 +++++++ components/lwip/lwip | 2 +- components/lwip/port/esp32/include/lwipopts.h | 6 ++++++ 3 files changed, 14 insertions(+), 1 deletion(-) diff --git a/components/lwip/Kconfig b/components/lwip/Kconfig index bb91e79d38..8065f89108 100644 --- a/components/lwip/Kconfig +++ b/components/lwip/Kconfig @@ -479,6 +479,13 @@ menu "LWIP" help Enable this feature to support TCP window scaling. + config LWIP_TCP_RTO_TIME + int "Default TCP rto time" + default 3000 + help + Set default TCP rto time for a reasonable initial rto. + In bad network environment, recommend set value of rto time to 1500. + endmenu # TCP menu "UDP" diff --git a/components/lwip/lwip b/components/lwip/lwip index 50e4e0d182..64b640ecae 160000 --- a/components/lwip/lwip +++ b/components/lwip/lwip @@ -1 +1 @@ -Subproject commit 50e4e0d1821a6e5deab0ead9f35ffb4e60625ea6 +Subproject commit 64b640ecae5a6ce510814944d75e9ff408d3fc8d diff --git a/components/lwip/port/esp32/include/lwipopts.h b/components/lwip/port/esp32/include/lwipopts.h index 216da48358..a4f2587909 100644 --- a/components/lwip/port/esp32/include/lwipopts.h +++ b/components/lwip/port/esp32/include/lwipopts.h @@ -386,6 +386,12 @@ #define TCP_RCV_SCALE CONFIG_LWIP_TCP_RCV_SCALE #endif +/** + * LWIP_TCP_RTO_TIME: TCP rto time. + * Default is 3 second. + */ +#define LWIP_TCP_RTO_TIME CONFIG_LWIP_TCP_RTO_TIME + /* ---------------------------------- ---------- Pbuf options ----------