LwIP fine tuning
This commit is contained in:
parent
62070aa3a9
commit
be766af0fb
2 changed files with 33 additions and 13 deletions
|
@ -70,7 +70,7 @@ typedef size_t mem_ptr_t;
|
|||
#define MEM_ALIGNMENT 4
|
||||
#define ETH_PAD_SIZE 2
|
||||
|
||||
#define LWIP_CHKSUM_ALGORITHM 2
|
||||
#define LWIP_CHKSUM_ALGORITHM 3
|
||||
|
||||
/* prototypes for printf() and abort() */
|
||||
#include <metalsvm/stdio.h>
|
||||
|
|
|
@ -3,6 +3,8 @@
|
|||
#ifndef __LWIPOPTS_H__
|
||||
#define __LWIPOPTS_H_
|
||||
|
||||
#include <metalsvm/stddef.h>
|
||||
|
||||
/**
|
||||
* SYS_LIGHTWEIGHT_PROT==1: if you want inter-task protection for certain
|
||||
* critical regions during buffer allocation, deallocation and memory
|
||||
|
@ -59,10 +61,19 @@
|
|||
*/
|
||||
#define LWIP_TCP 1
|
||||
|
||||
/**
|
||||
* TCP_MSS: TCP Maximum segment size. (default is 536, a conservative default,
|
||||
* you might want to increase this.)
|
||||
* For the receive side, this MSS is advertised to the remote side
|
||||
* when opening a connection. For the transmit size, this MSS sets
|
||||
* an upper limit on the MSS advertised by the remote host.
|
||||
*/
|
||||
#define TCP_MSS 1460
|
||||
|
||||
/**
|
||||
* TCP_SND_BUF: TCP sender buffer space (bytes).
|
||||
*/
|
||||
#define TCP_SND_BUF (16*1024)
|
||||
#define TCP_SND_BUF (16*TCP_WND)
|
||||
|
||||
/**
|
||||
* LWIP_BROADCAST_PING==1: respond to broadcast pings (default is unicast only)
|
||||
|
@ -118,15 +129,6 @@
|
|||
*/
|
||||
#define DEFAULT_THREAD_PRIO NORMAL_PRIO
|
||||
|
||||
/**
|
||||
* TCP_MSS: TCP Maximum segment size. (default is 536, a conservative default,
|
||||
* you might want to increase this.)
|
||||
* For the receive side, this MSS is advertised to the remote side
|
||||
* when opening a connection. For the transmit size, this MSS sets
|
||||
* an upper limit on the MSS advertised by the remote host.
|
||||
*/
|
||||
#define TCP_MSS 2048
|
||||
|
||||
/**
|
||||
* PBUF_POOL_SIZE: the number of buffers in the pbuf pool.
|
||||
*/
|
||||
|
@ -175,7 +177,25 @@
|
|||
* MEMP_NUM_TCP_SEG: the number of simultaneously queued TCP segments.
|
||||
* (requires the LWIP_TCP option)
|
||||
*/
|
||||
#define MEMP_NUM_TCP_SEG 32
|
||||
#define MEMP_NUM_TCP_SEG TCP_SND_QUEUELEN
|
||||
|
||||
// On the SCC, we have not to check incoming messages
|
||||
#ifdef CONFIG_ROCKCREEK
|
||||
/**
|
||||
* CHECKSUM_CHECK_IP==1: Check checksums in software for incoming IP packets.
|
||||
*/
|
||||
#define CHECKSUM_CHECK_IP 0
|
||||
|
||||
/**
|
||||
* CHECKSUM_CHECK_UDP==1: Check checksums in software for incoming UDP packets.
|
||||
*/
|
||||
#define CHECKSUM_CHECK_UDP 0
|
||||
|
||||
/**
|
||||
* CHECKSUM_CHECK_TCP==1: Check checksums in software for incoming TCP packets.
|
||||
*/
|
||||
#define CHECKSUM_CHECK_TCP 0
|
||||
#endif
|
||||
|
||||
/* DEBUG options */
|
||||
#define LWIP_DEBUG 1
|
||||
|
@ -187,7 +207,7 @@
|
|||
#define MEM_DEBUG LWIP_DBG_OFF
|
||||
#define IP_DEBUG LWIP_DBG_OFF
|
||||
#define INET_DEBUG LWIP_DBG_OFF
|
||||
#define NETIF_DEBUG LWIP_DBG_ON
|
||||
#define NETIF_DEBUG LWIP_DBG_OFF
|
||||
#define TIMERS_DEBUG LWIP_DBG_OFF
|
||||
#define SOCKETS_DEBUG LWIP_DBG_OFF
|
||||
#define PBUF_DEBUG LWIP_DBG_OFF
|
||||
|
|
Loading…
Add table
Reference in a new issue