wiki:802.11/wlan_exp/log

Version 1 (modified by murphpo, 8 years ago) (diff)

--

The 802.11 Reference Design integrates a logging system which can record details of nearly any event that occurs at the node. This system is designed to support MAC and PHY experiments that require a more detailed view of the node's operation than aggregate Tx/Rx statistics.

The logging framework is flexible, designed to record log entries of arbirtary length and type. The MAC code in CPU High is responsible for defining the log entry types and populating each log entry at run time. The reference code for CPU High defines a number of useful log entry types and implements logging of many run time events, including all Tx and Rx activity. Users can define additional log entry types or modify existing types to support their experiment.

Log Storage

The log is stored in a pre-allocated region of DRAM in each WARP v3 node. As of 802.11 Reference Design v0.9 each node dedicates ~960 MB of DRAM for log storage. The remaining 40 MB of DRAM is set aside for the Tx packet queue and user scratch space.

Log Entry Format

Each log entry consists of two parts:

  • Log entry header: 8-byte header composed of four fields described below. The header format is defined in the entry_header struct in wlan_mac_event_log.h.
    • Delimiter (2 bytes): a "magic" value defined by the logging system to sanity-check log entries during retrieval and parsing
    • Sequence number (2 bytes): an auto-incremented value inserted by the logging code. This should only be used for sanity-checking log contents, as the 16-bit value will definitely wrap in long logs
    • Entry type ID (2 bytes): User-supplied entry type ID. The value 0 is reserved - all other values are valid.
    • Entry length (2 bytes): Length of user-supplied log data, in bytes. Must be in [0, 65535], inclusive.
  • Log data: log data supplied by the application. The logging system performs no processing of log data - user code must enforce whatever structure is required by the application.