mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-12-16 15:34:48 +08:00
ath10k: add tracing for tx info
The tx info such as msdu_id, frame len, vdev id and tid are reported to user space by tracepoint. This is useful for collecting tx statistics. Signed-off-by: Rajkumar Manoharan <rmanohar@qti.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
This commit is contained in:
parent
a0883cf7e7
commit
d1e50f4703
@ -557,6 +557,7 @@ int ath10k_htt_tx(struct ath10k_htt *htt, struct sk_buff *msdu)
|
||||
skb_cb->htt.txbuf->cmd_tx.frags_paddr = __cpu_to_le32(frags_paddr);
|
||||
skb_cb->htt.txbuf->cmd_tx.peerid = __cpu_to_le32(HTT_INVALID_PEERID);
|
||||
|
||||
trace_ath10k_htt_tx(ar, msdu_id, msdu->len, vdev_id, tid);
|
||||
ath10k_dbg(ar, ATH10K_DBG_HTT,
|
||||
"htt tx flags0 %hhu flags1 %hu len %d id %hu frags_paddr %08x, msdu_paddr %08x vdev %hhu tid %hhu\n",
|
||||
flags0, flags1, msdu->len, msdu_id, frags_paddr,
|
||||
|
@ -310,6 +310,66 @@ TRACE_EVENT(ath10k_htt_rx_desc,
|
||||
__entry->len
|
||||
)
|
||||
);
|
||||
|
||||
TRACE_EVENT(ath10k_htt_tx,
|
||||
TP_PROTO(struct ath10k *ar, u16 msdu_id, u16 msdu_len,
|
||||
u8 vdev_id, u8 tid),
|
||||
|
||||
TP_ARGS(ar, msdu_id, msdu_len, vdev_id, tid),
|
||||
|
||||
TP_STRUCT__entry(
|
||||
__string(device, dev_name(ar->dev))
|
||||
__string(driver, dev_driver_string(ar->dev))
|
||||
__field(u16, msdu_id)
|
||||
__field(u16, msdu_len)
|
||||
__field(u8, vdev_id)
|
||||
__field(u8, tid)
|
||||
),
|
||||
|
||||
TP_fast_assign(
|
||||
__assign_str(device, dev_name(ar->dev));
|
||||
__assign_str(driver, dev_driver_string(ar->dev));
|
||||
__entry->msdu_id = msdu_id;
|
||||
__entry->msdu_len = msdu_len;
|
||||
__entry->vdev_id = vdev_id;
|
||||
__entry->tid = tid;
|
||||
),
|
||||
|
||||
TP_printk(
|
||||
"%s %s msdu_id %d msdu_len %d vdev_id %d tid %d",
|
||||
__get_str(driver),
|
||||
__get_str(device),
|
||||
__entry->msdu_id,
|
||||
__entry->msdu_len,
|
||||
__entry->vdev_id,
|
||||
__entry->tid
|
||||
)
|
||||
);
|
||||
|
||||
TRACE_EVENT(ath10k_txrx_tx_unref,
|
||||
TP_PROTO(struct ath10k *ar, u16 msdu_id),
|
||||
|
||||
TP_ARGS(ar, msdu_id),
|
||||
|
||||
TP_STRUCT__entry(
|
||||
__string(device, dev_name(ar->dev))
|
||||
__string(driver, dev_driver_string(ar->dev))
|
||||
__field(u16, msdu_id)
|
||||
),
|
||||
|
||||
TP_fast_assign(
|
||||
__assign_str(device, dev_name(ar->dev));
|
||||
__assign_str(driver, dev_driver_string(ar->dev));
|
||||
__entry->msdu_id = msdu_id;
|
||||
),
|
||||
|
||||
TP_printk(
|
||||
"%s %s msdu_id %d",
|
||||
__get_str(driver),
|
||||
__get_str(device),
|
||||
__entry->msdu_id
|
||||
)
|
||||
);
|
||||
#endif /* _TRACE_H_ || TRACE_HEADER_MULTI_READ*/
|
||||
|
||||
/* we don't want to use include/trace/events */
|
||||
|
@ -78,6 +78,7 @@ void ath10k_txrx_tx_unref(struct ath10k_htt *htt,
|
||||
|
||||
info = IEEE80211_SKB_CB(msdu);
|
||||
memset(&info->status, 0, sizeof(info->status));
|
||||
trace_ath10k_txrx_tx_unref(ar, tx_done->msdu_id);
|
||||
|
||||
if (tx_done->discard) {
|
||||
ieee80211_free_txskb(htt->ar->hw, msdu);
|
||||
|
Loading…
Reference in New Issue
Block a user