net80211 ALQ logging
Contents
Overview
The net80211 ALQ logging routine(s) were something added by AdrianChadd around 2011/2012 to facilitate adding event tracing to the net80211 stack and drivers. The ath(4) driver implements its own ALQ support (see sys/dev/ath/if_ath_alq.[ch]). The desire is to provide a single serialised tracing method between wireless stack and drivers to aid in debugging both.
Interface
The single entry point is ieee80211_alq_log(). It takes:
- ic - the net80211 common structure;
- vap - the wireless VAP
- op - the operation ID (16 bits)
- flags - a 32 bit flags field
- srcid - net80211, driver identifier (16 bits)
- src / len - payload to log
The intention is that high throughput net80211 handling would optionally generate net80211 binary trace logs - such as encryption/decryption status, per-packet transmit handling, per-packet receive handling, receive A-MPDU reordering - which a tool would then decode. It could also capture/generate said binary data on an embedded device and then decode it on a workstation.
Drivers would then also call ieee80211_alq_log() for their trace data, but set the source id to a unique per-driver ID and then populate the op, flags and payload with their own information. The same tool could then decode those fields as appropriate.
TODO
- Implement a couple of net80211 trace operations - such as A-MPDU RX reordering
- Implement a tool to stream and decode the ALQ binary data
- Migrate the ath(4) ALQ framework to use the net80211 ALQ framework
- Implement this tracing in other drivers - firmware drivers such as iwn(4) would be an ideal candidate.