linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ath10k: add tracing for tx ieee80211 header
@ 2014-10-28 16:48 Rajkumar Manoharan
  2014-10-28 16:59 ` Johannes Berg
  0 siblings, 1 reply; 3+ messages in thread
From: Rajkumar Manoharan @ 2014-10-28 16:48 UTC (permalink / raw)
  To: ath10k; +Cc: linux-wireless, Rajkumar Manoharan, Michal Kazior

For packet log, the transmitted frame 802.11 header alone is sufficient.
Recording entire packet is also consuming lot of disk space. To
optimize, add tracepoints for sending tx-ed 802.11 headers alone.

Cc: Michal Kazior <michal.kazior@tieto.com>
Signed-off-by: Rajkumar Manoharan <rmanohar@qti.qualcomm.com>
---
 drivers/net/wireless/ath/ath10k/htt_tx.c |  1 +
 drivers/net/wireless/ath/ath10k/trace.h  | 16 ++++++++++++++++
 drivers/net/wireless/ath/ath10k/wmi.c    |  3 +++
 3 files changed, 20 insertions(+)

diff --git a/drivers/net/wireless/ath/ath10k/htt_tx.c b/drivers/net/wireless/ath/ath10k/htt_tx.c
index b0df470..91f8fc1 100644
--- a/drivers/net/wireless/ath/ath10k/htt_tx.c
+++ b/drivers/net/wireless/ath/ath10k/htt_tx.c
@@ -565,6 +565,7 @@ int ath10k_htt_tx(struct ath10k_htt *htt, struct sk_buff *msdu)
 	ath10k_dbg_dump(ar, ATH10K_DBG_HTT_DUMP, NULL, "htt tx msdu: ",
 			msdu->data, msdu->len);
 	trace_ath10k_htt_tx_msdu(ar, msdu->data, msdu->len);
+	trace_ath10k_htt_tx_msdu_hdr(ar, hdr, sizeof(*hdr));
 
 	sg_items[0].transfer_id = 0;
 	sg_items[0].transfer_context = NULL;
diff --git a/drivers/net/wireless/ath/ath10k/trace.h b/drivers/net/wireless/ath/ath10k/trace.h
index b9a2ba6..368376a 100644
--- a/drivers/net/wireless/ath/ath10k/trace.h
+++ b/drivers/net/wireless/ath/ath10k/trace.h
@@ -392,6 +392,22 @@ DEFINE_EVENT(ath10k_data_event, ath10k_htt_rx_desc,
 	     TP_PROTO(struct ath10k *ar, void *data, size_t len),
 	     TP_ARGS(ar, data, len)
 );
+
+DEFINE_EVENT(ath10k_data_event, ath10k_htt_tx_msdu_hdr,
+	     TP_PROTO(struct ath10k *ar, void *data, size_t len),
+	     TP_ARGS(ar, data, len)
+);
+
+DEFINE_EVENT(ath10k_data_event, ath10k_wmi_mgmt_tx_hdr,
+	     TP_PROTO(struct ath10k *ar, void *data, size_t len),
+	     TP_ARGS(ar, data, len)
+);
+
+DEFINE_EVENT(ath10k_data_event, ath10k_wmi_bcn_tx_hdr,
+	     TP_PROTO(struct ath10k *ar, void *data, size_t len),
+	     TP_ARGS(ar, data, len)
+);
+
 #endif /* _TRACE_H_ || TRACE_HEADER_MULTI_READ*/
 
 /* we don't want to use include/trace/events */
diff --git a/drivers/net/wireless/ath/ath10k/wmi.c b/drivers/net/wireless/ath/ath10k/wmi.c
index ae746ce..f169ae8 100644
--- a/drivers/net/wireless/ath/ath10k/wmi.c
+++ b/drivers/net/wireless/ath/ath10k/wmi.c
@@ -835,6 +835,7 @@ int ath10k_wmi_mgmt_tx(struct ath10k *ar, struct sk_buff *skb)
 		   wmi_skb, wmi_skb->len, fc & IEEE80211_FCTL_FTYPE,
 		   fc & IEEE80211_FCTL_STYPE);
 	trace_ath10k_wmi_mgmt_tx(ar, skb->data, skb->len);
+	trace_ath10k_wmi_mgmt_tx_hdr(ar, hdr, sizeof(*hdr));
 
 	/* Send the management frame buffer to the target */
 	ret = ath10k_wmi_cmd_send(ar, wmi_skb, ar->wmi.cmd->mgmt_tx_cmdid);
@@ -1894,6 +1895,8 @@ static void ath10k_wmi_event_host_swba(struct ath10k *ar, struct sk_buff *skb)
 		arvif->beacon_sent = false;
 
 		trace_ath10k_wmi_bcn_tx(ar, bcn->data, bcn->len);
+		trace_ath10k_wmi_bcn_tx_hdr(ar, bcn->data,
+					    sizeof(struct ieee80211_hdr));
 		ath10k_wmi_tx_beacon_nowait(arvif);
 skip:
 		spin_unlock_bh(&ar->data_lock);
-- 
2.1.2


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] ath10k: add tracing for tx ieee80211 header
  2014-10-28 16:48 [PATCH] ath10k: add tracing for tx ieee80211 header Rajkumar Manoharan
@ 2014-10-28 16:59 ` Johannes Berg
  2014-10-29  5:46   ` Rajkumar Manoharan
  0 siblings, 1 reply; 3+ messages in thread
From: Johannes Berg @ 2014-10-28 16:59 UTC (permalink / raw)
  To: Rajkumar Manoharan; +Cc: ath10k, linux-wireless, Michal Kazior

On Tue, 2014-10-28 at 22:18 +0530, Rajkumar Manoharan wrote:
> For packet log, the transmitted frame 802.11 header alone is sufficient.
> Recording entire packet is also consuming lot of disk space. To
> optimize, add tracepoints for sending tx-ed 802.11 headers alone.

FWIW, in iwlwifi I made the data portion (only!) a separate tracing
subsystem, so that you can do

trace-cmd record -e iwlwifi

to get the hdrs, and

trace-cmd record -e iwlwifi -e iwlwifi_data

to get the hdrs, and the data, and then I put the two together in
userspace. That way, "-e iwlwifi" gets most useful stuff, and adding -e
iwlwifi_data when needed still has no duplication.

With what you're suggesting, it will be difficult to control tracing to
do exactly what's needed.

Anyway, I don't really care, but this just caught my eye.

johannes


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] ath10k: add tracing for tx ieee80211 header
  2014-10-28 16:59 ` Johannes Berg
