qcacmn: aggregate vdev stats in to mlo ctxt at vdev detach

aggregate vdev stats in to mlo ctxt at vdev detach

Change-Id: I002e48e4b95a32a0ff58e3e1cc26ea97d94f7a5d
CRs-Fixed: 3572527
This commit is contained in:
Mukul Dhiman
2023-08-11 18:01:56 +05:30
committed by Rahul Choudhary
parent f06f5e0791
commit 0ad05f4a1a
4 changed files with 31 additions and 0 deletions

View File

@@ -3005,6 +3005,11 @@ QDF_STATUS dp_mlo_dev_ctxt_vdev_attach(struct cdp_soc_t *soc_hdl,
/* ref for holding MLO ctxt in be_vdev */ /* ref for holding MLO ctxt in be_vdev */
dp_mlo_dev_get_ref(mlo_dev_ctxt, DP_MOD_ID_CHILD); dp_mlo_dev_get_ref(mlo_dev_ctxt, DP_MOD_ID_CHILD);
/* Save vdev stats in MLO dev ctx */
dp_update_mlo_ctxt_stats(&mlo_dev_ctxt->stats, &vdev->stats);
/* reset vdev stats to zero */
qdf_mem_set(&vdev->stats, sizeof(struct cdp_vdev_stats), 0);
/* unref for mlo ctxt taken at the start of this function */ /* unref for mlo ctxt taken at the start of this function */
dp_mlo_dev_ctxt_unref_delete(mlo_dev_ctxt, DP_MOD_ID_MLO_DEV); dp_mlo_dev_ctxt_unref_delete(mlo_dev_ctxt, DP_MOD_ID_MLO_DEV);

View File

@@ -811,6 +811,22 @@ static inline uintptr_t dp_cc_desc_find(struct dp_soc *soc,
spt_va_id * DP_CC_HW_READ_BYTES))); spt_va_id * DP_CC_HW_READ_BYTES)));
} }
/**
* dp_update_mlo_ctxt_stats() - aggregate stats from mlo ctx
* @buf: vdev stats buf
* @mlo_ctxt_stats: mlo ctxt stats
*
* return: void
*/
static inline
void dp_update_mlo_ctxt_stats(void *buf,
struct cdp_vdev_stats *mlo_ctxt_stats)
{
struct cdp_vdev_stats *tgt_vdev_stats = (struct cdp_vdev_stats *)buf;
DP_UPDATE_VDEV_STATS(tgt_vdev_stats, mlo_ctxt_stats);
}
#ifdef WLAN_FEATURE_NEAR_FULL_IRQ #ifdef WLAN_FEATURE_NEAR_FULL_IRQ
/** /**
* enum dp_srng_near_full_levels - SRNG Near FULL levels * enum dp_srng_near_full_levels - SRNG Near FULL levels

View File

@@ -925,6 +925,9 @@ static QDF_STATUS dp_mlo_get_mld_vdev_stats(struct cdp_soc_t *soc_hdl,
DP_LINK_VDEV_ITER); DP_LINK_VDEV_ITER);
} }
/* Aggregate vdev stats from MLO ctx for detached MLO Links */
dp_update_mlo_ctxt_stats(buf, &vdev_be->mlo_dev_ctxt->stats);
complete: complete:
dp_vdev_unref_delete(soc, vdev, DP_MOD_ID_GENERIC_STATS); dp_vdev_unref_delete(soc, vdev, DP_MOD_ID_GENERIC_STATS);
return ret; return ret;

View File

@@ -2357,6 +2357,13 @@ void dp_update_vdev_stats_on_peer_unmap(struct dp_vdev *vdev,
_tgtobj->rx_i.routed_eapol_pkt.bytes += \ _tgtobj->rx_i.routed_eapol_pkt.bytes += \
_srcobj->rx_i.routed_eapol_pkt.bytes; \ _srcobj->rx_i.routed_eapol_pkt.bytes; \
} while (0) } while (0)
#define DP_UPDATE_VDEV_STATS(_tgtobj, _srcobj) \
do { \
DP_UPDATE_INGRESS_STATS(_tgtobj, _srcobj); \
DP_UPDATE_VDEV_STATS_FOR_UNMAPPED_PEERS(_tgtobj, _srcobj); \
} while (0)
/** /**
* dp_peer_find_attach() - Allocates memory for peer objects * dp_peer_find_attach() - Allocates memory for peer objects
* @soc: SoC handle * @soc: SoC handle