qcacmn: support more dp srng with memory pre-allocation

add more ring type's size to wlan_dp_prealloc_cfg structure,
add DP_MON_PDEV_TYPE memory pre-allocation support.

Change-Id: I23aebaf7e7e78206ac49ebf02719f6b4dee99875
CRs-Fixed: 3314209
这个提交包含在:
Jinwei Chen
2022-10-17 00:23:27 -07:00
提交者 Madan Koyyalamudi
父节点 61db6e2df1
当前提交 2a6561273c
修改 4 个文件,包含 15 行新增3 行删除

查看文件

@@ -2011,7 +2011,7 @@ void *dp_context_alloc_mem(struct dp_soc *soc, enum dp_ctxt_type ctxt_type,
goto end;
dynamic_alloc:
dp_info("Pre-alloc type %d, size %zu failed, need dynamic-alloc",
dp_info("switch to dynamic-alloc for type %d, size %zu",
ctxt_type, ctxt_size);
ctxt_mem = qdf_mem_malloc(ctxt_size);
end:

查看文件

@@ -5078,7 +5078,7 @@ fail2:
mon_ops->mon_pdev_free(pdev);
fail1:
pdev->monitor_pdev = NULL;
qdf_mem_free(mon_pdev);
dp_context_free_mem(soc, DP_MON_PDEV_TYPE, mon_pdev);
fail0:
return QDF_STATUS_E_NOMEM;
}
@@ -5114,7 +5114,7 @@ QDF_STATUS dp_mon_pdev_detach(struct dp_pdev *pdev)
if (mon_ops->mon_pdev_free)
mon_ops->mon_pdev_free(pdev);
qdf_mem_free(mon_pdev);
dp_context_free_mem(pdev->soc, DP_MON_PDEV_TYPE, mon_pdev);
pdev->monitor_pdev = NULL;
return QDF_STATUS_SUCCESS;
}

查看文件

@@ -4013,6 +4013,12 @@ wlan_cfg_get_prealloc_cfg(struct cdp_ctrl_objmgr_psoc *ctrl_psoc,
cfg->num_tx_ext_desc = cfg_get(ctrl_psoc, CFG_DP_TX_EXT_DESC);
cfg->num_rxdma_buf_ring_entries = cfg_get(ctrl_psoc,
CFG_DP_RXDMA_BUF_RING);
cfg->num_rxdma_refill_ring_entries = cfg_get(ctrl_psoc,
CFG_DP_RXDMA_REFILL_RING);
cfg->num_reo_status_ring_entries = cfg_get(ctrl_psoc,
CFG_DP_REO_STATUS_RING);
cfg->num_mon_status_ring_entries = cfg_get(ctrl_psoc,
CFG_DP_RXDMA_MONITOR_STATUS_RING);
}
#ifdef WLAN_FEATURE_PKT_CAPTURE_V2

查看文件

@@ -483,6 +483,9 @@ struct wlan_cfg_dp_pdev_ctxt {
* @num_tx_ext_desc: num of tx ext descriptors
* @num_reo_dst_ring_entries: Number of entries in REO destination ring
* @num_rxdma_buf_ring_entries: Number of entries in rxdma buf ring
* @num_rxdma_refill_ring_entries: Number of entries in rxdma refill ring
* @num_reo_status_ring_entries: Number of entries in REO status ring
* @num_mon_status_ring_entries: Number of entries in monitor status ring
*/
struct wlan_dp_prealloc_cfg {
int num_tx_ring_entries;
@@ -494,6 +497,9 @@ struct wlan_dp_prealloc_cfg {
int num_tx_ext_desc;
int num_reo_dst_ring_entries;
int num_rxdma_buf_ring_entries;
int num_rxdma_refill_ring_entries;
int num_reo_status_ring_entries;
int num_mon_status_ring_entries;
};
/**