From 85aff459653ae91da921c157d55c7b79d6a8a484 Mon Sep 17 00:00:00 2001 From: Abtin Keshavarzian Date: Thu, 21 Sep 2023 12:47:26 -0700 Subject: [PATCH] [tmf] set default snoop cache entry count to 1/16 of total (#9440) This commit sets the default value of the configuration `TMF_ADDRESS_CACHE_MAX_SNOOP_ENTRIES` to `1/16` of the total number of address cache entries. This ensures that the snoop entries scale with the total number of entries. --- src/core/config/tmf.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/core/config/tmf.h b/src/core/config/tmf.h index a28d7904b1a..42d3a70dc14 100644 --- a/src/core/config/tmf.h +++ b/src/core/config/tmf.h @@ -57,9 +57,11 @@ * The maximum number of EID-to-RLOC cache entries that can be used for "snoop optimization" where an entry is created * by inspecting a received message. * + * By default a 1/16 fraction of `OPENTHREAD_CONFIG_TMF_ADDRESS_CACHE_ENTRIES` is used. + * */ #ifndef OPENTHREAD_CONFIG_TMF_ADDRESS_CACHE_MAX_SNOOP_ENTRIES -#define OPENTHREAD_CONFIG_TMF_ADDRESS_CACHE_MAX_SNOOP_ENTRIES 2 +#define OPENTHREAD_CONFIG_TMF_ADDRESS_CACHE_MAX_SNOOP_ENTRIES (OPENTHREAD_CONFIG_TMF_ADDRESS_CACHE_ENTRIES / 16) #endif /**