Improve LWIP for Renesas

For speeding up of LWIP in RZ/A1, I added four new config processes in mbed_lib.json and lwipopts.h, overriden those values.
Since RZ/A1 incorporates a large memory, can actualize speeding up by running with the override value.
Also those new config processes will be helpful for more customize.
pull/7683/head
TomoYamanaka 2018-08-03 15:04:43 +09:00
parent 8f7024a226
commit 1334448c16
2 changed files with 41 additions and 0 deletions

View File

@ -139,6 +139,26 @@
#define LWIP_RAM_HEAP_POINTER lwip_ram_heap #define LWIP_RAM_HEAP_POINTER lwip_ram_heap
// Number of simultaneously queued TCP segments.
#ifdef MBED_CONF_LWIP_MEMP_NUM_TCP_SEG
#define MEMP_NUM_TCP_SEG MBED_CONF_LWIP_MEMP_NUM_TCP_SEG
#endif
// TCP Maximum segment size.
#ifdef MBED_CONF_LWIP_TCP_MSS
#define TCP_MSS MBED_CONF_LWIP_TCP_MSS
#endif
// TCP sender buffer space (bytes).
#ifdef MBED_CONF_LWIP_TCP_SND_BUF
#define TCP_SND_BUF MBED_CONF_LWIP_TCP_SND_BUF
#endif
// TCP sender buffer space (bytes).
#ifdef MBED_CONF_LWIP_TCP_WND
#define TCP_WND MBED_CONF_LWIP_TCP_WND
#endif
// Number of pool pbufs. // Number of pool pbufs.
// Each requires 684 bytes of RAM (if MSS=536 and PBUF_POOL_BUFSIZE defaulting to be based on MSS) // Each requires 684 bytes of RAM (if MSS=536 and PBUF_POOL_BUFSIZE defaulting to be based on MSS)
#ifdef MBED_CONF_LWIP_PBUF_POOL_SIZE #ifdef MBED_CONF_LWIP_PBUF_POOL_SIZE

View File

@ -72,6 +72,22 @@
"help": "Maximum number of open UDPSocket instances allowed, including one used internally for DNS. Each requires 84 bytes of pre-allocated RAM", "help": "Maximum number of open UDPSocket instances allowed, including one used internally for DNS. Each requires 84 bytes of pre-allocated RAM",
"value": 4 "value": 4
}, },
"memp-num-tcp-seg": {
"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.",
"value": null
},
"tcp-mss": {
"help": "TCP Maximum segment size. Current default (used if null here) is set to 536 in opt.h, unless overridden by target Ethernet drivers.",
"value": null
},
"tcp-snd-buf": {
"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.",
"value": null
},
"tcp-wnd": {
"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.",
"value": null
},
"pbuf-pool-size": { "pbuf-pool-size": {
"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.", "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.",
"value": null "value": null
@ -132,6 +148,11 @@
"tcpip-thread-stacksize": 1328, "tcpip-thread-stacksize": 1328,
"default-thread-stacksize": 640, "default-thread-stacksize": 640,
"ppp-thread-stacksize": 896, "ppp-thread-stacksize": 896,
"memp-num-tcp-seg": 32,
"tcp-mss": 1460,
"tcp-snd-buf": "(8 * TCP_MSS)",
"tcp-wnd": "(TCP_MSS * 8)",
"pbuf-pool-size": 16,
"mem-size": 51200 "mem-size": 51200
} }
} }