diff options
author | Felix Fietkau <nbd@nbd.name> | 2021-01-23 00:17:31 +0100 |
---|---|---|
committer | Felix Fietkau <nbd@nbd.name> | 2021-01-25 12:19:22 +0100 |
commit | 37752336bdfb361d597b316cd5bb9d8dc6ac1762 (patch) | |
tree | 7a9104a329436b31a696bae0e17e1c6d513c22dd /package/kernel/mac80211/patches/subsys/347-mac80211-minstrel_ht-update-total-packets-counter-in.patch | |
parent | 1fb413e6579a34a0040b526e681298909dfaa5ac (diff) | |
download | upstream-37752336bdfb361d597b316cd5bb9d8dc6ac1762.tar.gz upstream-37752336bdfb361d597b316cd5bb9d8dc6ac1762.tar.bz2 upstream-37752336bdfb361d597b316cd5bb9d8dc6ac1762.zip |
mac80211: add significant minstrel_ht performance improvements
Completely redesign the rate sampling approach
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Diffstat (limited to 'package/kernel/mac80211/patches/subsys/347-mac80211-minstrel_ht-update-total-packets-counter-in.patch')
-rw-r--r-- | package/kernel/mac80211/patches/subsys/347-mac80211-minstrel_ht-update-total-packets-counter-in.patch | 54 |
1 files changed, 54 insertions, 0 deletions
diff --git a/package/kernel/mac80211/patches/subsys/347-mac80211-minstrel_ht-update-total-packets-counter-in.patch b/package/kernel/mac80211/patches/subsys/347-mac80211-minstrel_ht-update-total-packets-counter-in.patch new file mode 100644 index 0000000000..a1cdf99e05 --- /dev/null +++ b/package/kernel/mac80211/patches/subsys/347-mac80211-minstrel_ht-update-total-packets-counter-in.patch @@ -0,0 +1,54 @@ +From: Felix Fietkau <nbd@nbd.name> +Date: Fri, 22 Jan 2021 18:21:13 +0100 +Subject: [PATCH] mac80211: minstrel_ht: update total packets counter in tx + status path + +Keep the update in one place and prepare for further rework + +Signed-off-by: Felix Fietkau <nbd@nbd.name> +--- + +--- a/net/mac80211/rc80211_minstrel_ht.c ++++ b/net/mac80211/rc80211_minstrel_ht.c +@@ -1093,6 +1093,16 @@ minstrel_ht_tx_status(void *priv, struct + info->status.ampdu_len = 1; + } + ++ /* wraparound */ ++ if (mi->total_packets >= ~0 - info->status.ampdu_len) { ++ mi->total_packets = 0; ++ mi->sample_packets = 0; ++ } ++ ++ mi->total_packets += info->status.ampdu_len; ++ if (info->flags & IEEE80211_TX_CTL_RATE_CTRL_PROBE) ++ mi->sample_packets += info->status.ampdu_len; ++ + mi->ampdu_packets++; + mi->ampdu_len += info->status.ampdu_len; + +@@ -1104,9 +1114,6 @@ minstrel_ht_tx_status(void *priv, struct + mi->sample_count--; + } + +- if (info->flags & IEEE80211_TX_CTL_RATE_CTRL_PROBE) +- mi->sample_packets += info->status.ampdu_len; +- + if (mi->sample_mode != MINSTREL_SAMPLE_IDLE) + rate_sample = minstrel_get_ratestats(mi, mi->sample_rate); + +@@ -1504,14 +1511,6 @@ minstrel_ht_get_rate(void *priv, struct + else + sample_idx = minstrel_get_sample_rate(mp, mi); + +- mi->total_packets++; +- +- /* wraparound */ +- if (mi->total_packets == ~0) { +- mi->total_packets = 0; +- mi->sample_packets = 0; +- } +- + if (sample_idx < 0) + return; + |