From e860dbf0f312fb79e65f5ee215f197323394163f Mon Sep 17 00:00:00 2001 From: Triveni Danda Date: Thu, 19 Sep 2024 13:10:39 +0530 Subject: [PATCH] [nrf fromlist] drivers: wifi: nrfwifi: Enable variable network configurations Add variable network configuration control into the driver, removing the need for per-sample settings. Upstream PR: https://github.com/zephyrproject-rtos/zephyr/pull/78852 Signed-off-by: Triveni Danda --- drivers/wifi/nrfwifi/Kconfig.nrfwifi | 36 ++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) diff --git a/drivers/wifi/nrfwifi/Kconfig.nrfwifi b/drivers/wifi/nrfwifi/Kconfig.nrfwifi index b409261b614..7020452c2a9 100644 --- a/drivers/wifi/nrfwifi/Kconfig.nrfwifi +++ b/drivers/wifi/nrfwifi/Kconfig.nrfwifi @@ -570,6 +570,42 @@ config NET_TC_TX_COUNT endif # NETWORKING +choice NRF_WIFI_NET_BUF_DATA_ALLOC_TYPE + prompt "Network buffer type" + default NRF_WIFI_NET_BUF_VARIABLE_SIZE + help + This choice overrides NET_PKT_DATA_ALLOC_TYPE, which is + defined in the network stack. + +config NRF_WIFI_NET_BUF_VARIABLE_SIZE + bool "Variable Data Size" + help + Use variable network buffer sizes for packet buffers. + +config NRF_WIFI_NET_BUF_FIXED_SIZE + bool "Fixed Data Size" + help + Use fixed data sizes for packet buffers. + +endchoice + +if NRF_WIFI_NET_BUF_VARIABLE_SIZE +# These numbers were derived from tests using specific configurations for TCP and UDP +# with variable data sizes. We adjusted pool sizes to match throughput levels from +# previous fixed data tests. + +choice NET_PKT_DATA_ALLOC_TYPE + default NET_BUF_VARIABLE_DATA_SIZE +endchoice + +config NET_PKT_BUF_RX_DATA_POOL_SIZE + default 32000 + +config NET_PKT_BUF_TX_DATA_POOL_SIZE + default 55000 + +endif # NRF_WIFI_NET_BUF_VARIABLE_SIZE + config MAIN_STACK_SIZE default 4096