Search Linux Wireless

Re: [PATCH v2] ath10k: handle ieee80211 header and payload tracing separately

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Rajkumar Manoharan <rmanohar@xxxxxxxxxxxxxxxx> writes:

> For packet log, the transmitted frame 802.11 header alone is sufficient.
> Recording entire packet is also consuming lot of disk space. To optimize
> this, tx and rx data tracepoints are splitted into header and payload
> tracepoints.
>
> To record tx ieee80211 headers
>
>      trace-cmd record -e ath10k_tx_hdr
>
> To record complete packets
>
>      trace-cmd record -e ath10k_tx_hdr -e ath10k_tx_payload
>
> Cc: Michal Kazior <michal.kazior@xxxxxxxxx>
> Signed-off-by: Rajkumar Manoharan <rmanohar@xxxxxxxxxxxxxxxx>

[...]

> --- a/drivers/net/wireless/ath/ath10k/trace.h
> +++ b/drivers/net/wireless/ath/ath10k/trace.h
> @@ -341,7 +341,10 @@ TRACE_EVENT(ath10k_txrx_tx_unref,
>  	 )
>  );
>  
> -DECLARE_EVENT_CLASS(ath10k_data_event,
> +#define ATH10K_FRM_HDR_LEN  \
> +	ieee80211_hdrlen(((struct ieee80211_hdr *)data)->frame_control)

This macro does not look good. I would recommend to follow what Johannes
suggested:

"It would be worth hiding that inside the tracepoint's assign function,
so instead of passing data/len here you'd pass the full skb, or the full
skb data/skb len, like this:

ar, skb->data, skb->len

to both tracers. Then inside the tracer you can do the hdrlen check, and
that way move the code into the tracing so it's not hit when tracing is
disabled."

-- 
Kalle Valo
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Wireless Personal Area Network]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Hiking]     [MIPS Linux]     [ARM Linux]     [Linux RAID]

  Powered by Linux