mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-25 14:13:01 -04:00
qcacld-3.0: Add timestamp debug info in ol_tx_desc_t
Add descriptor timestamp debug info in ol_tx_desc_t and add APIs to set these values. Change-Id: I686fccff4268811474630dbea8369fabe82d1517 CRs-Fixed: 2333654
This commit is contained in:
parent
2a2037028e
commit
384a28ae48
5 changed files with 40 additions and 1 deletions
2
Kbuild
2
Kbuild
|
|
@ -2026,6 +2026,8 @@ cppflags-$(CONFIG_WLAN_FEATURE_LPSS) += -DWLAN_FEATURE_LPSS
|
|||
cppflags-$(CONFIG_DESC_DUP_DETECT_DEBUG) += -DDESC_DUP_DETECT_DEBUG
|
||||
cppflags-$(CONFIG_DEBUG_RX_RING_BUFFER) += -DDEBUG_RX_RING_BUFFER
|
||||
|
||||
cppflags-$(CONFIG_DESC_TIMESTAMP_DEBUG_INFO) += -DDESC_TIMESTAMP_DEBUG_INFO
|
||||
|
||||
cppflags-$(PANIC_ON_BUG) += -DPANIC_ON_BUG
|
||||
|
||||
cppflags-$(WLAN_WARN_ON_ASSERT) += -DWLAN_WARN_ON_ASSERT
|
||||
|
|
|
|||
|
|
@ -649,6 +649,7 @@ ifeq ($(CONFIG_SLUB_DEBUG_ON), y)
|
|||
CONFIG_MAX_LOGS_PER_SEC := 500
|
||||
CONFIG_SCHED_HISTORY_SIZE := 256
|
||||
CONFIG_UNIT_TEST := y
|
||||
CONFIG_DESC_TIMESTAMP_DEBUG_INFO := y
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_UNIT_TEST), y)
|
||||
|
|
|
|||
|
|
@ -80,6 +80,19 @@ static inline void ol_tx_desc_reset_timestamp(struct ol_tx_desc_t *tx_desc)
|
|||
}
|
||||
#endif
|
||||
|
||||
#ifdef DESC_TIMESTAMP_DEBUG_INFO
|
||||
static inline void ol_tx_desc_update_tx_ts(struct ol_tx_desc_t *tx_desc)
|
||||
{
|
||||
tx_desc->desc_debug_info.prev_tx_ts = tx_desc
|
||||
->desc_debug_info.curr_tx_ts;
|
||||
tx_desc->desc_debug_info.curr_tx_ts = qdf_get_log_timestamp();
|
||||
}
|
||||
#else
|
||||
static inline void ol_tx_desc_update_tx_ts(struct ol_tx_desc_t *tx_desc)
|
||||
{
|
||||
}
|
||||
#endif
|
||||
|
||||
/**
|
||||
* ol_tx_desc_vdev_update() - vedv assign.
|
||||
* @tx_desc: tx descriptor pointer
|
||||
|
|
@ -144,6 +157,7 @@ struct ol_tx_desc_t *ol_tx_desc_alloc(struct ol_txrx_pdev_t *pdev,
|
|||
ol_tx_desc_compute_delay(tx_desc);
|
||||
ol_tx_desc_vdev_update(tx_desc, vdev);
|
||||
ol_tx_desc_count_inc(vdev);
|
||||
ol_tx_desc_update_tx_ts(tx_desc);
|
||||
qdf_atomic_inc(&tx_desc->ref_cnt);
|
||||
}
|
||||
qdf_spin_unlock_bh(&pdev->tx_mutex);
|
||||
|
|
@ -214,6 +228,7 @@ struct ol_tx_desc_t *ol_tx_desc_alloc(struct ol_txrx_pdev_t *pdev,
|
|||
}
|
||||
ol_tx_desc_sanity_checks(pdev, tx_desc);
|
||||
ol_tx_desc_compute_delay(tx_desc);
|
||||
ol_tx_desc_update_tx_ts(tx_desc);
|
||||
ol_tx_desc_vdev_update(tx_desc, vdev);
|
||||
qdf_atomic_inc(&tx_desc->ref_cnt);
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -105,6 +105,17 @@ ol_tx_target_credit_incr_int(struct ol_txrx_pdev_t *pdev, int delta)
|
|||
}
|
||||
#endif
|
||||
|
||||
#ifdef DESC_TIMESTAMP_DEBUG_INFO
|
||||
static inline void ol_tx_desc_update_comp_ts(struct ol_tx_desc_t *tx_desc)
|
||||
{
|
||||
tx_desc->desc_debug_info.last_comp_ts = qdf_get_log_timestamp();
|
||||
}
|
||||
#else
|
||||
static inline void ol_tx_desc_update_comp_ts(struct ol_tx_desc_t *tx_desc)
|
||||
{
|
||||
}
|
||||
#endif
|
||||
|
||||
#if defined(CONFIG_HL_SUPPORT) && defined(QCA_HL_NETDEV_FLOW_CONTROL)
|
||||
void ol_tx_flow_ct_unpause_os_q(ol_txrx_pdev_handle pdev)
|
||||
{
|
||||
|
|
@ -773,6 +784,7 @@ ol_tx_completion_handler(ol_txrx_pdev_handle pdev,
|
|||
}
|
||||
tx_desc = ol_tx_desc_find(pdev, tx_desc_id);
|
||||
qdf_assert(tx_desc);
|
||||
ol_tx_desc_update_comp_ts(tx_desc);
|
||||
tx_desc->status = status;
|
||||
netbuf = tx_desc->netbuf;
|
||||
|
||||
|
|
@ -1096,6 +1108,7 @@ ol_tx_inspect_handler(ol_txrx_pdev_handle pdev,
|
|||
}
|
||||
tx_desc = ol_tx_desc_find(pdev, tx_desc_id);
|
||||
qdf_assert(tx_desc);
|
||||
ol_tx_desc_update_comp_ts(tx_desc);
|
||||
netbuf = tx_desc->netbuf;
|
||||
|
||||
/* find the "vdev" this tx_desc belongs to */
|
||||
|
|
@ -1122,7 +1135,6 @@ ol_tx_inspect_handler(ol_txrx_pdev_handle pdev,
|
|||
lcl_freelist, tx_desc_last,
|
||||
htt_tx_status_ok,
|
||||
is_tx_desc_freed);
|
||||
|
||||
#ifdef QCA_SUPPORT_TXDESC_SANITY_CHECKS
|
||||
if (!is_tx_desc_freed) {
|
||||
tx_desc->pkt_type = ol_tx_frm_freed;
|
||||
|
|
|
|||
|
|
@ -164,6 +164,15 @@ struct ol_tx_desc_t {
|
|||
#ifdef QCA_COMPUTE_TX_DELAY
|
||||
uint32_t entry_timestamp_ticks;
|
||||
#endif
|
||||
|
||||
#ifdef DESC_TIMESTAMP_DEBUG_INFO
|
||||
struct {
|
||||
uint64_t prev_tx_ts;
|
||||
uint64_t curr_tx_ts;
|
||||
uint64_t last_comp_ts;
|
||||
} desc_debug_info;
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Allow tx descriptors to be stored in (doubly-linked) lists.
|
||||
* This is mainly used for HL tx queuing and scheduling, but is
|
||||
|
|
|
|||
Loading…
Reference in a new issue