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:

committed by
Madan Koyyalamudi

orang tua
3de51ff2c5
melakukan
df666b7116
@@ -92,6 +92,7 @@
|
||||
#define CDP_DISCONNECT_STATS 25
|
||||
#define CDP_DP_RX_FISA_STATS 26
|
||||
#define CDP_DP_SWLM_STATS 27
|
||||
#define CDP_DP_TX_HW_LATENCY_STATS 28
|
||||
|
||||
#define WME_AC_TO_TID(_ac) ( \
|
||||
((_ac) == WME_AC_VO) ? 6 : \
|
||||
|
@@ -904,4 +904,55 @@ cdp_get_pdev_tx_capture_stats(ol_txrx_soc_handle soc, uint8_t pdev_id,
|
||||
stats);
|
||||
}
|
||||
#endif /* WLAN_TX_PKT_CAPTURE_ENH */
|
||||
|
||||
#ifdef HW_TX_DELAY_STATS_ENABLE
|
||||
/**
|
||||
* cdp_enable_disable_vdev_tx_delay_stats() - Start/Stop tx delay stats capture
|
||||
* @soc: soc handle
|
||||
* @vdev_id: vdev id
|
||||
* @value: value to be set
|
||||
*
|
||||
* Return: None
|
||||
*/
|
||||
static inline void
|
||||
cdp_enable_disable_vdev_tx_delay_stats(ol_txrx_soc_handle soc, uint8_t vdev_id,
|
||||
uint8_t value)
|
||||
{
|
||||
if (!soc || !soc->ops) {
|
||||
dp_cdp_debug("Invalid Instance");
|
||||
return;
|
||||
}
|
||||
|
||||
if (!soc->ops->host_stats_ops ||
|
||||
!soc->ops->host_stats_ops->enable_disable_vdev_tx_delay_stats)
|
||||
return;
|
||||
|
||||
soc->ops->host_stats_ops->enable_disable_vdev_tx_delay_stats(soc,
|
||||
vdev_id,
|
||||
value);
|
||||
}
|
||||
|
||||
/**
|
||||
* cdp_vdev_is_tx_delay_stats_enabled() - Check if the Tx delay stats
|
||||
* is enabled or not for the given vdev_id
|
||||
* @soc: soc handle
|
||||
* @vdev_id: vdev_id
|
||||
*
|
||||
* Returns: 1 if enabled, 0 if disabled
|
||||
*/
|
||||
static inline uint8_t
|
||||
cdp_vdev_is_tx_delay_stats_enabled(ol_txrx_soc_handle soc, uint8_t vdev_id)
|
||||
{
|
||||
if (!soc || !soc->ops || !soc->ops->host_stats_ops) {
|
||||
dp_cdp_debug("Invalid Instance:");
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (soc->ops->host_stats_ops->is_tx_delay_stats_enabled)
|
||||
return soc->ops->host_stats_ops->is_tx_delay_stats_enabled(soc,
|
||||
vdev_id);
|
||||
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
#endif /* _CDP_TXRX_HOST_STATS_H_ */
|
||||
|
@@ -1089,6 +1089,14 @@ struct cdp_host_stats_ops {
|
||||
(*get_pdev_tx_capture_stats)(struct cdp_soc_t *soc, uint8_t pdev_id,
|
||||
struct cdp_pdev_tx_capture_stats *stats);
|
||||
#endif /* WLAN_TX_PKT_CAPTURE_ENH */
|
||||
#ifdef HW_TX_DELAY_STATS_ENABLE
|
||||
void
|
||||
(*enable_disable_vdev_tx_delay_stats)(struct cdp_soc_t *soc,
|
||||
uint8_t vdev_id,
|
||||
uint8_t value);
|
||||
uint8_t (*is_tx_delay_stats_enabled)(struct cdp_soc_t *soc_hdl,
|
||||
uint8_t vdev_id);
|
||||
#endif
|
||||
};
|
||||
|
||||
struct cdp_wds_ops {
|
||||
|
@@ -1781,6 +1781,7 @@ struct cdp_rx_ingress_stats {
|
||||
* @tx: cdp tx stats
|
||||
* @rx: cdp rx stats
|
||||
* @tso_stats: tso stats
|
||||
* @tid_tx_stats: tid tx stats
|
||||
*/
|
||||
struct cdp_vdev_stats {
|
||||
struct cdp_tx_ingress_stats tx_i;
|
||||
@@ -1788,6 +1789,10 @@ struct cdp_vdev_stats {
|
||||
struct cdp_tx_stats tx;
|
||||
struct cdp_rx_stats rx;
|
||||
struct cdp_tso_stats tso_stats;
|
||||
#ifdef HW_TX_DELAY_STATS_ENABLE
|
||||
struct cdp_tid_tx_stats tid_tx_stats[CDP_MAX_TX_COMP_RINGS]
|
||||
[CDP_MAX_DATA_TIDS];
|
||||
#endif
|
||||
};
|
||||
|
||||
/* struct cdp_calibr_stats - Calibrated stats
|
||||
|
Reference in New Issue
Block a user