Commit 9d5d2e8c authored by iabdalkader's avatar iabdalkader Committed by Damien George

renesas-ra: Tune lwip buffers and timing to improve network performance.

Signed-off-by: default avatariabdalkader <i.abdalkader@gmail.com>
parent 5c809900
......@@ -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
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment