diff --git a/src/lib/core/CHIPConfig.h b/src/lib/core/CHIPConfig.h index a9b1e5739e5a59..66ea165e61979f 100644 --- a/src/lib/core/CHIPConfig.h +++ b/src/lib/core/CHIPConfig.h @@ -667,28 +667,6 @@ #define CHIP_CONFIG_UNAUTHENTICATED_CONNECTION_POOL_SIZE 4 #endif // CHIP_CONFIG_UNAUTHENTICATED_CONNECTION_POOL_SIZE -/** - * @def CHIP_CONFIG_SECURE_SESSION_POOL_SIZE - * - * @brief Defines the size of the pool used for tracking the state of - * secure sessions. This controls the maximum number of concurrent - * established secure sessions across all supported transports. - * - * This is sized by default to cover the sum of the following: - * - At least 3 CASE sessions / fabric (Spec Ref: 4.13.2.8) - * - 1 reserved slot for CASEServer as a responder. - * - 1 reserved slot for PASE. - * - * NOTE: On heap-based platforms, there is no pre-allocation of the pool. - * Due to the use of an LRU-scheme to manage sessions, the actual active - * size of the pool will grow up to the value of this define, - * after which, it will remain at or around this size indefinitely. - * - */ -#ifndef CHIP_CONFIG_SECURE_SESSION_POOL_SIZE -#define CHIP_CONFIG_SECURE_SESSION_POOL_SIZE (CHIP_CONFIG_MAX_FABRICS * 3 + 2) -#endif // CHIP_CONFIG_SECURE_SESSION_POOL_SIZE - /** * @def CHIP_CONFIG_SECURE_SESSION_REFCOUNT_LOGGING * @@ -712,6 +690,28 @@ #define CHIP_CONFIG_MAX_FABRICS 16 #endif // CHIP_CONFIG_MAX_FABRICS +/** + * @def CHIP_CONFIG_SECURE_SESSION_POOL_SIZE + * + * @brief Defines the size of the pool used for tracking the state of + * secure sessions. This controls the maximum number of concurrent + * established secure sessions across all supported transports. + * + * This is sized by default to cover the sum of the following: + * - At least 3 CASE sessions / fabric (Spec Ref: 4.13.2.8) + * - 1 reserved slot for CASEServer as a responder. + * - 1 reserved slot for PASE. + * + * NOTE: On heap-based platforms, there is no pre-allocation of the pool. + * Due to the use of an LRU-scheme to manage sessions, the actual active + * size of the pool will grow up to the value of this define, + * after which, it will remain at or around this size indefinitely. + * + */ +#ifndef CHIP_CONFIG_SECURE_SESSION_POOL_SIZE +#define CHIP_CONFIG_SECURE_SESSION_POOL_SIZE (CHIP_CONFIG_MAX_FABRICS * 3 + 2) +#endif // CHIP_CONFIG_SECURE_SESSION_POOL_SIZE + /** * @def CHIP_CONFIG_MAX_GROUP_DATA_PEERS *