mirror of
https://github.com/espressif/ESP8266_RTOS_SDK.git
synced 2025-05-30 06:59:02 +08:00
feat(lwip): make tcp fast timer to 125ms and make rto to 250ms
This commit is contained in:
@ -108,8 +108,13 @@ static u16_t tcp_port = TCP_LOCAL_PORT_RANGE_START;
|
|||||||
|
|
||||||
/* Incremented every coarse grained timer shot (typically every 500 ms). */
|
/* Incremented every coarse grained timer shot (typically every 500 ms). */
|
||||||
u32_t tcp_ticks;
|
u32_t tcp_ticks;
|
||||||
|
#if TCP_HIGH_SPEED_RETRANSMISSION
|
||||||
|
static const u8_t tcp_backoff[13] =
|
||||||
|
{ 0, 0, 0, 0, 0, 0, 1, 2, 3, 4, 5, 6, 7};
|
||||||
|
#else
|
||||||
static const u8_t tcp_backoff[13] =
|
static const u8_t tcp_backoff[13] =
|
||||||
{ 1, 2, 3, 4, 5, 6, 7, 7, 7, 7, 7, 7, 7};
|
{ 1, 2, 3, 4, 5, 6, 7, 7, 7, 7, 7, 7, 7};
|
||||||
|
#endif
|
||||||
/* Times per slowtmr hits */
|
/* Times per slowtmr hits */
|
||||||
static const u8_t tcp_persist_backoff[7] = { 3, 6, 12, 24, 48, 96, 120 };
|
static const u8_t tcp_persist_backoff[7] = { 3, 6, 12, 24, 48, 96, 120 };
|
||||||
|
|
||||||
|
@ -114,7 +114,11 @@ err_t tcp_process_refused_data(struct tcp_pcb *pcb);
|
|||||||
#define TCP_SEQ_BETWEEN(a,b,c) (TCP_SEQ_GEQ(a,b) && TCP_SEQ_LEQ(a,c))
|
#define TCP_SEQ_BETWEEN(a,b,c) (TCP_SEQ_GEQ(a,b) && TCP_SEQ_LEQ(a,c))
|
||||||
|
|
||||||
#ifndef TCP_TMR_INTERVAL
|
#ifndef TCP_TMR_INTERVAL
|
||||||
|
#if TCP_HIGH_SPEED_RETRANSMISSION
|
||||||
|
#define TCP_TMR_INTERVAL 125 /* The TCP timer interval in milliseconds. */
|
||||||
|
#else
|
||||||
#define TCP_TMR_INTERVAL 250 /* The TCP timer interval in milliseconds. */
|
#define TCP_TMR_INTERVAL 250 /* The TCP timer interval in milliseconds. */
|
||||||
|
#endif
|
||||||
#endif /* TCP_TMR_INTERVAL */
|
#endif /* TCP_TMR_INTERVAL */
|
||||||
|
|
||||||
#ifndef TCP_FAST_INTERVAL
|
#ifndef TCP_FAST_INTERVAL
|
||||||
|
@ -62,6 +62,7 @@
|
|||||||
|
|
||||||
//#define SOCKETS_TCP_TRACE
|
//#define SOCKETS_TCP_TRACE
|
||||||
|
|
||||||
|
#define TCP_HIGH_SPEED_RETRANSMISSION CONFIG_TCP_HIGH_SPEED_RETRANSMISSION
|
||||||
|
|
||||||
/*
|
/*
|
||||||
------------------------------------
|
------------------------------------
|
||||||
|
Reference in New Issue
Block a user