From ae675973beacdb250900c066510d3bac806c6f02 Mon Sep 17 00:00:00 2001 From: Sachin Parekh Date: Mon, 15 Apr 2019 15:20:37 +0530 Subject: [PATCH] optimize: IGMP and MLD6 timers on demand config added Signed-off-by: Sachin Parekh --- components/lwip/Kconfig | 10 ++++++++++ components/lwip/lwip | 2 +- components/lwip/port/esp32/include/lwipopts.h | 8 ++++++++ 3 files changed, 19 insertions(+), 1 deletion(-) diff --git a/components/lwip/Kconfig b/components/lwip/Kconfig index 6ccbdc113..6fa8a507e 100644 --- a/components/lwip/Kconfig +++ b/components/lwip/Kconfig @@ -27,6 +27,16 @@ menu "LWIP" If this feature is disabled, all lwip functions will be put into FLASH. + config LWIP_TIMERS_ONDEMAND + bool "Enable LWIP Timers on demand" + default y + help + If this feature is enabled, IGMP and MLD6 timers will be activated only + when joining groups or receiving QUERY packets. + + This feature will reduce the power consumption for applications which do not + use IGMP and MLD6. + config LWIP_MAX_SOCKETS int "Max number of open sockets" range 1 16 diff --git a/components/lwip/lwip b/components/lwip/lwip index fe9a58cb7..88ccba0cc 160000 --- a/components/lwip/lwip +++ b/components/lwip/lwip @@ -1 +1 @@ -Subproject commit fe9a58cb7abdc74e7a2196b7c4e0a29ff9042f88 +Subproject commit 88ccba0ccfc11cd968b80a9d50b3182972da9604 diff --git a/components/lwip/port/esp32/include/lwipopts.h b/components/lwip/port/esp32/include/lwipopts.h index 6f3f279e0..fd6e1262f 100644 --- a/components/lwip/port/esp32/include/lwipopts.h +++ b/components/lwip/port/esp32/include/lwipopts.h @@ -779,6 +779,14 @@ #endif #define ESP_IRAM_ATTR +#ifdef CONFIG_LWIP_TIMERS_ONDEMAND +#define ESP_LWIP_IGMP_TIMERS_ONDEMAND 1 +#define ESP_LWIP_MLD6_TIMERS_ONDEMAND 1 +#else +#define ESP_LWIP_IGMP_TIMERS_ONDEMAND 0 +#define ESP_LWIP_MLD6_TIMERS_ONDEMAND 0 +#endif + #if ESP_PERF #define DBG_PERF_PATH_SET(dir, point) #define DBG_PERF_FILTER_LEN 1000