qcacmn: Allow drop pkts when pkts pending is large

On some cases, dp_rx_thread can not handle nbufs in time,
then a large number of packets are pending in
rx_thread->nbuf_queue, which run out of system memory at
last and failed to malloc new buffers for refill buffer
ring, fw crash is encountered. To avoid this, drop RX
packets when the pending number becomes large.

Change-Id: I370ad983b185b6ecb28fa7c0b4820b8edc00c710
CRs-Fixed: 2737191
这个提交包含在:
Yu Tian
2020-07-22 11:20:45 +08:00
提交者 snandini
父节点 30a3c984d0
当前提交 db5374f08f
修改 3 个文件,包含 93 行新增1 行删除

查看文件

@@ -612,6 +612,11 @@ 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->rx_pending_high_threshold =
cfg_get(psoc, CFG_DP_RX_PENDING_HL_THRESHOLD);
wlan_cfg_ctx->rx_pending_low_threshold =
cfg_get(psoc, CFG_DP_RX_PENDING_LO_THRESHOLD);
return wlan_cfg_ctx;
}
@@ -882,6 +887,18 @@ int wlan_cfg_per_pdev_tx_ring(struct wlan_cfg_dp_soc_ctxt *cfg)
return cfg->per_pdev_tx_ring;
}
uint32_t
wlan_cfg_rx_pending_hl_threshold(struct wlan_cfg_dp_soc_ctxt *cfg)
{
return cfg->rx_pending_high_threshold;
}
uint32_t
wlan_cfg_rx_pending_lo_threshold(struct wlan_cfg_dp_soc_ctxt *cfg)
{
return cfg->rx_pending_low_threshold;
}
int wlan_cfg_per_pdev_lmac_ring(struct wlan_cfg_dp_soc_ctxt *cfg)
{
return cfg->per_pdev_lmac_ring;