History

nl80211: support per-TID station statistics

The base for the current statistics is pretty mixed up, support exporting RX/TX statistics for MSDUs per TID. This (currently) covers received MSDUs, transmitted MSDUs and retries/failures thereof. Doing it per TID for MSDUs makes more sense than say only per AC because it's symmetric - we could export per-AC statistics for all frames (which AC we used for transmission can be determined also for management frames) but per TID is better and usually data frames are really the ones we care about. Also, on RX we can't determine the AC - but we do know the TID for any QoS MPDU we received.

Johannes Berg committed 11 years ago

Commit 6de39801 parent 8d791363 files · +93 −0Browse files

Showing the changes to include/uapi/linux (1 of 3 files). Show all

Unified · Split

include/uapi/linux/nl80211.h+31−0
@@ -2384,6 +2384,11 @@ enum nl80211_sta_bss_param { · 2383 unmodified lines
23842384 * @NL80211_STA_INFO_BEACON_RX: number of beacons received from this peer (u64)
23852385 * @NL80211_STA_INFO_BEACON_SIGNAL_AVG: signal strength average
23862386 * for beacons only (u8, dBm)
2387+ * @NL80211_STA_INFO_TID_STATS: per-TID statistics (see &enum nl80211_tid_stats)
2388+ * This is a nested attribute where each the inner attribute number is the
2389+ * TID+1 and the special TID 16 (i.e. value 17) is used for non-QoS frames;
2390+ * each one of those is again nested with &enum nl80211_tid_stats
2391+ * attributes carrying the actual values.
23872392 * @__NL80211_STA_INFO_AFTER_LAST: internal
23882393 * @NL80211_STA_INFO_MAX: highest possible station info attribute
23892394 */
@@ -2419,12 +2424,38 @@ enum nl80211_sta_info { · 29 unmodified lines
24192424 NL80211_STA_INFO_RX_DROP_MISC,
24202425 NL80211_STA_INFO_BEACON_RX,
24212426 NL80211_STA_INFO_BEACON_SIGNAL_AVG,
2427+ NL80211_STA_INFO_TID_STATS,
24222428
24232429 /* keep last */
24242430 __NL80211_STA_INFO_AFTER_LAST,
24252431 NL80211_STA_INFO_MAX = __NL80211_STA_INFO_AFTER_LAST - 1
24262432 };
24272433
2434+/**
2435+ * enum nl80211_tid_stats - per TID statistics attributes
2436+ * @__NL80211_TID_STATS_INVALID: attribute number 0 is reserved
2437+ * @NL80211_TID_STATS_RX_MSDU: number of MSDUs received (u64)
2438+ * @NL80211_TID_STATS_TX_MSDU: number of MSDUs transmitted (or
2439+ * attempted to transmit; u64)
2440+ * @NL80211_TID_STATS_TX_MSDU_RETRIES: number of retries for
2441+ * transmitted MSDUs (not counting the first attempt; u64)
2442+ * @NL80211_TID_STATS_TX_MSDU_FAILED: number of failed transmitted
2443+ * MSDUs (u64)
2444+ * @NUM_NL80211_TID_STATS: number of attributes here
2445+ * @NL80211_TID_STATS_MAX: highest numbered attribute here
2446+ */
2447+enum nl80211_tid_stats {
2448+ __NL80211_TID_STATS_INVALID,
2449+ NL80211_TID_STATS_RX_MSDU,
2450+ NL80211_TID_STATS_TX_MSDU,
2451+ NL80211_TID_STATS_TX_MSDU_RETRIES,
2452+ NL80211_TID_STATS_TX_MSDU_FAILED,
2453+
2454+ /* keep last */
2455+ NUM_NL80211_TID_STATS,
2456+ NL80211_TID_STATS_MAX = NUM_NL80211_TID_STATS - 1
2457+};
2458+
24282459 /**
24292460 * enum nl80211_mpath_flags - nl80211 mesh path flags
24302461 *