From 2218920060f107bd65e56b930e6fc9afe3481ba6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Damian=20Kr=C3=B3lik?= <66667989+Damian-Nordic@users.noreply.github.com> Date: Fri, 24 Jun 2022 12:05:35 +0200 Subject: [PATCH] [OpenThread] Increase SRP service count (#19900) We assumed that MAX_FABRICS + 1 slots for SRP services is enough, but to pass Pre-SVE tests it must be possible to open the commissioning window after having been commissioned to MAX_FABRICS fabrics, and the commissionable instance name changes on opening the window. Therefore, if the extended discovery is enabled, two slots for the commissionable services are needed for a short time: the old service to be removed and the new service to be added. Signed-off-by: Damian Krolik --- src/include/platform/CHIPDeviceConfig.h | 6 ++++++ src/platform/qpg/CHIPDevicePlatformConfig.h | 1 - 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/include/platform/CHIPDeviceConfig.h b/src/include/platform/CHIPDeviceConfig.h index 1ec81fdc5e5bfd..510d89f371e135 100644 --- a/src/include/platform/CHIPDeviceConfig.h +++ b/src/include/platform/CHIPDeviceConfig.h @@ -799,8 +799,14 @@ * Amount of services available for advertising using SRP. */ #ifndef CHIP_DEVICE_CONFIG_THREAD_SRP_MAX_SERVICES +#if CHIP_DEVICE_CONFIG_ENABLE_EXTENDED_DISCOVERY && CHIP_DEVICE_CONFIG_ENABLE_COMMISSIONER_DISCOVERY +#define CHIP_DEVICE_CONFIG_THREAD_SRP_MAX_SERVICES (CHIP_CONFIG_MAX_FABRICS + 3) +#elif CHIP_DEVICE_CONFIG_ENABLE_EXTENDED_DISCOVERY || CHIP_DEVICE_CONFIG_ENABLE_COMMISSIONER_DISCOVERY +#define CHIP_DEVICE_CONFIG_THREAD_SRP_MAX_SERVICES (CHIP_CONFIG_MAX_FABRICS + 2) +#else #define CHIP_DEVICE_CONFIG_THREAD_SRP_MAX_SERVICES (CHIP_CONFIG_MAX_FABRICS + 1) #endif +#endif /** * CHIP_DEVICE_CONFIG_ENABLE_THREAD_COMMISSIONABLE_DISCOVERY diff --git a/src/platform/qpg/CHIPDevicePlatformConfig.h b/src/platform/qpg/CHIPDevicePlatformConfig.h index afc57179d664c3..fb08c6b3145ef5 100644 --- a/src/platform/qpg/CHIPDevicePlatformConfig.h +++ b/src/platform/qpg/CHIPDevicePlatformConfig.h @@ -33,7 +33,6 @@ #if CHIP_ENABLE_OPENTHREAD #define CHIP_DEVICE_CONFIG_ENABLE_THREAD 1 #define CHIP_DEVICE_CONFIG_ENABLE_THREAD_SRP_CLIENT 1 -#define CHIP_DEVICE_CONFIG_THREAD_SRP_MAX_SERVICES (CHIP_CONFIG_MAX_FABRICS + 1) #define CHIP_DEVICE_CONFIG_ENABLE_THREAD_DNS_CLIENT 1 #define CHIP_DEVICE_CONFIG_ENABLE_THREAD_COMMISSIONABLE_DISCOVERY 1 #endif