mirror of
https://github.com/espressif/ESP8266_RTOS_SDK.git
synced 2025-12-11 23:57:08 +08:00
feat(lwip): Add kconfig to congigure initial RTO time and set default value to 1000
This commit is contained in:
@@ -479,6 +479,13 @@ config LWIP_TCP_TIMESTAMPS
|
||||
really used locally. Therefore, it is only enabled when a TS option is
|
||||
received in the initial SYN packet from a remote host.
|
||||
|
||||
config LWIP_TCP_RTO_TIME
|
||||
int "Default TCP RTO TIME"
|
||||
default 1000
|
||||
help
|
||||
Set default TCP RTO time for a reasonable initial RTO.
|
||||
Advise to set initial RTO to 1 second
|
||||
|
||||
endmenu # TCP
|
||||
|
||||
menu "UDP"
|
||||
|
||||
@@ -1630,8 +1630,9 @@ tcp_alloc(u8_t prio)
|
||||
/* As initial send MSS, we use TCP_MSS but limit it to 536.
|
||||
The send MSS is updated when an MSS option is received. */
|
||||
pcb->mss = INITIAL_MSS;
|
||||
pcb->rto = 3000 / TCP_SLOW_INTERVAL;
|
||||
pcb->sv = 3000 / TCP_SLOW_INTERVAL;
|
||||
/* make TCP's retransmission time to be configurable */
|
||||
pcb->rto = LWIP_TCP_RTO_TIME / TCP_SLOW_INTERVAL;
|
||||
pcb->sv = LWIP_TCP_RTO_TIME / TCP_SLOW_INTERVAL;
|
||||
pcb->rtime = -1;
|
||||
pcb->cwnd = 1;
|
||||
pcb->tmr = tcp_ticks;
|
||||
|
||||
@@ -1350,6 +1350,11 @@
|
||||
#define LWIP_WND_SCALE 0
|
||||
#define TCP_RCV_SCALE 0
|
||||
#endif
|
||||
|
||||
#if !defined LWIP_TCP_RTO_TIME || defined __DOXYGEN__
|
||||
#define LWIP_TCP_RTO_TIME 3000
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
||||
@@ -1097,6 +1097,12 @@ size_t memp_malloc_get_size(size_t type);
|
||||
*/
|
||||
#define LWIP_WND_SCALE 0
|
||||
#define TCP_RCV_SCALE 0
|
||||
|
||||
/**
|
||||
* LWIP_TCP_RTO_TIME: make TCP RTO time configurable.
|
||||
* Default is 1 second.
|
||||
*/
|
||||
#define LWIP_TCP_RTO_TIME CONFIG_LWIP_TCP_RTO_TIME
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user