From d218a9590cfa04220d7783493c425429d31c8217 Mon Sep 17 00:00:00 2001 From: Adrian Gielniewski Date: Tue, 19 Nov 2024 14:59:12 +0100 Subject: [PATCH] [nrf toup] config: Add Kconfig for packet buffer pool size Add `CHIP_SYSTEM_PACKETBUFFER_POOL_SIZE` Kconfig for packet buffer pool size configuration. Signed-off-by: Adrian Gielniewski [nrf toup] config: Reduce packet buffer pool size to 11 Value selected based on top usage in tests. Highest observed number of packet buffers was 10. Signed-off-by: Adrian Gielniewski --- config/nrfconnect/chip-module/Kconfig | 6 ++++++ src/platform/nrfconnect/SystemPlatformConfig.h | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/config/nrfconnect/chip-module/Kconfig b/config/nrfconnect/chip-module/Kconfig index 3acb08091c..b117c0a41e 100644 --- a/config/nrfconnect/chip-module/Kconfig +++ b/config/nrfconnect/chip-module/Kconfig @@ -450,4 +450,10 @@ config CHIP_ENABLE_BDX_LOG_TRANSFER help Enables the BDX protocol for diagnostics log transfer purposes. +config CHIP_SYSTEM_PACKETBUFFER_POOL_SIZE + int "Packet buffer pool size" + default 11 + help + Total number of packet buffers allocated by the stack for internal pool. + endif # CHIP diff --git a/src/platform/nrfconnect/SystemPlatformConfig.h b/src/platform/nrfconnect/SystemPlatformConfig.h index a82ce0e35d..a9076f1c10 100644 --- a/src/platform/nrfconnect/SystemPlatformConfig.h +++ b/src/platform/nrfconnect/SystemPlatformConfig.h @@ -48,7 +48,7 @@ struct ChipDeviceEvent; #define CHIP_SYSTEM_CONFIG_USE_SOCKETS 1 #ifndef CONFIG_ARCH_POSIX -#define CHIP_SYSTEM_CONFIG_PACKETBUFFER_POOL_SIZE 15 +#define CHIP_SYSTEM_CONFIG_PACKETBUFFER_POOL_SIZE CONFIG_CHIP_SYSTEM_PACKETBUFFER_POOL_SIZE #endif #ifndef CHIP_SYSTEM_CONFIG_PACKETBUFFER_CAPACITY_MAX