@ 2014-10-29  5:46   ` Rajkumar Manoharan
  0 siblings, 0 replies; 3+ messages in thread
From: Rajkumar Manoharan @ 2014-10-29  5:46 UTC (permalink / raw)
  To: Johannes Berg; +Cc: ath10k, linux-wireless, Michal Kazior

On Tue, Oct 28, 2014 at 05:59:39PM +0100, Johannes Berg wrote:
> On Tue, 2014-10-28 at 22:18 +0530, Rajkumar Manoharan wrote:
> > For packet log, the transmitted frame 802.11 header alone is sufficient.
> > Recording entire packet is also consuming lot of disk space. To
> > optimize, add tracepoints for sending tx-ed 802.11 headers alone.
> 
> FWIW, in iwlwifi I made the data portion (only!) a separate tracing
> subsystem, so that you can do
> 
> trace-cmd record -e iwlwifi
> 
> to get the hdrs, and
> 
> trace-cmd record -e iwlwifi -e iwlwifi_data
> 
> to get the hdrs, and the data, and then I put the two together in
> userspace. That way, "-e iwlwifi" gets most useful stuff, and adding -e
> iwlwifi_data when needed still has no duplication.
> 
> With what you're suggesting, it will be difficult to control tracing to
> do exactly what's needed.
> 
> Anyway, I don't really care, but this just caught my eye.
> 
Thanks for your feedback. Will send updated patch.

-Rajkumar

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2014-10-29  5:44 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-10-28 16:48 [PATCH] ath10k: add tracing for tx ieee80211 header Rajkumar Manoharan
2014-10-28 16:59 ` Johannes Berg
2014-10-29  5:46   ` Rajkumar Manoharan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).