Skip to content

Commit

Permalink
[OpenThread] Increase SRP service count (#19900)
Browse files Browse the repository at this point in the history
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 <damian.krolik@nordicsemi.no>
  • Loading branch information
Damian-Nordic authored and razvanM97 committed Jul 7, 2022
1 parent 40ec4b5 commit 1516425
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
6 changes: 6 additions & 0 deletions src/include/platform/CHIPDeviceConfig.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 0 additions & 1 deletion src/platform/qpg/CHIPDevicePlatformConfig.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 1516425

Please sign in to comment.