aboutsummaryrefslogtreecommitdiffstats
path: root/include/uapi/linux
diff options
context:
space:
mode:
authorToke Høiland-Jørgensen <toke@toke.dk>2018-05-08 07:03:50 -0400
committerJohannes Berg <johannes.berg@intel.com>2018-05-08 07:19:24 -0400
commit52539ca89f365d3db530535fbffa88a3cca4d2ec (patch)
tree5bfc75ba1383976149d0c99a3f87bb9ef69af4e8 /include/uapi/linux
parentcc60dbbfed8ff0bd4c530ee48e9e915333a35470 (diff)
cfg80211: Expose TXQ stats and parameters to userspace
This adds support for exporting the mac80211 TXQ stats via nl80211 by way of a nested TXQ stats attribute, as well as for configuring the quantum and limits that were previously only changeable through debugfs. This commit adds just the nl80211 API, a subsequent commit adds support to mac80211 itself. Signed-off-by: Toke Høiland-Jørgensen <toke@toke.dk> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'include/uapi/linux')
-rw-r--r--include/uapi/linux/nl80211.h58
1 files changed, 58 insertions, 0 deletions
diff --git a/include/uapi/linux/nl80211.h b/include/uapi/linux/nl80211.h
index 8e55b63ed3ff..5e67e3444aba 100644
--- a/include/uapi/linux/nl80211.h
+++ b/include/uapi/linux/nl80211.h
@@ -2226,6 +2226,16 @@ enum nl80211_commands {
2226 * @NL80211_ATTR_NSS: Station's New/updated RX_NSS value notified using this 2226 * @NL80211_ATTR_NSS: Station's New/updated RX_NSS value notified using this
2227 * u8 attribute. This is used with %NL80211_CMD_STA_OPMODE_CHANGED. 2227 * u8 attribute. This is used with %NL80211_CMD_STA_OPMODE_CHANGED.
2228 * 2228 *
2229 * @NL80211_ATTR_TXQ_STATS: TXQ statistics (nested attribute, see &enum
2230 * nl80211_txq_stats)
2231 * @NL80211_ATTR_TXQ_LIMIT: Total packet limit for the TXQ queues for this phy.
2232 * The smaller of this and the memory limit is enforced.
2233 * @NL80211_ATTR_TXQ_MEMORY_LIMIT: Total memory memory limit (in bytes) for the
2234 * TXQ queues for this phy. The smaller of this and the packet limit is
2235 * enforced.
2236 * @NL80211_ATTR_TXQ_QUANTUM: TXQ scheduler quantum (bytes). Number of bytes
2237 * a flow is assigned on each round of the DRR scheduler.
2238 *
2229 * @NUM_NL80211_ATTR: total number of nl80211_attrs available 2239 * @NUM_NL80211_ATTR: total number of nl80211_attrs available
2230 * @NL80211_ATTR_MAX: highest attribute number currently defined 2240 * @NL80211_ATTR_MAX: highest attribute number currently defined
2231 * @__NL80211_ATTR_AFTER_LAST: internal use 2241 * @__NL80211_ATTR_AFTER_LAST: internal use
@@ -2660,6 +2670,11 @@ enum nl80211_attrs {
2660 2670
2661 NL80211_ATTR_CONTROL_PORT_OVER_NL80211, 2671 NL80211_ATTR_CONTROL_PORT_OVER_NL80211,
2662 2672
2673 NL80211_ATTR_TXQ_STATS,
2674 NL80211_ATTR_TXQ_LIMIT,
2675 NL80211_ATTR_TXQ_MEMORY_LIMIT,
2676 NL80211_ATTR_TXQ_QUANTUM,
2677
2663 /* add attributes here, update the policy in nl80211.c */ 2678 /* add attributes here, update the policy in nl80211.c */
2664 2679
2665 __NL80211_ATTR_AFTER_LAST, 2680 __NL80211_ATTR_AFTER_LAST,
@@ -3040,6 +3055,7 @@ enum nl80211_sta_info {
3040 * @NL80211_TID_STATS_TX_MSDU_FAILED: number of failed transmitted 3055 * @NL80211_TID_STATS_TX_MSDU_FAILED: number of failed transmitted
3041 * MSDUs (u64) 3056 * MSDUs (u64)
3042 * @NL80211_TID_STATS_PAD: attribute used for padding for 64-bit alignment 3057 * @NL80211_TID_STATS_PAD: attribute used for padding for 64-bit alignment
3058 * @NL80211_TID_STATS_TXQ_STATS: TXQ stats (nested attribute)
3043 * @NUM_NL80211_TID_STATS: number of attributes here 3059 * @NUM_NL80211_TID_STATS: number of attributes here
3044 * @NL80211_TID_STATS_MAX: highest numbered attribute here 3060 * @NL80211_TID_STATS_MAX: highest numbered attribute here
3045 */ 3061 */
@@ -3050,6 +3066,7 @@ enum nl80211_tid_stats {
3050 NL80211_TID_STATS_TX_MSDU_RETRIES, 3066 NL80211_TID_STATS_TX_MSDU_RETRIES,
3051 NL80211_TID_STATS_TX_MSDU_FAILED, 3067 NL80211_TID_STATS_TX_MSDU_FAILED,
3052 NL80211_TID_STATS_PAD, 3068 NL80211_TID_STATS_PAD,
3069 NL80211_TID_STATS_TXQ_STATS,
3053 3070
3054 /* keep last */ 3071 /* keep last */
3055 NUM_NL80211_TID_STATS, 3072 NUM_NL80211_TID_STATS,
@@ -3057,6 +3074,44 @@ enum nl80211_tid_stats {
3057}; 3074};
3058 3075
3059/** 3076/**
3077 * enum nl80211_txq_stats - per TXQ statistics attributes
3078 * @__NL80211_TXQ_STATS_INVALID: attribute number 0 is reserved
3079 * @NUM_NL80211_TXQ_STATS: number of attributes here
3080 * @NL80211_TXQ_STATS_BACKLOG_BYTES: number of bytes currently backlogged
3081 * @NL80211_TXQ_STATS_BACKLOG_PACKETS: number of packets currently
3082 * backlogged
3083 * @NL80211_TXQ_STATS_FLOWS: total number of new flows seen
3084 * @NL80211_TXQ_STATS_DROPS: total number of packet drops
3085 * @NL80211_TXQ_STATS_ECN_MARKS: total number of packet ECN marks
3086 * @NL80211_TXQ_STATS_OVERLIMIT: number of drops due to queue space overflow
3087 * @NL80211_TXQ_STATS_OVERMEMORY: number of drops due to memory limit overflow
3088 * (only for per-phy stats)
3089 * @NL80211_TXQ_STATS_COLLISIONS: number of hash collisions
3090 * @NL80211_TXQ_STATS_TX_BYTES: total number of bytes dequeued from TXQ
3091 * @NL80211_TXQ_STATS_TX_PACKETS: total number of packets dequeued from TXQ
3092 * @NL80211_TXQ_STATS_MAX_FLOWS: number of flow buckets for PHY
3093 * @NL80211_TXQ_STATS_MAX: highest numbered attribute here
3094 */
3095enum nl80211_txq_stats {
3096 __NL80211_TXQ_STATS_INVALID,
3097 NL80211_TXQ_STATS_BACKLOG_BYTES,
3098 NL80211_TXQ_STATS_BACKLOG_PACKETS,
3099 NL80211_TXQ_STATS_FLOWS,
3100 NL80211_TXQ_STATS_DROPS,
3101 NL80211_TXQ_STATS_ECN_MARKS,
3102 NL80211_TXQ_STATS_OVERLIMIT,
3103 NL80211_TXQ_STATS_OVERMEMORY,
3104 NL80211_TXQ_STATS_COLLISIONS,
3105 NL80211_TXQ_STATS_TX_BYTES,
3106 NL80211_TXQ_STATS_TX_PACKETS,
3107 NL80211_TXQ_STATS_MAX_FLOWS,
3108
3109 /* keep last */
3110 NUM_NL80211_TXQ_STATS,
3111 NL80211_TXQ_STATS_MAX = NUM_NL80211_TXQ_STATS - 1
3112};
3113
3114/**
3060 * enum nl80211_mpath_flags - nl80211 mesh path flags 3115 * enum nl80211_mpath_flags - nl80211 mesh path flags
3061 * 3116 *
3062 * @NL80211_MPATH_FLAG_ACTIVE: the mesh path is active 3117 * @NL80211_MPATH_FLAG_ACTIVE: the mesh path is active
@@ -5072,6 +5127,8 @@ enum nl80211_feature_flags {
5072 * @NL80211_EXT_FEATURE_DATA_ACK_SIGNAL_SUPPORT: This Driver support data ack 5127 * @NL80211_EXT_FEATURE_DATA_ACK_SIGNAL_SUPPORT: This Driver support data ack
5073 * rssi if firmware support, this flag is to intimate about ack rssi 5128 * rssi if firmware support, this flag is to intimate about ack rssi
5074 * support to nl80211. 5129 * support to nl80211.
5130 * @NL80211_EXT_FEATURE_TXQS: Driver supports FQ-CoDel-enabled intermediate
5131 * TXQs.
5075 * 5132 *
5076 * @NUM_NL80211_EXT_FEATURES: number of extended features. 5133 * @NUM_NL80211_EXT_FEATURES: number of extended features.
5077 * @MAX_NL80211_EXT_FEATURES: highest extended feature index. 5134 * @MAX_NL80211_EXT_FEATURES: highest extended feature index.
@@ -5105,6 +5162,7 @@ enum nl80211_ext_feature_index {
5105 NL80211_EXT_FEATURE_DFS_OFFLOAD, 5162 NL80211_EXT_FEATURE_DFS_OFFLOAD,
5106 NL80211_EXT_FEATURE_CONTROL_PORT_OVER_NL80211, 5163 NL80211_EXT_FEATURE_CONTROL_PORT_OVER_NL80211,
5107 NL80211_EXT_FEATURE_DATA_ACK_SIGNAL_SUPPORT, 5164 NL80211_EXT_FEATURE_DATA_ACK_SIGNAL_SUPPORT,
5165 NL80211_EXT_FEATURE_TXQS,
5108 5166
5109 /* add new features before the definition below */ 5167 /* add new features before the definition below */
5110 NUM_NL80211_EXT_FEATURES, 5168 NUM_NL80211_EXT_FEATURES,