qcacmn: Add ini configuation for RXDMA replenish buffer pool

Add ini configuration support for RXDMA replenish buffer pool feature

Change-Id: Ib1edf04a61a52bf24dcbc3269df5067b090ad207
CRS-Fixed: 2869350
This commit is contained in:
Karthik Kantamneni
2021-01-18 18:58:10 +05:30
committed by snandini
parent 6d07f2a272
commit 47b1fe6415
3 changed files with 35 additions and 3 deletions

View File

@@ -1,5 +1,5 @@
/*
* Copyright (c) 2018-2020 The Linux Foundation. All rights reserved.
* Copyright (c) 2018-2021 The Linux Foundation. All rights reserved.
*
* Permission to use, copy, modify, and/or distribute this software for
* any purpose with or without fee is hereby granted, provided that the
@@ -1048,6 +1048,10 @@
CFG_INI_BOOL("dp_rx_buff_prealloc_pool", false, \
"Enable/Disable DP RX emergency buffer pool support")
#define CFG_DP_RX_REFILL_BUFF_POOL_ENABLE \
CFG_INI_BOOL("dp_rx_refill_buff_pool", false, \
"Enable/Disable DP RX refill buffer pool support")
#define CFG_DP_POLL_MODE_ENABLE \
CFG_INI_BOOL("dp_poll_mode_enable", false, \
"Enable/Disable Polling mode for data path")
@@ -1195,6 +1199,7 @@
CFG(CFG_DP_REO_RINGS_MAP) \
CFG(CFG_DP_PEER_EXT_STATS) \
CFG(CFG_DP_RX_BUFF_POOL_ENABLE) \
CFG(CFG_DP_RX_REFILL_BUFF_POOL_ENABLE) \
CFG(CFG_DP_RX_PENDING_HL_THRESHOLD) \
CFG(CFG_DP_RX_PENDING_LO_THRESHOLD) \
CFG(CFG_DP_LEGACY_MODE_CSUM_DISABLE) \

View File

@@ -1,5 +1,5 @@
/*
* Copyright (c) 2016-2020 The Linux Foundation. All rights reserved.
* Copyright (c) 2016-2021 The Linux Foundation. All rights reserved.
*
* Permission to use, copy, modify, and/or distribute this software for
* any purpose with or without fee is hereby granted, provided that the
@@ -620,6 +620,8 @@ wlan_cfg_soc_attach(struct cdp_ctrl_objmgr_psoc *psoc)
wlan_cfg_ctx->pext_stats_enabled = cfg_get(psoc, CFG_DP_PEER_EXT_STATS);
wlan_cfg_ctx->is_rx_buff_pool_enabled =
cfg_get(psoc, CFG_DP_RX_BUFF_POOL_ENABLE);
wlan_cfg_ctx->is_rx_refill_buff_pool_enabled =
cfg_get(psoc, CFG_DP_RX_REFILL_BUFF_POOL_ENABLE);
wlan_cfg_ctx->rx_pending_high_threshold =
cfg_get(psoc, CFG_DP_RX_PENDING_HL_THRESHOLD);
wlan_cfg_ctx->rx_pending_low_threshold =
@@ -1474,11 +1476,22 @@ bool wlan_cfg_is_rx_buffer_pool_enabled(struct wlan_cfg_dp_soc_ctxt *cfg)
{
return cfg->is_rx_buff_pool_enabled;
}
bool wlan_cfg_is_rx_refill_buffer_pool_enabled(struct wlan_cfg_dp_soc_ctxt *cfg)
{
return cfg->is_rx_refill_buff_pool_enabled;
}
#else
bool wlan_cfg_is_rx_buffer_pool_enabled(struct wlan_cfg_dp_soc_ctxt *cfg)
{
return false;
}
bool wlan_cfg_is_rx_refill_buffer_pool_enabled(
struct wlan_cfg_dp_soc_ctxt *cfg)
{
return false;
}
#endif /* WLAN_FEATURE_RX_PREALLOC_BUFFER_POOL */
#ifdef WLAN_DP_FEATURE_SW_LATENCY_MGR

View File

@@ -1,5 +1,5 @@
/*
* Copyright (c) 2013-2020 The Linux Foundation. All rights reserved.
* Copyright (c) 2013-2021 The Linux Foundation. All rights reserved.
*
* Permission to use, copy, modify, and/or distribute this software for
* any purpose with or without fee is hereby granted, provided that the
@@ -189,6 +189,8 @@ struct wlan_srng_cfg {
* @pext_stats_enabled: Flag to enable and disabled peer extended stats
* @is_rx_buff_pool_enabled: flag to enable/disable emergency RX buffer
* pool support
* @is_rx_refill_buff_pool_enabled: flag to enable/disable RX refill buffer
* pool support
* @rx_pending_high_threshold: threshold of starting pkt drop
* @rx_pending_low_threshold: threshold of stopping pkt drop
* @is_swlm_enabled: flag to enable/disable SWLM
@@ -304,6 +306,7 @@ struct wlan_cfg_dp_soc_ctxt {
uint32_t reo_rings_mapping;
bool pext_stats_enabled;
bool is_rx_buff_pool_enabled;
bool is_rx_refill_buff_pool_enabled;
uint32_t rx_pending_high_threshold;
uint32_t rx_pending_low_threshold;
bool is_poll_mode_enabled;
@@ -1437,6 +1440,17 @@ bool wlan_cfg_is_rx_fisa_enabled(struct wlan_cfg_dp_soc_ctxt *cfg);
*/
bool wlan_cfg_is_rx_buffer_pool_enabled(struct wlan_cfg_dp_soc_ctxt *cfg);
/**
* wlan_cfg_is_rx_refill_buffer_pool_enabled() - Get RX refill buffer pool enabled flag
*
*
* @cfg: soc configuration context
*
* Return: true if enabled, false otherwise.
*/
bool wlan_cfg_is_rx_refill_buffer_pool_enabled(struct wlan_cfg_dp_soc_ctxt *cfg);
void wlan_cfg_set_tso_desc_attach_defer(struct wlan_cfg_dp_soc_ctxt *cfg,
bool val);