qcacmn: Add support to enable tx hw latency stats at run time

This feature can be enabled runtime using sysfs interface.
Support is added to dump and clear the histogram stats.

The lower delay regions has to be more granular to indicate any
medium related issues for time sensitive XR applications.

Change-Id: I0a44a54d12d92ce016de349810cb2bedebaf9a58
CRs-Fixed: 2981006
This commit is contained in:
Yeshwanth Sriram Guntuka
2021-11-15 21:41:57 +05:30
committed by Madan Koyyalamudi
parent 3de51ff2c5
commit df666b7116
13 changed files with 515 additions and 103 deletions

View File

@@ -998,4 +998,41 @@ static inline bool dp_sawf_tag_valid_get(qdf_nbuf_t nbuf)
}
#endif
#ifdef HW_TX_DELAY_STATS_ENABLE
/**
* dp_tx_desc_set_ktimestamp() - set kernel timestamp in tx descriptor
* @vdev: DP vdev handle
* @tx_desc: tx descriptor
*
* Return: true when descriptor is timestamped, false otherwise
*/
static inline
bool dp_tx_desc_set_ktimestamp(struct dp_vdev *vdev,
struct dp_tx_desc_s *tx_desc)
{
if (qdf_unlikely(vdev->pdev->delay_stats_flag) ||
qdf_unlikely(vdev->pdev->soc->wlan_cfg_ctx->pext_stats_enabled) ||
qdf_unlikely(dp_tx_pkt_tracepoints_enabled()) ||
qdf_unlikely(vdev->pdev->soc->rdkstats_enabled) ||
qdf_unlikely(dp_is_vdev_tx_delay_stats_enabled(vdev))) {
tx_desc->timestamp = qdf_ktime_to_ms(qdf_ktime_real_get());
return true;
}
return false;
}
#else
static inline
bool dp_tx_desc_set_ktimestamp(struct dp_vdev *vdev,
struct dp_tx_desc_s *tx_desc)
{
if (qdf_unlikely(vdev->pdev->delay_stats_flag) ||
qdf_unlikely(vdev->pdev->soc->wlan_cfg_ctx->pext_stats_enabled) ||
qdf_unlikely(dp_tx_pkt_tracepoints_enabled()) ||
qdf_unlikely(vdev->pdev->soc->rdkstats_enabled)) {
tx_desc->timestamp = qdf_ktime_to_ms(qdf_ktime_real_get());
return true;
}
return false;
}
#endif
#endif