fine tuning to optimize LwIP

This commit is contained in:
Stefan Lankes 2011-09-01 21:33:40 +02:00
parent 38d0451b0d
commit 497856d5d9

View file

@ -62,7 +62,7 @@
/**
* TCP_SND_BUF: TCP sender buffer space (bytes).
*/
#define TCP_SND_BUF 2048
#define TCP_SND_BUF (16*1024)
/**
* LWIP_BROADCAST_PING==1: respond to broadcast pings (default is unicast only)
@ -118,15 +118,68 @@
*/
#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.
*/
#define PBUF_POOL_SIZE 0x80
/**
* MEMP_NUM_UDP_PCB: the number of UDP protocol control blocks. One
* per active UDP "connection".
* (requires the LWIP_UDP option)
*/
#define MEMP_NUM_UDP_PCB 0x30
/**
* MEMP_NUM_TCP_PCB: the number of simulatenously active TCP connections.
* (requires the LWIP_TCP option)
*/
#define MEMP_NUM_TCP_PCB 0x30
/**
* MEMP_NUM_TCP_PCB_LISTEN: the number of listening TCP connections.
* (requires the LWIP_TCP option)
*/
#define MEMP_NUM_TCP_PCB_LISTEN 0x30
/**
* MEM_SIZE: the size of the heap memory. If the application will send
* a lot of data that needs to be copied, this should be set high.
*/
#define MEM_SIZE (4*0x100000)
/**
* MEMP_NUM_TCPIP_MSG_API: the number of struct tcpip_msg, which are used
* for callback/timeout API communication.
* (only needed if you use tcpip.c)
*/
#define MEMP_NUM_TCPIP_MSG_API 0x40
/**
* MEMP_NUM_TCPIP_MSG_INPKT: the number of struct tcpip_msg, which are used
* for incoming packets.
* (only needed if you use tcpip.c)
*/
#define MEMP_NUM_TCPIP_MSG_INPKT 0x40
/* DEBUG options */
#define LWIP_DEBUG 1
#define DHCP_DEBUG LWIP_DBG_OFF
#define ETHARP_DEBUG LWIP_DBG_OFF
#define TCPIP_DEBUG LWIP_DBG_OFF
#define SYS_DEBUG LWIP_DBG_OFF
#define SYS_DEBUG LWIP_DBG_ON
#define RAW_DEBUG LWIP_DBG_OFF
#define MEM_DEBUG LWIP_DBG_OFF
#define IP_DEBUG LWIP_DBG_OFF
#define IP_DEBUG LWIP_DBG_ON
#define INET_DEBUG LWIP_DBG_OFF
#define NETIF_DEBUG LWIP_DBG_ON
#define TIMERS_DEBUG LWIP_DBG_OFF