From 3c8235d40df124382cce8f8fade81ccd4a0706f0 Mon Sep 17 00:00:00 2001 From: Wu Jian Gang Date: Tue, 17 Jan 2017 17:44:25 +0800 Subject: [PATCH] lwip: Allow config TCP_MAXRTX & TCP_SYNMAXRTX in menuconfig --- components/lwip/Kconfig | 32 ++++++++++++++------ components/lwip/include/lwip/port/lwipopts.h | 4 +-- 2 files changed, 25 insertions(+), 11 deletions(-) diff --git a/components/lwip/Kconfig b/components/lwip/Kconfig index 760e035c8c..f7bae32581 100644 --- a/components/lwip/Kconfig +++ b/components/lwip/Kconfig @@ -47,27 +47,41 @@ config LWIP_SO_RCVBUF Enabling this option allows checking for available data on a netconn. config LWIP_DHCP_MAX_NTP_SERVERS - int "Maximum number of NTP servers" - default 1 - range 1 16 - help - Set maxumum number of NTP servers used by LwIP SNTP module. - First argument of sntp_setserver/sntp_setservername functions - is limited to this value. + int "Maximum number of NTP servers" + default 1 + range 1 16 + help + Set maximum number of NTP servers used by LwIP SNTP module. + First argument of sntp_setserver/sntp_setservername functions + is limited to this value. config LWIP_IP_FRAG bool "Enable fragment outgoing IP packets" default 0 - help + help Enabling this option allows fragmenting outgoing IP packets if their size exceeds MTU. config LWIP_IP_REASSEMBLY bool "Enable reassembly incoming fragmented IP packets" default 0 - help + help Enabling this option allows reassemblying incoming fragmented IP packets. +config TCP_MAXRTX + int "Maximum number of retransmissions of data segments" + default 12 + range 3 12 + help + Set maximum number of retransmissions of data segments. + +config TCP_SYNMAXRTX + int "Maximum number of retransmissions of SYN segments" + default 6 + range 3 12 + help + Set maximum number of retransmissions of SYN segments. + endmenu diff --git a/components/lwip/include/lwip/port/lwipopts.h b/components/lwip/include/lwip/port/lwipopts.h index 6d1dfbd497..638c1f7404 100644 --- a/components/lwip/include/lwip/port/lwipopts.h +++ b/components/lwip/include/lwip/port/lwipopts.h @@ -288,12 +288,12 @@ /** * TCP_MAXRTX: Maximum number of retransmissions of data segments. */ -#define TCP_MAXRTX 12 //(*(volatile uint32*)0x600011E8) +#define TCP_MAXRTX CONFIG_TCP_MAXRTX /** * TCP_SYNMAXRTX: Maximum number of retransmissions of SYN segments. */ -#define TCP_SYNMAXRTX 6 //(*(volatile uint32*)0x600011E4) +#define TCP_SYNMAXRTX CONFIG_TCP_SYNMAXRTX /** * TCP_LISTEN_BACKLOG: Enable the backlog option for tcp listen pcb. -- 2.40.0