renesas-ra: Tune lwip buffers and timing to improve network performance.
Signed-off-by: iabdalkader <i.abdalkader@gmail.com>
This commit is contained in:
parent
5c8099003c
commit
9d5d2e8cf7
@ -42,12 +42,14 @@
|
||||
extern uint32_t rng_read(void);
|
||||
#define LWIP_RAND() rng_read()
|
||||
|
||||
// lwip takes 26700 bytes
|
||||
#define MEM_SIZE (8000)
|
||||
#define TCP_MSS (800)
|
||||
#define TCP_WND (8 * TCP_MSS)
|
||||
#define TCP_SND_BUF (8 * TCP_MSS)
|
||||
#define MEMP_NUM_TCP_SEG (32)
|
||||
#define MEM_SIZE (16 * 1024)
|
||||
#define TCP_MSS (1460)
|
||||
#define TCP_OVERSIZE (TCP_MSS)
|
||||
#define TCP_WND (8 * TCP_MSS)
|
||||
#define TCP_SND_BUF (8 * TCP_MSS)
|
||||
#define TCP_SND_QUEUELEN (2 * (TCP_SND_BUF / TCP_MSS))
|
||||
#define TCP_QUEUE_OOSEQ (1)
|
||||
#define MEMP_NUM_TCP_SEG (2 * TCP_SND_QUEUELEN)
|
||||
|
||||
typedef uint32_t sys_prot_t;
|
||||
|
||||
|
@ -67,8 +67,8 @@ void mod_network_lwip_init(void) {
|
||||
timer_started = false;
|
||||
}
|
||||
// Start poll timer.
|
||||
soft_timer_static_init(&network_timer, SOFT_TIMER_MODE_PERIODIC, 128, network_timer_callback);
|
||||
soft_timer_reinsert(&network_timer, 128);
|
||||
soft_timer_static_init(&network_timer, SOFT_TIMER_MODE_PERIODIC, 50, network_timer_callback);
|
||||
soft_timer_reinsert(&network_timer, 50);
|
||||
timer_started = true;
|
||||
}
|
||||
#endif // MICROPY_PY_LWIP
|
||||
|
Loading…
Reference in New Issue
Block a user