Skip to content

Commit 0edce1d

Browse files
author
Cruz Monrreal
authored
Merge pull request #7683 from TomoYamanaka/Improve_LWIP
Renesas : Improve LWIP speed
2 parents e7b3c0d + e080561 commit 0edce1d

File tree

2 files changed

+41
-0
lines changed

2 files changed

+41
-0
lines changed

features/lwipstack/lwipopts.h

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,26 @@
139139

140140
#define LWIP_RAM_HEAP_POINTER lwip_ram_heap
141141

142+
// Number of simultaneously queued TCP segments.
143+
#ifdef MBED_CONF_LWIP_MEMP_NUM_TCP_SEG
144+
#define MEMP_NUM_TCP_SEG MBED_CONF_LWIP_MEMP_NUM_TCP_SEG
145+
#endif
146+
147+
// TCP Maximum segment size.
148+
#ifdef MBED_CONF_LWIP_TCP_MSS
149+
#define TCP_MSS MBED_CONF_LWIP_TCP_MSS
150+
#endif
151+
152+
// TCP sender buffer space (bytes).
153+
#ifdef MBED_CONF_LWIP_TCP_SND_BUF
154+
#define TCP_SND_BUF MBED_CONF_LWIP_TCP_SND_BUF
155+
#endif
156+
157+
// TCP sender buffer space (bytes).
158+
#ifdef MBED_CONF_LWIP_TCP_WND
159+
#define TCP_WND MBED_CONF_LWIP_TCP_WND
160+
#endif
161+
142162
// Number of pool pbufs.
143163
// Each requires 684 bytes of RAM (if MSS=536 and PBUF_POOL_BUFSIZE defaulting to be based on MSS)
144164
#ifdef MBED_CONF_LWIP_PBUF_POOL_SIZE

features/lwipstack/mbed_lib.json

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,22 @@
7272
"help": "Maximum number of open UDPSocket instances allowed, including one used internally for DNS. Each requires 84 bytes of pre-allocated RAM",
7373
"value": 4
7474
},
75+
"memp-num-tcp-seg": {
76+
"help": "Number of simultaneously queued TCP segments. Current default (used if null here) is set to 16 in opt.h, unless overridden by target Ethernet drivers.",
77+
"value": null
78+
},
79+
"tcp-mss": {
80+
"help": "TCP Maximum segment size. Current default (used if null here) is set to 536 in opt.h, unless overridden by target Ethernet drivers.",
81+
"value": null
82+
},
83+
"tcp-snd-buf": {
84+
"help": "TCP sender buffer space (bytes). Current default (used if null here) is set to (2 * TCP_MSS) in opt.h, unless overridden by target Ethernet drivers.",
85+
"value": null
86+
},
87+
"tcp-wnd": {
88+
"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.",
89+
"value": null
90+
},
7591
"pbuf-pool-size": {
7692
"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.",
7793
"value": null
@@ -132,6 +148,11 @@
132148
"tcpip-thread-stacksize": 1328,
133149
"default-thread-stacksize": 640,
134150
"ppp-thread-stacksize": 896,
151+
"memp-num-tcp-seg": 32,
152+
"tcp-mss": 1440,
153+
"tcp-snd-buf": "(8 * TCP_MSS)",
154+
"tcp-wnd": "(TCP_MSS * 8)",
155+
"pbuf-pool-size": 16,
135156
"mem-size": 51200
136157
}
137158
}

0 commit comments

Comments
 (0)