From 78a940a4aa148acc6b84716c94b78fbc73ed88c0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Damian=20Kr=C3=B3lik?= <66667989+Damian-Nordic@users.noreply.github.com> Date: Wed, 17 Aug 2022 18:13:26 +0200 Subject: [PATCH] [system] Increase number of timers to 32 (#21966) The maximum number of timers is set to 32, but most platforms override this value to 16 (well, for platforms that use heap-allocated pools, such as Darwin or Linux, it doesn't matter). The problem is that 16 timers is too little to handle the spec-mandated number of active subscriptions and other scheduled activities. Double the number of timers to pass stress/capacity tests. Signed-off-by: Damian Krolik Signed-off-by: Damian Krolik --- src/platform/Ameba/SystemPlatformConfig.h | 4 ---- src/platform/Beken/SystemPlatformConfig.h | 4 ---- src/platform/Darwin/SystemPlatformConfig.h | 4 ---- src/platform/EFR32/SystemPlatformConfig.h | 4 ---- src/platform/Linux/SystemPlatformConfig.h | 4 ---- src/platform/P6/SystemPlatformConfig.h | 4 ---- src/platform/Tizen/SystemPlatformConfig.h | 4 ---- src/platform/Zephyr/SystemPlatformConfig.h | 4 ---- src/platform/android/SystemPlatformConfig.h | 4 ---- src/platform/bouffalolab/BL602/SystemPlatformConfig.h | 4 ---- src/platform/mbed/SystemPlatformConfig.h | 4 ---- src/platform/nrfconnect/SystemPlatformConfig.h | 4 ---- src/platform/nxp/k32w/k32w0/SystemPlatformConfig.h | 4 ---- src/platform/nxp/mw320/SystemPlatformConfig.h | 4 ---- src/platform/qpg/SystemPlatformConfig.h | 4 ---- src/platform/telink/SystemPlatformConfig.h | 4 ---- src/platform/webos/SystemPlatformConfig.h | 4 ---- src/system/SystemConfig.h | 4 ---- 18 files changed, 72 deletions(-) diff --git a/src/platform/Ameba/SystemPlatformConfig.h b/src/platform/Ameba/SystemPlatformConfig.h index 26ba0379e3d04f..1e8690af84b796 100755 --- a/src/platform/Ameba/SystemPlatformConfig.h +++ b/src/platform/Ameba/SystemPlatformConfig.h @@ -49,10 +49,6 @@ struct ChipDeviceEvent; // NOTE: Values that are mapped to CONFIG_ #defines are settable via the Kconfig mechanism. -#ifndef CHIP_SYSTEM_CONFIG_NUM_TIMERS -#define CHIP_SYSTEM_CONFIG_NUM_TIMERS 16 -#endif // CHIP_SYSTEM_CONFIG_NUM_TIMERS - #define CHIP_SYSTEM_CONFIG_USE_ZEPHYR_NET_IF 0 #define CHIP_SYSTEM_CONFIG_USE_BSD_IFADDRS 0 #define CHIP_SYSTEM_CONFIG_USE_ZEPHYR_SOCKET_EXTENSIONS00 diff --git a/src/platform/Beken/SystemPlatformConfig.h b/src/platform/Beken/SystemPlatformConfig.h index b1f16a18fb0283..a6b38ca79d41da 100755 --- a/src/platform/Beken/SystemPlatformConfig.h +++ b/src/platform/Beken/SystemPlatformConfig.h @@ -50,10 +50,6 @@ struct ChipDeviceEvent; // NOTE: Values that are mapped to CONFIG_ #defines are settable via the Kconfig mechanism. -#ifndef CHIP_SYSTEM_CONFIG_NUM_TIMERS -#define CHIP_SYSTEM_CONFIG_NUM_TIMERS 16 -#endif // CHIP_SYSTEM_CONFIG_NUM_TIMERS - #define CHIP_SYSTEM_CONFIG_USE_ZEPHYR_NET_IF 0 #define CHIP_SYSTEM_CONFIG_USE_BSD_IFADDRS 0 #define CHIP_SYSTEM_CONFIG_USE_ZEPHYR_SOCKET_EXTENSIONS0 0 diff --git a/src/platform/Darwin/SystemPlatformConfig.h b/src/platform/Darwin/SystemPlatformConfig.h index 641f735999f323..48613ba75db9b2 100644 --- a/src/platform/Darwin/SystemPlatformConfig.h +++ b/src/platform/Darwin/SystemPlatformConfig.h @@ -42,7 +42,3 @@ struct ChipDeviceEvent; #define CHIP_SYSTEM_CONFIG_POOL_USE_HEAP 1 // ========== Platform-specific Configuration Overrides ========= - -#ifndef CHIP_SYSTEM_CONFIG_NUM_TIMERS -#define CHIP_SYSTEM_CONFIG_NUM_TIMERS 16 -#endif // CHIP_SYSTEM_CONFIG_NUM_TIMERS diff --git a/src/platform/EFR32/SystemPlatformConfig.h b/src/platform/EFR32/SystemPlatformConfig.h index ab83dbca1b435e..722198fc148d41 100644 --- a/src/platform/EFR32/SystemPlatformConfig.h +++ b/src/platform/EFR32/SystemPlatformConfig.h @@ -39,7 +39,3 @@ struct ChipDeviceEvent; #define CHIP_SYSTEM_CONFIG_PACKETBUFFER_POOL_SIZE 8 // ========== Platform-specific Configuration Overrides ========= - -#ifndef CHIP_SYSTEM_CONFIG_NUM_TIMERS -#define CHIP_SYSTEM_CONFIG_NUM_TIMERS 16 -#endif // CHIP_SYSTEM_CONFIG_NUM_TIMERS diff --git a/src/platform/Linux/SystemPlatformConfig.h b/src/platform/Linux/SystemPlatformConfig.h index 9d4d02f92fc83d..8edc16c1c00307 100644 --- a/src/platform/Linux/SystemPlatformConfig.h +++ b/src/platform/Linux/SystemPlatformConfig.h @@ -41,7 +41,3 @@ struct ChipDeviceEvent; #define CHIP_SYSTEM_CONFIG_POOL_USE_HEAP 1 // ========== Platform-specific Configuration Overrides ========= - -#ifndef CHIP_SYSTEM_CONFIG_NUM_TIMERS -#define CHIP_SYSTEM_CONFIG_NUM_TIMERS 16 -#endif // CHIP_SYSTEM_CONFIG_NUM_TIMERS diff --git a/src/platform/P6/SystemPlatformConfig.h b/src/platform/P6/SystemPlatformConfig.h index dd1672e2a5c87c..11dd5882d11b61 100644 --- a/src/platform/P6/SystemPlatformConfig.h +++ b/src/platform/P6/SystemPlatformConfig.h @@ -49,7 +49,3 @@ struct ChipDeviceEvent; #define CHIP_SYSTEM_LWIP_ERROR_MAX 3000128 // ==================== General Configuration Overrides ==================== - -#ifndef CHIP_SYSTEM_CONFIG_NUM_TIMERS -#define CHIP_SYSTEM_CONFIG_NUM_TIMERS 16 -#endif // CHIP_SYSTEM_CONFIG_NUM_TIMERS diff --git a/src/platform/Tizen/SystemPlatformConfig.h b/src/platform/Tizen/SystemPlatformConfig.h index 80afd51b52e65b..761a1c3a976516 100644 --- a/src/platform/Tizen/SystemPlatformConfig.h +++ b/src/platform/Tizen/SystemPlatformConfig.h @@ -42,7 +42,3 @@ struct ChipDeviceEvent; #define CHIP_SYSTEM_CONFIG_USE_POSIX_TIME_FUNCTS 1 // ========== Platform-specific Configuration Overrides ========= - -#ifndef CHIP_SYSTEM_CONFIG_NUM_TIMERS -#define CHIP_SYSTEM_CONFIG_NUM_TIMERS 16 -#endif // CHIP_SYSTEM_CONFIG_NUM_TIMERS diff --git a/src/platform/Zephyr/SystemPlatformConfig.h b/src/platform/Zephyr/SystemPlatformConfig.h index 6fa52c1728c093..b8e8872a617d93 100644 --- a/src/platform/Zephyr/SystemPlatformConfig.h +++ b/src/platform/Zephyr/SystemPlatformConfig.h @@ -52,7 +52,3 @@ struct ChipDeviceEvent; #define CHIP_SYSTEM_CONFIG_USE_SOCKETS 1 // ========== Platform-specific Configuration Overrides ========= - -#ifndef CHIP_SYSTEM_CONFIG_NUM_TIMERS -#define CHIP_SYSTEM_CONFIG_NUM_TIMERS 16 -#endif // CHIP_SYSTEM_CONFIG_NUM_TIMERS diff --git a/src/platform/android/SystemPlatformConfig.h b/src/platform/android/SystemPlatformConfig.h index a83190fde82dc3..1c601906812edc 100644 --- a/src/platform/android/SystemPlatformConfig.h +++ b/src/platform/android/SystemPlatformConfig.h @@ -42,7 +42,3 @@ struct ChipDeviceEvent; #define CHIP_SYSTEM_CONFIG_USE_POSIX_TIME_FUNCTS 1 // ========== Platform-specific Configuration Overrides ========= - -#ifndef CHIP_SYSTEM_CONFIG_NUM_TIMERS -#define CHIP_SYSTEM_CONFIG_NUM_TIMERS 16 -#endif // CHIP_SYSTEM_CONFIG_NUM_TIMERS diff --git a/src/platform/bouffalolab/BL602/SystemPlatformConfig.h b/src/platform/bouffalolab/BL602/SystemPlatformConfig.h index 3410e99bff1ce4..cf6fbdc4be2240 100644 --- a/src/platform/bouffalolab/BL602/SystemPlatformConfig.h +++ b/src/platform/bouffalolab/BL602/SystemPlatformConfig.h @@ -47,7 +47,3 @@ struct ChipDeviceEvent; #define CHIP_SYSTEM_LWIP_ERROR_MAX 3000128 // ========== Platform-specific Configuration Overrides ========= - -#ifndef CHIP_SYSTEM_CONFIG_NUM_TIMERS -#define CHIP_SYSTEM_CONFIG_NUM_TIMERS 16 -#endif // CHIP_SYSTEM_CONFIG_NUM_TIMERS diff --git a/src/platform/mbed/SystemPlatformConfig.h b/src/platform/mbed/SystemPlatformConfig.h index 9d4a520f7cf07c..05ee9ef143220b 100644 --- a/src/platform/mbed/SystemPlatformConfig.h +++ b/src/platform/mbed/SystemPlatformConfig.h @@ -43,7 +43,3 @@ struct ChipDeviceEvent; #define CHIP_SYSTEM_CONFIG_EVENT_OBJECT_TYPE const struct ::chip::DeviceLayer::ChipDeviceEvent * // ========== Platform-specific Configuration Overrides ========= - -#ifndef CHIP_SYSTEM_CONFIG_NUM_TIMERS -#define CHIP_SYSTEM_CONFIG_NUM_TIMERS 16 -#endif // CHIP_SYSTEM_CONFIG_NUM_TIMERS diff --git a/src/platform/nrfconnect/SystemPlatformConfig.h b/src/platform/nrfconnect/SystemPlatformConfig.h index ec4ba9e2f1ea90..803005c4df4531 100644 --- a/src/platform/nrfconnect/SystemPlatformConfig.h +++ b/src/platform/nrfconnect/SystemPlatformConfig.h @@ -52,7 +52,3 @@ struct ChipDeviceEvent; #define CHIP_SYSTEM_CONFIG_USE_SOCKETS 1 // ========== Platform-specific Configuration Overrides ========= - -#ifndef CHIP_SYSTEM_CONFIG_NUM_TIMERS -#define CHIP_SYSTEM_CONFIG_NUM_TIMERS 16 -#endif // CHIP_SYSTEM_CONFIG_NUM_TIMERS diff --git a/src/platform/nxp/k32w/k32w0/SystemPlatformConfig.h b/src/platform/nxp/k32w/k32w0/SystemPlatformConfig.h index f7514dcb68bec9..084b759158d5f0 100644 --- a/src/platform/nxp/k32w/k32w0/SystemPlatformConfig.h +++ b/src/platform/nxp/k32w/k32w0/SystemPlatformConfig.h @@ -40,7 +40,3 @@ struct ChipDeviceEvent; #define CHIP_SYSTEM_CONFIG_PACKETBUFFER_POOL_SIZE 7 // ========== Platform-specific Configuration Overrides ========= - -#ifndef CHIP_SYSTEM_CONFIG_NUM_TIMERS -#define CHIP_SYSTEM_CONFIG_NUM_TIMERS 16 -#endif // CHIP_SYSTEM_CONFIG_NUM_TIMERS diff --git a/src/platform/nxp/mw320/SystemPlatformConfig.h b/src/platform/nxp/mw320/SystemPlatformConfig.h index 408c3d36e17296..1f05e9bc688aae 100644 --- a/src/platform/nxp/mw320/SystemPlatformConfig.h +++ b/src/platform/nxp/mw320/SystemPlatformConfig.h @@ -58,7 +58,3 @@ struct ChipDeviceEvent; #define CHIP_SYSTEM_LWIP_ERROR_MAX 3000128 // ========== Platform-specific Configuration Overrides ========= - -#ifndef CHIP_SYSTEM_CONFIG_NUM_TIMERS -#define CHIP_SYSTEM_CONFIG_NUM_TIMERS 16 -#endif // CHIP_SYSTEM_CONFIG_NUM_TIMERS diff --git a/src/platform/qpg/SystemPlatformConfig.h b/src/platform/qpg/SystemPlatformConfig.h index 70f20518c77909..78d4757355226c 100644 --- a/src/platform/qpg/SystemPlatformConfig.h +++ b/src/platform/qpg/SystemPlatformConfig.h @@ -37,7 +37,3 @@ struct ChipDeviceEvent; #define CHIP_SYSTEM_CONFIG_EVENT_OBJECT_TYPE const struct ::chip::DeviceLayer::ChipDeviceEvent * // ========== Platform-specific Configuration Overrides ========= - -#ifndef CHIP_SYSTEM_CONFIG_NUM_TIMERS -#define CHIP_SYSTEM_CONFIG_NUM_TIMERS 16 -#endif // CHIP_SYSTEM_CONFIG_NUM_TIMERS diff --git a/src/platform/telink/SystemPlatformConfig.h b/src/platform/telink/SystemPlatformConfig.h index f81b07573b378d..5e3fce6a5b0023 100644 --- a/src/platform/telink/SystemPlatformConfig.h +++ b/src/platform/telink/SystemPlatformConfig.h @@ -52,7 +52,3 @@ struct ChipDeviceEvent; #define CHIP_SYSTEM_CONFIG_USE_SOCKETS 1 // ========== Platform-specific Configuration Overrides ========= - -#ifndef CHIP_SYSTEM_CONFIG_NUM_TIMERS -#define CHIP_SYSTEM_CONFIG_NUM_TIMERS 16 -#endif // CHIP_SYSTEM_CONFIG_NUM_TIMERS diff --git a/src/platform/webos/SystemPlatformConfig.h b/src/platform/webos/SystemPlatformConfig.h index f225657f9f0a21..3ceb8a5d621fbd 100644 --- a/src/platform/webos/SystemPlatformConfig.h +++ b/src/platform/webos/SystemPlatformConfig.h @@ -41,7 +41,3 @@ struct ChipDeviceEvent; #define CHIP_SYSTEM_CONFIG_POOL_USE_HEAP 1 // ========== Platform-specific Configuration Overrides ========= - -#ifndef CHIP_SYSTEM_CONFIG_NUM_TIMERS -#define CHIP_SYSTEM_CONFIG_NUM_TIMERS 16 -#endif // CHIP_SYSTEM_CONFIG_NUM_TIMERS diff --git a/src/system/SystemConfig.h b/src/system/SystemConfig.h index b32c9bf1dec1a6..87171af3352059 100644 --- a/src/system/SystemConfig.h +++ b/src/system/SystemConfig.h @@ -159,10 +159,6 @@ #define CHIP_SYSTEM_CONFIG_PACKETBUFFER_POOL_SIZE INET_CONFIG_NUM_BUFS #endif // !defined(CHIP_SYSTEM_CONFIG_PACKETBUFFER_POOL_SIZE) && defined(INET_CONFIG_NUM_BUFS) -#if !defined(CHIP_SYSTEM_CONFIG_NUM_TIMERS) && defined(INET_CONFIG_NUM_TIMERS) -#define CHIP_SYSTEM_CONFIG_NUM_TIMERS INET_CONFIG_NUM_TIMERS -#endif // !defined(CHIP_SYSTEM_CONFIG_NUM_TIMERS) && defined(INET_CONFIG_NUM_TIMERS) - #endif // CHIP_SYSTEM_CONFIG_TRANSFER_INETLAYER_PROJECT_CONFIGURATION #if CHIP_SYSTEM_CONFIG_USE_LWIP