Skip to content

Commit f3bbd2b

Browse files
author
Seppo Takalo
committed
Allow LwIP TCP retransmissions to be configured and tune those smaller.
Currently, LwIP segment retransmission time is 12, which is very long time as each timeout doubles the retransmission timeout. Make that to 6 as that is same what we use in Nanostack.
1 parent 50eb243 commit f3bbd2b

File tree

2 files changed

+17
-1
lines changed

2 files changed

+17
-1
lines changed

features/lwipstack/lwipopts.h

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -159,6 +159,14 @@
159159
#define TCP_WND MBED_CONF_LWIP_TCP_WND
160160
#endif
161161

162+
#ifdef MBED_CONF_LWIP_TCP_MAXRTX
163+
#define TCP_MAXRTX MBED_CONF_LWIP_TCP_MAXRTX
164+
#endif
165+
166+
#ifdef MBED_CONF_LWIP_TCP_SYNMAXRTX
167+
#define TCP_SYNMAXRTX MBED_CONF_LWIP_TCP_SYNMAXRTX
168+
#endif
169+
162170
// Number of pool pbufs.
163171
// Each requires 684 bytes of RAM (if MSS=536 and PBUF_POOL_BUFSIZE defaulting to be based on MSS)
164172
#ifdef MBED_CONF_LWIP_PBUF_POOL_SIZE

features/lwipstack/mbed_lib.json

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,14 @@
8888
"help": "TCP sender buffer space (bytes). Current default (used if null here) is set to (4 * TCP_MSS) in opt.h, unless overridden by target Ethernet drivers.",
8989
"value": null
9090
},
91+
"tcp-maxrtx": {
92+
"help": "Maximum number of retransmissions of data segments.",
93+
"value": 6
94+
},
95+
"tcp-synmaxrtx": {
96+
"help": "Maximum number of retransmissions of SYN segments. Current default (used if null here) is set to 6 in opt.h",
97+
"value": null
98+
},
9199
"pbuf-pool-size": {
92100
"help": "Number of pbufs in pool - usually used for received packets, so this determines how much data can be buffered between reception and the application reading. If a driver uses PBUF_RAM for reception, less pool may be needed. Current default (used if null here) is set to 5 in lwipopts.h, unless overridden by target Ethernet drivers.",
93101
"value": null
@@ -125,7 +133,7 @@
125133
"mem-size": 25600
126134
},
127135
"Freescale": {
128-
"mem-size": 36560
136+
"mem-size": 16384
129137
},
130138
"LPC1768": {
131139
"mem-size": 16362

0 commit comments

Comments
 (0)