From c3ad44189532031015c53a048fe3e7390b8bdb14 Mon Sep 17 00:00:00 2001 From: zwx Date: Wed, 7 Aug 2024 14:49:16 +0800 Subject: [PATCH] feat(lwip): add a config to set the size of ND6 table cache --- components/lwip/Kconfig | 21 +++++++++++++++++++++ components/lwip/port/include/lwipopts.h | 14 ++++++++++++++ 2 files changed, 35 insertions(+) diff --git a/components/lwip/Kconfig b/components/lwip/Kconfig index 56da539f4d..4c88a19594 100644 --- a/components/lwip/Kconfig +++ b/components/lwip/Kconfig @@ -883,6 +883,27 @@ menu "LWIP" default 0x1 if LWIP_TCPIP_TASK_AFFINITY_CPU1 + config LWIP_IPV6_ND6_NUM_PREFIXES + int "Max number of entries in IPv6 on-link prefixes cache" + depends on LWIP_IPV6 + default 5 + help + Maximum number of entries in IPv6 on-link prefixes cache + + config LWIP_IPV6_ND6_NUM_ROUTERS + int "Max number of entries in IPv6 default routers cache" + depends on LWIP_IPV6 + default 3 + help + Maximum number of entries in IPv6 default routers cache + + config LWIP_IPV6_ND6_NUM_DESTINATIONS + int "Max number of entries in IPv6 destinations cache" + depends on LWIP_IPV6 + default 10 + help + Maximum number of entries in IPv6 destinations cache + menuconfig LWIP_PPP_SUPPORT bool "Enable PPP support" default n diff --git a/components/lwip/port/include/lwipopts.h b/components/lwip/port/include/lwipopts.h index db4ef60bcf..a959ba1cc3 100644 --- a/components/lwip/port/include/lwipopts.h +++ b/components/lwip/port/include/lwipopts.h @@ -1297,6 +1297,20 @@ static inline uint32_t timeout_from_offered(uint32_t lease, uint32_t min) */ #define LWIP_ND6_NUM_NEIGHBORS CONFIG_LWIP_IPV6_ND6_NUM_NEIGHBORS +/** + * LWIP_ND6_NUM_PREFIXES: Maximum number of entries in IPv6 on-link prefixes cache + */ +#define LWIP_ND6_NUM_PREFIXES CONFIG_LWIP_IPV6_ND6_NUM_PREFIXES + +/** + * LWIP_ND6_NUM_ROUTERS: Maximum number of entries in IPv6 default routers cache + */ +#define LWIP_ND6_NUM_ROUTERS CONFIG_LWIP_IPV6_ND6_NUM_ROUTERS + +/** + * LWIP_ND6_NUM_DESTINATIONS: Maximum number of entries in IPv6 destinations cache + */ +#define LWIP_ND6_NUM_DESTINATIONS CONFIG_LWIP_IPV6_ND6_NUM_DESTINATIONS /* --------------------------------------- ---------- Hook options ---------------