qcacmn: DP histogram print fixes
This change fixes the below issue. 1. Clear the histogram statistics per peer. 2. Separate out the Tx/Rx histogram prints. Change-Id: I5fc51f6bca14dc4c615c5501441e1a6b28bb0f02
This commit is contained in:
@@ -7775,6 +7775,22 @@ void dp_print_napi_stats(struct dp_soc *soc)
|
|||||||
hif_print_napi_stats(soc->hif_handle);
|
hif_print_napi_stats(soc->hif_handle);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef QCA_PEER_EXT_STATS
|
||||||
|
/**
|
||||||
|
* dp_txrx_host_peer_ext_stats_clr: Reinitialize the txrx peer ext stats
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
static inline void dp_txrx_host_peer_ext_stats_clr(struct dp_peer *peer)
|
||||||
|
{
|
||||||
|
if (peer->pext_stats)
|
||||||
|
qdf_mem_zero(peer->pext_stats, sizeof(*peer->pext_stats));
|
||||||
|
}
|
||||||
|
#else
|
||||||
|
static inline void dp_txrx_host_peer_ext_stats_clr(struct dp_peer *peer)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* dp_txrx_host_peer_stats_clr): Reinitialize the txrx peer stats
|
* dp_txrx_host_peer_stats_clr): Reinitialize the txrx peer stats
|
||||||
* @soc: Datapath soc
|
* @soc: Datapath soc
|
||||||
@@ -7795,8 +7811,11 @@ dp_txrx_host_peer_stats_clr(struct dp_soc *soc,
|
|||||||
rx_tid = &peer->rx_tid[tid];
|
rx_tid = &peer->rx_tid[tid];
|
||||||
DP_STATS_CLR(rx_tid);
|
DP_STATS_CLR(rx_tid);
|
||||||
}
|
}
|
||||||
|
|
||||||
DP_STATS_CLR(peer);
|
DP_STATS_CLR(peer);
|
||||||
|
|
||||||
|
dp_txrx_host_peer_ext_stats_clr(peer);
|
||||||
|
|
||||||
#if defined(FEATURE_PERPKT_INFO) && WDI_EVENT_ENABLE
|
#if defined(FEATURE_PERPKT_INFO) && WDI_EVENT_ENABLE
|
||||||
dp_wdi_event_handler(WDI_EVENT_UPDATE_DP_STATS, peer->vdev->pdev->soc,
|
dp_wdi_event_handler(WDI_EVENT_UPDATE_DP_STATS, peer->vdev->pdev->soc,
|
||||||
&peer->stats, peer->peer_id,
|
&peer->stats, peer->peer_id,
|
||||||
|
@@ -5524,8 +5524,8 @@ dp_accumulate_delay_tid_stats(struct dp_soc *soc,
|
|||||||
*
|
*
|
||||||
* Return: void
|
* Return: void
|
||||||
*/
|
*/
|
||||||
void dp_peer_print_delay_stats(struct dp_pdev *pdev,
|
void dp_peer_print_tx_delay_stats(struct dp_pdev *pdev,
|
||||||
struct dp_peer *peer)
|
struct dp_peer *peer)
|
||||||
{
|
{
|
||||||
struct cdp_peer_ext_stats *pext_stats;
|
struct cdp_peer_ext_stats *pext_stats;
|
||||||
struct dp_soc *soc = NULL;
|
struct dp_soc *soc = NULL;
|
||||||
@@ -5558,18 +5558,54 @@ void dp_peer_print_delay_stats(struct dp_pdev *pdev,
|
|||||||
&hist_stats, tid,
|
&hist_stats, tid,
|
||||||
CDP_HIST_TYPE_HW_COMP_DELAY);
|
CDP_HIST_TYPE_HW_COMP_DELAY);
|
||||||
dp_print_hist_stats(&hist_stats, CDP_HIST_TYPE_HW_COMP_DELAY);
|
dp_print_hist_stats(&hist_stats, CDP_HIST_TYPE_HW_COMP_DELAY);
|
||||||
qdf_mem_zero(&hist_stats, sizeof(*(&hist_stats)));
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* dp_peer_print_rx_delay_stats(): Print peer delay stats
|
||||||
|
* @soc: DP SoC handle
|
||||||
|
* @peer: DP peer handle
|
||||||
|
*
|
||||||
|
* Return: void
|
||||||
|
*/
|
||||||
|
void dp_peer_print_rx_delay_stats(struct dp_pdev *pdev,
|
||||||
|
struct dp_peer *peer)
|
||||||
|
{
|
||||||
|
struct cdp_peer_ext_stats *pext_stats;
|
||||||
|
struct dp_soc *soc = NULL;
|
||||||
|
struct cdp_hist_stats hist_stats;
|
||||||
|
uint8_t tid;
|
||||||
|
|
||||||
|
if (!pdev || !pdev->soc)
|
||||||
|
return;
|
||||||
|
|
||||||
|
soc = pdev->soc;
|
||||||
|
if (!wlan_cfg_is_peer_ext_stats_enabled(soc->wlan_cfg_ctx))
|
||||||
|
return;
|
||||||
|
|
||||||
|
pext_stats = peer->pext_stats;
|
||||||
|
if (!pext_stats)
|
||||||
|
return;
|
||||||
|
|
||||||
|
for (tid = 0; tid < CDP_MAX_DATA_TIDS; tid++) {
|
||||||
|
DP_PRINT_STATS("----TID: %d----", tid);
|
||||||
DP_PRINT_STATS("Rx Reap2stack Deliver Delay:");
|
DP_PRINT_STATS("Rx Reap2stack Deliver Delay:");
|
||||||
|
qdf_mem_zero(&hist_stats, sizeof(*(&hist_stats)));
|
||||||
dp_accumulate_delay_tid_stats(soc, pext_stats->delay_stats,
|
dp_accumulate_delay_tid_stats(soc, pext_stats->delay_stats,
|
||||||
&hist_stats, tid,
|
&hist_stats, tid,
|
||||||
CDP_HIST_TYPE_REAP_STACK);
|
CDP_HIST_TYPE_REAP_STACK);
|
||||||
dp_print_hist_stats(&hist_stats, CDP_HIST_TYPE_REAP_STACK);
|
dp_print_hist_stats(&hist_stats, CDP_HIST_TYPE_REAP_STACK);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#else
|
#else
|
||||||
static inline void dp_peer_print_delay_stats(struct dp_pdev *pdev,
|
static inline void dp_peer_print_tx_delay_stats(struct dp_pdev *pdev,
|
||||||
struct dp_peer *peer)
|
struct dp_peer *peer)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
static inline void dp_peer_print_rx_delay_stats(struct dp_pdev *pdev,
|
||||||
|
struct dp_peer *peer)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
@@ -5715,6 +5751,7 @@ void dp_print_peer_stats(struct dp_peer *peer)
|
|||||||
peer->stats.tx.tx_data_rate);
|
peer->stats.tx.tx_data_rate);
|
||||||
|
|
||||||
dp_print_jitter_stats(peer, pdev);
|
dp_print_jitter_stats(peer, pdev);
|
||||||
|
dp_peer_print_tx_delay_stats(pdev, peer);
|
||||||
|
|
||||||
DP_PRINT_STATS("Node Rx Stats:");
|
DP_PRINT_STATS("Node Rx Stats:");
|
||||||
DP_PRINT_STATS("Packets Sent To Stack = %d",
|
DP_PRINT_STATS("Packets Sent To Stack = %d",
|
||||||
@@ -5833,7 +5870,7 @@ void dp_print_peer_stats(struct dp_peer *peer)
|
|||||||
DP_PRINT_STATS("Multipass Rx Packet Drop = %d",
|
DP_PRINT_STATS("Multipass Rx Packet Drop = %d",
|
||||||
peer->stats.rx.multipass_rx_pkt_drop);
|
peer->stats.rx.multipass_rx_pkt_drop);
|
||||||
|
|
||||||
dp_peer_print_delay_stats(pdev, peer);
|
dp_peer_print_rx_delay_stats(pdev, peer);
|
||||||
}
|
}
|
||||||
|
|
||||||
void dp_print_per_ring_stats(struct dp_soc *soc)
|
void dp_print_per_ring_stats(struct dp_soc *soc)
|
||||||
|
Reference in New Issue
Block a user