Skip to content

Commit

Permalink
[system] Increase number of timers to 32 (#21966)
Browse files Browse the repository at this point in the history
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 <[email protected]>

Signed-off-by: Damian Krolik <[email protected]>
  • Loading branch information
Damian-Nordic authored and pull[bot] committed Sep 19, 2023
1 parent fefc08d commit 78a940a
Show file tree
Hide file tree
Showing 18 changed files with 0 additions and 72 deletions.
4 changes: 0 additions & 4 deletions src/platform/Ameba/SystemPlatformConfig.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 0 additions & 4 deletions src/platform/Beken/SystemPlatformConfig.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 0 additions & 4 deletions src/platform/Darwin/SystemPlatformConfig.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
4 changes: 0 additions & 4 deletions src/platform/EFR32/SystemPlatformConfig.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
4 changes: 0 additions & 4 deletions src/platform/Linux/SystemPlatformConfig.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
4 changes: 0 additions & 4 deletions src/platform/P6/SystemPlatformConfig.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
4 changes: 0 additions & 4 deletions src/platform/Tizen/SystemPlatformConfig.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
4 changes: 0 additions & 4 deletions src/platform/Zephyr/SystemPlatformConfig.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
4 changes: 0 additions & 4 deletions src/platform/android/SystemPlatformConfig.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
4 changes: 0 additions & 4 deletions src/platform/bouffalolab/BL602/SystemPlatformConfig.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
4 changes: 0 additions & 4 deletions src/platform/mbed/SystemPlatformConfig.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
4 changes: 0 additions & 4 deletions src/platform/nrfconnect/SystemPlatformConfig.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
4 changes: 0 additions & 4 deletions src/platform/nxp/k32w/k32w0/SystemPlatformConfig.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
4 changes: 0 additions & 4 deletions src/platform/nxp/mw320/SystemPlatformConfig.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
4 changes: 0 additions & 4 deletions src/platform/qpg/SystemPlatformConfig.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
4 changes: 0 additions & 4 deletions src/platform/telink/SystemPlatformConfig.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
4 changes: 0 additions & 4 deletions src/platform/webos/SystemPlatformConfig.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
4 changes: 0 additions & 4 deletions src/system/SystemConfig.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 78a940a

Please sign in to comment.