qcacmn: Add tx desc alloc failure count for PPEDS

Add tx desc alloc failure count for direct switch

Change-Id: I593e5846ab4948edf1e1b955890f167f772e166b
CRs-Fixed: 3526743
This commit is contained in:
Pavankumar Nandeshwar
2023-06-02 01:46:57 -07:00
committed by Rahul Choudhary
parent ebb1a3faea
commit c27dfcd8ac
4 changed files with 33 additions and 0 deletions

View File

@@ -97,6 +97,16 @@ static void dp_ppeds_inuse_desc(struct dp_soc *soc)
DP_PRINT_STATS("PPE-DS Tx Descriptors in Use = %u num_free %u", DP_PRINT_STATS("PPE-DS Tx Descriptors in Use = %u num_free %u",
be_soc->ppeds_tx_desc.num_allocated, be_soc->ppeds_tx_desc.num_allocated,
be_soc->ppeds_tx_desc.num_free); be_soc->ppeds_tx_desc.num_free);
DP_PRINT_STATS("PPE-DS Tx desc alloc failed %u",
be_soc->ppeds_stats.tx.desc_alloc_failed);
}
static void dp_ppeds_clear_stats(struct dp_soc *soc)
{
struct dp_soc_be *be_soc = dp_get_be_soc_from_dp_soc(soc);
be_soc->ppeds_stats.tx.desc_alloc_failed = 0;
} }
#endif #endif
@@ -2908,6 +2918,7 @@ void dp_initialize_arch_ops_be(struct dp_arch_ops *arch_ops)
arch_ops->dp_register_ppeds_interrupts = dp_register_ppeds_interrupts; arch_ops->dp_register_ppeds_interrupts = dp_register_ppeds_interrupts;
arch_ops->dp_free_ppeds_interrupts = dp_free_ppeds_interrupts; arch_ops->dp_free_ppeds_interrupts = dp_free_ppeds_interrupts;
arch_ops->dp_tx_ppeds_inuse_desc = dp_ppeds_inuse_desc; arch_ops->dp_tx_ppeds_inuse_desc = dp_ppeds_inuse_desc;
arch_ops->dp_ppeds_clear_stats = dp_ppeds_clear_stats;
arch_ops->dp_tx_ppeds_cfg_astidx_cache_mapping = arch_ops->dp_tx_ppeds_cfg_astidx_cache_mapping =
dp_tx_ppeds_cfg_astidx_cache_mapping; dp_tx_ppeds_cfg_astidx_cache_mapping;
#ifdef DP_UMAC_HW_RESET_SUPPORT #ifdef DP_UMAC_HW_RESET_SUPPORT

View File

@@ -310,6 +310,7 @@ struct dp_ppeds_napi {
* @num_ppe_vp_entries: Number of PPE VP entries * @num_ppe_vp_entries: Number of PPE VP entries
* @num_ppe_vp_search_idx_entries: PPEDS VP search idx entries * @num_ppe_vp_search_idx_entries: PPEDS VP search idx entries
* @irq_name: PPEDS VP irq names * @irq_name: PPEDS VP irq names
* @ppeds_stats: PPEDS stats
* @mlo_enabled: Flag to indicate MLO is enabled or not * @mlo_enabled: Flag to indicate MLO is enabled or not
* @mlo_chip_id: MLO chip_id * @mlo_chip_id: MLO chip_id
* @ml_ctxt: pointer to global ml_context * @ml_ctxt: pointer to global ml_context
@@ -351,6 +352,11 @@ struct dp_soc_be {
uint8_t num_ppe_vp_search_idx_entries; uint8_t num_ppe_vp_search_idx_entries;
uint8_t num_ppe_vp_profiles; uint8_t num_ppe_vp_profiles;
char irq_name[DP_PPE_INTR_MAX][DP_PPE_INTR_STRNG_LEN]; char irq_name[DP_PPE_INTR_MAX][DP_PPE_INTR_STRNG_LEN];
struct {
struct {
uint64_t desc_alloc_failed;
} tx;
} ppeds_stats;
#endif #endif
#ifdef WLAN_FEATURE_11BE_MLO #ifdef WLAN_FEATURE_11BE_MLO
#ifdef WLAN_MLO_MULTI_CHIP #ifdef WLAN_MLO_MULTI_CHIP

View File

@@ -6225,6 +6225,18 @@ static inline void dp_srng_clear_ring_usage_wm_stats(struct dp_soc *soc)
} }
#endif #endif
#ifdef WLAN_SUPPORT_PPEDS
static void dp_clear_tx_ppeds_stats(struct dp_soc *soc)
{
if (soc->arch_ops.dp_ppeds_clear_stats)
soc->arch_ops.dp_ppeds_clear_stats(soc);
}
#else
static void dp_clear_tx_ppeds_stats(struct dp_soc *soc)
{
}
#endif
/** /**
* dp_txrx_host_stats_clr() - Reinitialize the txrx stats * dp_txrx_host_stats_clr() - Reinitialize the txrx stats
* @vdev: DP_VDEV handle * @vdev: DP_VDEV handle
@@ -6257,6 +6269,8 @@ dp_txrx_host_stats_clr(struct dp_vdev *vdev, struct dp_soc *soc)
DP_STATS_CLR(vdev->pdev); DP_STATS_CLR(vdev->pdev);
DP_STATS_CLR(vdev->pdev->soc); DP_STATS_CLR(vdev->pdev->soc);
dp_clear_tx_ppeds_stats(soc);
hif_clear_napi_stats(vdev->pdev->soc->hif_handle); hif_clear_napi_stats(vdev->pdev->soc->hif_handle);
TAILQ_FOREACH(var_vdev, &vdev->pdev->vdev_list, vdev_list_elem) { TAILQ_FOREACH(var_vdev, &vdev->pdev->vdev_list, vdev_list_elem) {

View File

@@ -2217,6 +2217,7 @@ enum dp_context_type {
* @ipa_get_wdi_ver: Get WDI version * @ipa_get_wdi_ver: Get WDI version
* @dp_txrx_ppeds_rings_status: * @dp_txrx_ppeds_rings_status:
* @dp_tx_ppeds_inuse_desc: * @dp_tx_ppeds_inuse_desc:
* @dp_ppeds_clear_stats: Clear ppeds related stats
* @dp_tx_ppeds_cfg_astidx_cache_mapping: * @dp_tx_ppeds_cfg_astidx_cache_mapping:
* @txrx_soc_ppeds_start: * @txrx_soc_ppeds_start:
* @txrx_soc_ppeds_stop: * @txrx_soc_ppeds_stop:
@@ -2442,6 +2443,7 @@ struct dp_arch_ops {
#ifdef WLAN_SUPPORT_PPEDS #ifdef WLAN_SUPPORT_PPEDS
void (*dp_txrx_ppeds_rings_status)(struct dp_soc *soc); void (*dp_txrx_ppeds_rings_status)(struct dp_soc *soc);
void (*dp_tx_ppeds_inuse_desc)(struct dp_soc *soc); void (*dp_tx_ppeds_inuse_desc)(struct dp_soc *soc);
void (*dp_ppeds_clear_stats)(struct dp_soc *soc);
void (*dp_tx_ppeds_cfg_astidx_cache_mapping)(struct dp_soc *soc, void (*dp_tx_ppeds_cfg_astidx_cache_mapping)(struct dp_soc *soc,
struct dp_vdev *vdev, struct dp_vdev *vdev,
bool peer_map); bool peer_map);