qcacmn: Avoid buffer allocation during monitor vdev bringup

Ideally monitor buffers are allocated during driver init,
but when DP resource manager is enabled, buffers are allocated
on the go during monitor mode bringup resulting in the allocation
of huge number of buffers in one shot. This will sometime hogs CPU
for longer durations making CPUs unavailable for other high priority
tasks resulting in asserts.

Avoid allocations in one shot during monitor vdev bringup when
DP resource manager is enabled to avoid this, required buffers
will be allocated eventually from a different context.

Change-Id: I5b827869dafdc04d2003e5327bd407dd4c8e4a8c
CRs-Fixed: 3963082
This commit is contained in:
Manikanta Pubbisetty
2024-11-06 15:37:16 +05:30
committed by Ravindra Konda
parent 6e235b3151
commit 6ea48347ad
4 changed files with 18 additions and 2 deletions

View File

@@ -1691,6 +1691,7 @@ typedef union cdp_config_param_t {
uint16_t peer_id;
struct cdp_pkt_info pkts;
} pkt_info;
bool cdp_dyn_resource_mgr_support;
} cdp_config_param_type;
/**
@@ -1880,6 +1881,7 @@ enum cdp_vdev_param_type {
* @CDP_SCAN_RADIO_SUPPORT: Scan Radio capability
* @CDP_SAWF_MSDUQ_RECLAIM_SUPPORT: To initiate msduq reclaim related functions
* @CDP_VDEV_TX_NSS_SUPPORT: FW Support vdev Tx NSS command
* @CDP_DYN_RESOURCE_MGR_SUPPORT: Dynamic RX buffer allocation support
*/
enum cdp_psoc_param_type {
CDP_ENABLE_RATE_STATS,
@@ -1918,6 +1920,7 @@ enum cdp_psoc_param_type {
CDP_SAWF_MSDUQ_RECLAIM_SUPPORT,
#endif
CDP_VDEV_TX_NSS_SUPPORT,
CDP_DYN_RESOURCE_MGR_SUPPORT,
};
#ifdef CONFIG_AP_PLATFORM

View File

@@ -9771,6 +9771,12 @@ dp_set_psoc_param(struct cdp_soc_t *cdp_soc,
dp_info("FW supports Tx Vdev NSS report: %d",
soc->features.vdev_tx_nss_support);
break;
case CDP_DYN_RESOURCE_MGR_SUPPORT:
soc->features.dyn_resource_mgr_support =
val.cdp_dyn_resource_mgr_support;
dp_info("Dynamic resource manager support: %u",
soc->features.dyn_resource_mgr_support);
break;
default:
break;
}

View File

@@ -2901,6 +2901,7 @@ struct dp_arch_ops {
* @fw_support_ml_monitor: FW support ML monitor mode
* @dp_ipa_opt_dp_ctrl_refill: opt_dp_ctrl refill support
* @vdev_tx_nss_support: FW supports vdev Tx NSS report.
* @dyn_resource_mgr_support: Dynamic RX buffer allocation support
*/
struct dp_soc_features {
uint8_t pn_in_reo_dest:1,
@@ -2914,6 +2915,7 @@ struct dp_soc_features {
bool dp_ipa_opt_dp_ctrl_refill;
#endif
bool vdev_tx_nss_support;
bool dyn_resource_mgr_support;
};
enum sysfs_printing_mode {

View File

@@ -437,8 +437,13 @@ QDF_STATUS dp_vdev_set_monitor_mode_buf_rings(struct dp_pdev *pdev)
mac_id,
pdev->pdev_id);
dp_rx_pdev_mon_buf_buffers_alloc(pdev, mac_for_pdev,
FALSE);
/* Skip buffer allocation if dynamic resource manager
* is enabled, these will be allocated from a different
* context.
*/
if (!soc->features.dyn_resource_mgr_support)
dp_rx_pdev_mon_buf_buffers_alloc(
pdev, mac_for_pdev, FALSE);
mon_buf_ring =
&pdev->soc->rxdma_mon_buf_ring[mac_for_pdev];
/*