qcacld-3.0: Keep using 4 RX threads for platform with no IPA

For platforms that don't have IPA module, 4 RX rings can be
enabled to map to 4 RX threads. This Change is to implement a
feature flag to separate the number of threads used for
different platforms.

Change-Id: I23744ca6333f29667b0860f386dc9fc45f29abe4
CRs-Fixed: 3018613
This commit is contained in:
Yu Tian
2021-08-19 01:58:18 -07:00
committed by Madan Koyyalamudi
parent 90ec20d334
commit 25c1a53711
4 changed files with 28 additions and 6 deletions

1
Kbuild
View File

@@ -4027,6 +4027,7 @@ cppflags-$(CONFIG_GENERIC_SHADOW_REGISTER_ACCESS_ENABLE) += -DGENERIC_SHADOW_REG
cppflags-$(CONFIG_IPA_SET_RESET_TX_DB_PA) += -DIPA_SET_RESET_TX_DB_PA
cppflags-$(CONFIG_DEVICE_FORCE_WAKE_ENABLE) += -DDEVICE_FORCE_WAKE_ENABLE
cppflags-$(CONFIG_DUMP_REO_QUEUE_INFO_IN_DDR) += -DDUMP_REO_QUEUE_INFO_IN_DDR
cppflags-$(CONFIG_WLAN_FEATURE_REDUCE_RX_THREADS) += -DWLAN_FEATURE_REDUCE_RX_THREADS
ifdef CONFIG_MAX_CLIENTS_ALLOWED
ccflags-y += -DWLAN_MAX_CLIENTS_ALLOWED=$(CONFIG_MAX_CLIENTS_ALLOWED)

View File

@@ -104,6 +104,7 @@ ifeq ($(CONFIG_CNSS_WCN7850), y)
CONFIG_DP_FEATURE_HW_COOKIE_CONVERSION := y
CONFIG_DP_HW_COOKIE_CONVERT_EXCEPTION := y
CONFIG_WLAN_FEATURE_NEAR_FULL_IRQ := y
CONFIG_WLAN_FEATURE_REDUCE_RX_THREADS := y
endif
ifeq (y,$(findstring y,$(CONFIG_LITHIUM) $(CONFIG_BERYLLIUM)))

View File

@@ -27,12 +27,14 @@
/* Maximum number of REO rings supported (for stats tracking) */
#ifdef CONFIG_BERYLLIUM
#define DP_RX_TM_MAX_REO_RINGS 8
#else
#define DP_RX_TM_MAX_REO_RINGS 4
#endif
/* Number of DP RX threads supported */
#define DP_MAX_RX_THREADS 3
#else
#define DP_RX_TM_MAX_REO_RINGS 4
#define DP_MAX_RX_THREADS DP_RX_TM_MAX_REO_RINGS
#endif
#define DP_REDUCED_NUM_RX_THREADS 3
/*
* struct dp_rx_tm_handle_cmn - Opaque handle for rx_threads to store

View File

@@ -56,6 +56,24 @@ static void dp_rx_refill_thread_schedule(ol_txrx_soc_handle soc)
}
#endif
/**
* dp_get_rx_threads_num() - Get number of threads in use
* @soc: ol_txrx_soc_handle object
*
* Return: number of threads
*/
#ifdef WLAN_FEATURE_REDUCE_RX_THREADS
static uint8_t dp_get_rx_threads_num(ol_txrx_soc_handle soc)
{
return DP_REDUCED_NUM_RX_THREADS;
}
#else
static uint8_t dp_get_rx_threads_num(ol_txrx_soc_handle soc)
{
return cdp_get_num_rx_contexts(soc);
}
#endif
QDF_STATUS dp_txrx_init(ol_txrx_soc_handle soc, uint8_t pdev_id,
struct dp_txrx_config *config)
{
@@ -106,8 +124,8 @@ QDF_STATUS dp_txrx_init(ol_txrx_soc_handle soc, uint8_t pdev_id,
dp_rx_refill_thread_schedule);
}
/* Get num Rx thread config from INI? */
num_dp_rx_threads = 3;
num_dp_rx_threads = dp_get_rx_threads_num(soc);
dp_info("%d RX threads in use", num_dp_rx_threads);
if (dp_ext_hdl->config.enable_rx_threads) {
qdf_status = dp_rx_tm_init(&dp_ext_hdl->rx_tm_hdl,