23
23
24
24
#pragma once
25
25
26
+ #include <TargetConditionals.h>
27
+
26
28
// ==================== General Platform Adaptations ====================
27
29
28
30
#define CHIP_CONFIG_ABORT () abort()
@@ -53,9 +55,16 @@ extern "C" int __cxa_atexit(void (*f)(void *), void * p, void * d);
53
55
#define CHIP_CONFIG_MAX_UNSOLICITED_MESSAGE_HANDLERS 8
54
56
#endif // CHIP_CONFIG_MAX_UNSOLICITED_MESSAGE_HANDLERS
55
57
56
- #ifndef CHIP_CONFIG_MAX_EXCHANGE_CONTEXTS
57
- #define CHIP_CONFIG_MAX_EXCHANGE_CONTEXTS 8
58
- #endif // CHIP_CONFIG_MAX_EXCHANGE_CONTEXTS
58
+ //
59
+ // Default of 8 ECs is not sufficient for some of the unit tests
60
+ // that try to validate multiple simultaneous interactions.
61
+ // In tests like TestReadHandler_MultipleSubscriptions, we are trying to issue as many read / subscription requests as possible in
62
+ // parallel. Since the default config says we support 16 fabrics, and we will have 4 read handlers for each fabric (3 subscriptions
63
+ // + 1 reserved for read) that is read transactions in parallel. Since the report handlers are allocated on the heap, we will issue
64
+ // 65 requests (the TestReadHandler_MultipleSubscriptions will issue CHIP_IM_MAX_NUM_READ_HANDLER + 1 subscriptions to verify heap
65
+ // allocation logic) in total and that is 130 ECs. Round this up to 150 ECs
66
+ //
67
+ #define CHIP_CONFIG_MAX_EXCHANGE_CONTEXTS 150
59
68
60
69
#ifndef CHIP_LOG_FILTERING
61
70
#define CHIP_LOG_FILTERING 1
@@ -66,5 +75,18 @@ extern "C" int __cxa_atexit(void (*f)(void *), void * p, void * d);
66
75
#endif // CHIP_CONFIG_BDX_MAX_NUM_TRANSFERS
67
76
68
77
#ifndef CHIP_CONFIG_KVS_PATH
78
+ #if TARGET_OS_IPHONE
79
+ #define CHIP_CONFIG_KVS_PATH "chip.store"
80
+ #else
69
81
#define CHIP_CONFIG_KVS_PATH "/tmp/chip_kvs"
82
+ #endif // TARGET_OS_IPHONE
70
83
#endif // CHIP_CONFIG_KVS_PATH
84
+
85
+ #define CHIP_SYSTEM_CONFIG_PACKETBUFFER_POOL_SIZE 0
86
+
87
+ // The session pool size limits how many subscriptions we can have live at
88
+ // once. Home supports up to 1000 accessories, and we subscribe to all of them,
89
+ // so we need to make sure the pool is big enough for that.
90
+ #define CHIP_CONFIG_SECURE_SESSION_POOL_SIZE 1000
91
+
92
+ #define INET_CONFIG_OVERRIDE_SYSTEM_TCP_USER_TIMEOUT 0
0 commit comments