Clarify LWIP_NUM_SYS_TIMEOUT_INTERNAL regarding PPP and make the number of required timeouts per ppp_pcb configurable as we don't really know it right now ;-)

This commit is contained in:
goldsimon 2017-07-27 20:50:40 +02:00
parent 45fb7d7220
commit a6432c46aa
2 changed files with 13 additions and 2 deletions

View File

@ -461,7 +461,7 @@
* The number of sys timeouts used by the core stack (not apps)
* The default number of timeouts is calculated here for all enabled modules.
*/
#define LWIP_NUM_SYS_TIMEOUT_INTERNAL (LWIP_TCP + IP_REASSEMBLY + LWIP_ARP + (2*LWIP_DHCP) + LWIP_AUTOIP + LWIP_IGMP + LWIP_DNS + (PPP_SUPPORT*6*MEMP_NUM_PPP_PCB) + (LWIP_IPV6 ? (1 + LWIP_IPV6_REASS + LWIP_IPV6_MLD) : 0))
#define LWIP_NUM_SYS_TIMEOUT_INTERNAL (LWIP_TCP + IP_REASSEMBLY + LWIP_ARP + (2*LWIP_DHCP) + LWIP_AUTOIP + LWIP_IGMP + LWIP_DNS + PPP_NUM_TIMEOUTS + (LWIP_IPV6 * (1 + LWIP_IPV6_REASS + LWIP_IPV6_MLD)))
/**
* MEMP_NUM_SYS_TIMEOUT: the number of simultaneously active timeouts.

View File

@ -80,6 +80,17 @@
#define MEMP_NUM_PPP_PCB 1
#endif
/**
* PPP_NUM_TIMEOUTS_PER_PCB: the number of sys_timeouts running in parallel per
* ppp_pcb. This is a conservative default which needs to be checked...
*/
#ifndef PPP_NUM_TIMEOUTS_PER_PCB
#define PPP_NUM_TIMEOUTS_PER_PCB 6
#endif
/* The number of sys_timeouts required for the PPP module */
#define PPP_NUM_TIMEOUTS (PPP_SUPPORT * PPP_NUM_TIMEOUTS_PER_PCB * MEMP_NUM_PPP_PCB)
#if PPP_SUPPORT
/**