diff --git a/components/net/Kconfig b/components/net/Kconfig index 3220d5e7860965cc1c626ece49362a1503212cbc..f86e7416eb03197c543f262676afe80968979d3d 100644 --- a/components/net/Kconfig +++ b/components/net/Kconfig @@ -98,6 +98,10 @@ config RT_USING_LWIP config RT_LWIP_PPPOS bool "PPPoS protocol" default n + + config RT_MEMP_NUM_NETCONN + int "the number of struct netconns" + default 8 config RT_LWIP_PBUF_NUM int "the number of PBUF" diff --git a/components/net/lwip-1.4.1/src/lwipopts.h b/components/net/lwip-1.4.1/src/lwipopts.h index 0b177b589473ece57095d7a696f67f6c84172b6b..8b4d38961eaf3db6baf6cbafb377eb352c95ac8f 100644 --- a/components/net/lwip-1.4.1/src/lwipopts.h +++ b/components/net/lwip-1.4.1/src/lwipopts.h @@ -93,6 +93,11 @@ should be set high. */ #define MEMP_NUM_PBUF 16 +/* the number of struct netconns */ +#ifdef RT_MEMP_NUM_NETCONN +#define MEMP_NUM_NETCONN RT_MEMP_NUM_NETCONN +#endif + /* the number of UDP protocol control blocks. One per active RAW "connection". */ #ifdef RT_LWIP_RAW_PCB_NUM #define MEMP_NUM_RAW_PCB RT_LWIP_RAW_PCB_NUM diff --git a/components/net/lwip-2.0.2/src/lwipopts.h b/components/net/lwip-2.0.2/src/lwipopts.h index 76e3a0f948da502203ec9042789cabf42be13098..988b9668dbd491fb8b4feacf7f028a46e20389e2 100644 --- a/components/net/lwip-2.0.2/src/lwipopts.h +++ b/components/net/lwip-2.0.2/src/lwipopts.h @@ -105,6 +105,11 @@ should be set high. */ #define MEMP_NUM_PBUF 32 //16 +/* the number of struct netconns */ +#ifdef RT_MEMP_NUM_NETCONN +#define MEMP_NUM_NETCONN RT_MEMP_NUM_NETCONN +#endif + /* the number of UDP protocol control blocks. One per active RAW "connection". */ #ifdef RT_LWIP_RAW_PCB_NUM #define MEMP_NUM_RAW_PCB RT_LWIP_RAW_PCB_NUM