qcacmn: ini config to allocate special TX descriptors of SOC

An INI dp_tx_spl_device_limit is defined and can be used to configure the
limit of TX descriptors that can reserved on the SOC to handle
special frames like EAPOL.

CRs-Fixed: 3343207
Change-Id: Ic84a11249880a3541749a72ac6d60df548f2bc5c
This commit is contained in:
Sreeramya Soratkal
2022-11-22 12:44:58 +05:30
committed by Madan Koyyalamudi
parent 88124ec9b4
commit 6eba2a4482
5 changed files with 37 additions and 1 deletions

View File

@@ -15596,7 +15596,9 @@ void *dp_soc_init(struct dp_soc *soc, HTC_HANDLE htc_handle,
qdf_atomic_init(&soc->num_tx_exception); qdf_atomic_init(&soc->num_tx_exception);
soc->num_tx_allowed = soc->num_tx_allowed =
wlan_cfg_get_dp_soc_tx_device_limit(soc->wlan_cfg_ctx); wlan_cfg_get_dp_soc_tx_device_limit(soc->wlan_cfg_ctx);
soc->num_reg_tx_allowed = soc->num_tx_allowed - MAX_TX_SPL_DESC; soc->num_tx_spl_allowed =
wlan_cfg_get_dp_soc_tx_spl_device_limit(soc->wlan_cfg_ctx);
soc->num_reg_tx_allowed = soc->num_tx_allowed - soc->num_tx_spl_allowed;
if (soc->cdp_soc.ol_ops->get_dp_cfg_param) { if (soc->cdp_soc.ol_ops->get_dp_cfg_param) {
int ret = soc->cdp_soc.ol_ops->get_dp_cfg_param(soc->ctrl_psoc, int ret = soc->cdp_soc.ol_ops->get_dp_cfg_param(soc->ctrl_psoc,
CDP_CFG_MAX_PEER_ID); CDP_CFG_MAX_PEER_ID);

View File

@@ -2481,6 +2481,8 @@ struct dp_soc {
uint32_t num_tx_allowed; uint32_t num_tx_allowed;
/* Num Regular Tx allowed */ /* Num Regular Tx allowed */
uint32_t num_reg_tx_allowed; uint32_t num_reg_tx_allowed;
/* Num Tx allowed for special frames*/
uint32_t num_tx_spl_allowed;
/* Preferred HW mode */ /* Preferred HW mode */
uint8_t preferred_hw_mode; uint8_t preferred_hw_mode;

View File

@@ -364,6 +364,10 @@
#define WLAN_CFG_TX_DEVICE_LIMIT_MIN 16384 #define WLAN_CFG_TX_DEVICE_LIMIT_MIN 16384
#define WLAN_CFG_TX_DEVICE_LIMIT_MAX 65536 #define WLAN_CFG_TX_DEVICE_LIMIT_MAX 65536
#define WLAN_CFG_TX_SPL_DEVICE_LIMIT 1024
#define WLAN_CFG_TX_SPL_DEVICE_LIMIT_MIN 0
#define WLAN_CFG_TX_SPL_DEVICE_LIMIT_MAX 4096
#define WLAN_CFG_TX_SW_INTERNODE_QUEUE 1024 #define WLAN_CFG_TX_SW_INTERNODE_QUEUE 1024
#define WLAN_CFG_TX_SW_INTERNODE_QUEUE_MIN 128 #define WLAN_CFG_TX_SW_INTERNODE_QUEUE_MIN 128
#define WLAN_CFG_TX_SW_INTERNODE_QUEUE_MAX 1024 #define WLAN_CFG_TX_SW_INTERNODE_QUEUE_MAX 1024
@@ -1176,6 +1180,13 @@
WLAN_CFG_TX_DEVICE_LIMIT, \ WLAN_CFG_TX_DEVICE_LIMIT, \
CFG_VALUE_OR_DEFAULT, "DP TX DEVICE limit") CFG_VALUE_OR_DEFAULT, "DP TX DEVICE limit")
#define CFG_DP_TX_SPL_DEVICE_LIMIT \
CFG_INI_UINT("dp_tx_spl_device_limit", \
WLAN_CFG_TX_SPL_DEVICE_LIMIT_MIN, \
WLAN_CFG_TX_SPL_DEVICE_LIMIT_MAX, \
WLAN_CFG_TX_SPL_DEVICE_LIMIT, \
CFG_VALUE_OR_DEFAULT, "DP TX Special DEVICE limit")
#define CFG_DP_TX_SW_INTERNODE_QUEUE \ #define CFG_DP_TX_SW_INTERNODE_QUEUE \
CFG_INI_UINT("dp_tx_sw_internode_queue", \ CFG_INI_UINT("dp_tx_sw_internode_queue", \
WLAN_CFG_TX_SW_INTERNODE_QUEUE_MIN, \ WLAN_CFG_TX_SW_INTERNODE_QUEUE_MIN, \
@@ -1864,6 +1875,7 @@
CFG(CFG_DP_TX_DESC_LIMIT_1) \ CFG(CFG_DP_TX_DESC_LIMIT_1) \
CFG(CFG_DP_TX_DESC_LIMIT_2) \ CFG(CFG_DP_TX_DESC_LIMIT_2) \
CFG(CFG_DP_TX_DEVICE_LIMIT) \ CFG(CFG_DP_TX_DEVICE_LIMIT) \
CFG(CFG_DP_TX_SPL_DEVICE_LIMIT) \
CFG(CFG_DP_TX_SW_INTERNODE_QUEUE) \ CFG(CFG_DP_TX_SW_INTERNODE_QUEUE) \
CFG(CFG_DP_RXDMA_MONITOR_BUF_RING) \ CFG(CFG_DP_RXDMA_MONITOR_BUF_RING) \
CFG(CFG_DP_RXDMA_MONITOR_DST_RING) \ CFG(CFG_DP_RXDMA_MONITOR_DST_RING) \

View File

@@ -2969,6 +2969,8 @@ wlan_cfg_soc_attach(struct cdp_ctrl_objmgr_psoc *psoc)
CFG_DP_TX_DESC_LIMIT_2); CFG_DP_TX_DESC_LIMIT_2);
wlan_cfg_ctx->tx_device_limit = cfg_get(psoc, wlan_cfg_ctx->tx_device_limit = cfg_get(psoc,
CFG_DP_TX_DEVICE_LIMIT); CFG_DP_TX_DEVICE_LIMIT);
wlan_cfg_ctx->tx_spl_device_limit = cfg_get(psoc,
CFG_DP_TX_SPL_DEVICE_LIMIT);
wlan_cfg_ctx->tx_sw_internode_queue = cfg_get(psoc, wlan_cfg_ctx->tx_sw_internode_queue = cfg_get(psoc,
CFG_DP_TX_SW_INTERNODE_QUEUE); CFG_DP_TX_SW_INTERNODE_QUEUE);
wlan_cfg_ctx->rxdma_err_dst_ring = cfg_get(psoc, wlan_cfg_ctx->rxdma_err_dst_ring = cfg_get(psoc,
@@ -3807,6 +3809,12 @@ wlan_cfg_get_dp_soc_tx_device_limit(struct wlan_cfg_dp_soc_ctxt *cfg)
return cfg->tx_device_limit; return cfg->tx_device_limit;
} }
int
wlan_cfg_get_dp_soc_tx_spl_device_limit(struct wlan_cfg_dp_soc_ctxt *cfg)
{
return cfg->tx_spl_device_limit;
}
int int
wlan_cfg_get_dp_soc_tx_sw_internode_queue(struct wlan_cfg_dp_soc_ctxt *cfg) wlan_cfg_get_dp_soc_tx_sw_internode_queue(struct wlan_cfg_dp_soc_ctxt *cfg)
{ {

View File

@@ -250,6 +250,7 @@ struct wlan_srng_cfg {
* @tx_desc_limit_1: tx_desc limit for 2 GHz * @tx_desc_limit_1: tx_desc limit for 2 GHz
* @tx_desc_limit_2: tx_desc limit for 5 GHz Low * @tx_desc_limit_2: tx_desc limit for 5 GHz Low
* @tx_device_limit: tx device limit * @tx_device_limit: tx device limit
* @tx_spl_device_limit: tx device limit for special frames
* @tx_sw_internode_queue: tx sw internode queue * @tx_sw_internode_queue: tx sw internode queue
* @mon_drop_thresh: * @mon_drop_thresh:
* @tx_comp_loop_pkt_limit: Max # of packets to be processed in 1 tx comp loop * @tx_comp_loop_pkt_limit: Max # of packets to be processed in 1 tx comp loop
@@ -428,6 +429,7 @@ struct wlan_cfg_dp_soc_ctxt {
int tx_desc_limit_1; int tx_desc_limit_1;
int tx_desc_limit_2; int tx_desc_limit_2;
int tx_device_limit; int tx_device_limit;
int tx_spl_device_limit;
int tx_sw_internode_queue; int tx_sw_internode_queue;
int mon_drop_thresh; int mon_drop_thresh;
#ifdef WLAN_FEATURE_RX_SOFTIRQ_TIME_LIMIT #ifdef WLAN_FEATURE_RX_SOFTIRQ_TIME_LIMIT
@@ -1601,6 +1603,16 @@ wlan_cfg_get_dp_soc_tx_desc_limit_2(struct wlan_cfg_dp_soc_ctxt *cfg);
int int
wlan_cfg_get_dp_soc_tx_device_limit(struct wlan_cfg_dp_soc_ctxt *cfg); wlan_cfg_get_dp_soc_tx_device_limit(struct wlan_cfg_dp_soc_ctxt *cfg);
/**
* wlan_cfg_get_dp_soc_tx_spl_device_limit - Get tx device limit for special
* frames
* @cfg: Configuration Handle
*
* Return: tx device limit for special frames
*/
int
wlan_cfg_get_dp_soc_tx_spl_device_limit(struct wlan_cfg_dp_soc_ctxt *cfg);
/** /**
* wlan_cfg_get_dp_soc_tx_sw_internode_queue - Get tx sw internode queue * wlan_cfg_get_dp_soc_tx_sw_internode_queue - Get tx sw internode queue
* @cfg: soc configuration context * @cfg: soc configuration context