release 6.15.4
This commit is contained in:
@@ -18,7 +18,7 @@ Signed-off-by: David Bauer <mail@david-bauer.net>
|
||||
|
||||
--- a/net/mac80211/sta_info.c
|
||||
+++ b/net/mac80211/sta_info.c
|
||||
@@ -2474,6 +2474,13 @@ static void sta_stats_decode_rate(struct
|
||||
@@ -2467,6 +2467,13 @@ static void sta_stats_decode_rate(struct
|
||||
|
||||
sband = local->hw.wiphy->bands[band];
|
||||
|
||||
|
@@ -28,7 +28,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
|
||||
|
||||
--- a/net/mac80211/sta_info.c
|
||||
+++ b/net/mac80211/sta_info.c
|
||||
@@ -583,6 +583,7 @@ __sta_info_alloc(struct ieee80211_sub_if
|
||||
@@ -582,6 +582,7 @@ __sta_info_alloc(struct ieee80211_sub_if
|
||||
spin_lock_init(&sta->ps_lock);
|
||||
INIT_WORK(&sta->drv_deliver_wk, sta_deliver_ps_frames);
|
||||
wiphy_work_init(&sta->ampdu_mlme.work, ieee80211_ba_session_work);
|
||||
|
@@ -23,7 +23,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
|
||||
--- a/net/mac80211/tx.c
|
||||
+++ b/net/mac80211/tx.c
|
||||
@@ -4084,7 +4084,7 @@ struct ieee80211_txq *ieee80211_next_txq
|
||||
@@ -4077,7 +4077,7 @@ struct ieee80211_txq *ieee80211_next_txq
|
||||
|
||||
if (deficit < 0)
|
||||
sta->airtime[txqi->txq.ac].deficit +=
|
||||
@@ -32,7 +32,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
|
||||
if (deficit < 0 || !aql_check) {
|
||||
list_move_tail(&txqi->schedule_order,
|
||||
@@ -4227,7 +4227,8 @@ bool ieee80211_txq_may_transmit(struct i
|
||||
@@ -4220,7 +4220,8 @@ bool ieee80211_txq_may_transmit(struct i
|
||||
}
|
||||
sta = container_of(iter->txq.sta, struct sta_info, sta);
|
||||
if (ieee80211_sta_deficit(sta, ac) < 0)
|
||||
@@ -42,7 +42,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
list_move_tail(&iter->schedule_order, &local->active_txqs[ac]);
|
||||
}
|
||||
|
||||
@@ -4235,7 +4236,7 @@ bool ieee80211_txq_may_transmit(struct i
|
||||
@@ -4228,7 +4229,7 @@ bool ieee80211_txq_may_transmit(struct i
|
||||
if (sta->airtime[ac].deficit >= 0)
|
||||
goto out;
|
||||
|
||||
|
@@ -95,7 +95,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
spin_lock_init(&local->active_txq_lock[i]);
|
||||
--- a/net/mac80211/sta_info.c
|
||||
+++ b/net/mac80211/sta_info.c
|
||||
@@ -2388,13 +2388,28 @@ EXPORT_SYMBOL(ieee80211_sta_recalc_aggre
|
||||
@@ -2381,13 +2381,28 @@ EXPORT_SYMBOL(ieee80211_sta_recalc_aggre
|
||||
|
||||
void ieee80211_sta_update_pending_airtime(struct ieee80211_local *local,
|
||||
struct sta_info *sta, u8 ac,
|
||||
@@ -127,7 +127,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
atomic_add(tx_airtime,
|
||||
--- a/net/mac80211/tx.c
|
||||
+++ b/net/mac80211/tx.c
|
||||
@@ -2556,7 +2556,7 @@ static u16 ieee80211_store_ack_skb(struc
|
||||
@@ -2549,7 +2549,7 @@ static u16 ieee80211_store_ack_skb(struc
|
||||
|
||||
spin_lock_irqsave(&local->ack_status_lock, flags);
|
||||
id = idr_alloc(&local->ack_status_frames, ack_skb,
|
||||
@@ -136,7 +136,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
spin_unlock_irqrestore(&local->ack_status_lock, flags);
|
||||
|
||||
if (id >= 0) {
|
||||
@@ -3985,20 +3985,20 @@ begin:
|
||||
@@ -3978,20 +3978,20 @@ begin:
|
||||
encap_out:
|
||||
info->control.vif = vif;
|
||||
|
||||
@@ -167,7 +167,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
}
|
||||
|
||||
return skb;
|
||||
@@ -4050,6 +4050,7 @@ struct ieee80211_txq *ieee80211_next_txq
|
||||
@@ -4043,6 +4043,7 @@ struct ieee80211_txq *ieee80211_next_txq
|
||||
struct ieee80211_txq *ret = NULL;
|
||||
struct txq_info *txqi = NULL, *head = NULL;
|
||||
bool found_eligible_txq = false;
|
||||
@@ -175,7 +175,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
|
||||
spin_lock_bh(&local->active_txq_lock[ac]);
|
||||
|
||||
@@ -4073,26 +4074,26 @@ struct ieee80211_txq *ieee80211_next_txq
|
||||
@@ -4066,26 +4067,26 @@ struct ieee80211_txq *ieee80211_next_txq
|
||||
if (!head)
|
||||
head = txqi;
|
||||
|
||||
@@ -214,7 +214,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
if (txqi->schedule_round == local->schedule_round[ac])
|
||||
goto out;
|
||||
|
||||
@@ -4157,7 +4158,8 @@ bool ieee80211_txq_airtime_check(struct
|
||||
@@ -4150,7 +4151,8 @@ bool ieee80211_txq_airtime_check(struct
|
||||
return true;
|
||||
|
||||
if (!txq->sta)
|
||||
@@ -224,7 +224,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
|
||||
if (unlikely(txq->tid == IEEE80211_NUM_TIDS))
|
||||
return true;
|
||||
@@ -4206,15 +4208,15 @@ bool ieee80211_txq_may_transmit(struct i
|
||||
@@ -4199,15 +4201,15 @@ bool ieee80211_txq_may_transmit(struct i
|
||||
|
||||
spin_lock_bh(&local->active_txq_lock[ac]);
|
||||
|
||||
|
@@ -1,221 +0,0 @@
|
||||
This reverts commit 484a54c2e597dbc4ace79c1687022282905afba0. The CoDel
|
||||
parameter change essentially disables CoDel on slow stations, with some
|
||||
questionable assumptions, as Dave pointed out in [0]. Quoting from
|
||||
there:
|
||||
|
||||
But here are my pithy comments as to why this part of mac80211 is so
|
||||
wrong...
|
||||
|
||||
static void sta_update_codel_params(struct sta_info *sta, u32 thr)
|
||||
{
|
||||
- if (thr && thr < STA_SLOW_THRESHOLD * sta->local->num_sta) {
|
||||
|
||||
1) sta->local->num_sta is the number of associated, rather than
|
||||
active, stations. "Active" stations in the last 50ms or so, might have
|
||||
been a better thing to use, but as most people have far more than that
|
||||
associated, we end up with really lousy codel parameters, all the
|
||||
time. Mistake numero uno!
|
||||
|
||||
2) The STA_SLOW_THRESHOLD was completely arbitrary in 2016.
|
||||
|
||||
- sta->cparams.target = MS2TIME(50);
|
||||
|
||||
This, by itself, was probably not too bad. 30ms might have been
|
||||
better, at the time, when we were battling powersave etc, but 20ms was
|
||||
enough, really, to cover most scenarios, even where we had low rate
|
||||
2Ghz multicast to cope with. Even then, codel has a hard time finding
|
||||
any sane drop rate at all, with a target this high.
|
||||
|
||||
- sta->cparams.interval = MS2TIME(300);
|
||||
|
||||
But this was horrible, a total mistake, that is leading to codel being
|
||||
completely ineffective in almost any scenario on clients or APS.
|
||||
100ms, even 80ms, here, would be vastly better than this insanity. I'm
|
||||
seeing 5+seconds of delay accumulated in a bunch of otherwise happily
|
||||
fq-ing APs....
|
||||
|
||||
100ms of observed jitter during a flow is enough. Certainly (in 2016)
|
||||
there were interactions with powersave that I did not understand, and
|
||||
still don't, but if you are transmitting in the first place, powersave
|
||||
shouldn't be a problemmmm.....
|
||||
|
||||
- sta->cparams.ecn = false;
|
||||
|
||||
At the time we were pretty nervous about ecn, I'm kind of sanguine
|
||||
about it now, and reliably indicating ecn seems better than turning it
|
||||
off for any reason.
|
||||
|
||||
[...]
|
||||
|
||||
In production, on p2p wireless, I've had 8ms and 80ms for target and
|
||||
interval for years now, and it works great.
|
||||
|
||||
I think Dave's arguments above are basically sound on the face of it,
|
||||
and various experimentation with tighter CoDel parameters in the OpenWrt
|
||||
community have show promising results[1]. So I don't think there's any
|
||||
reason to keep this parameter fiddling; hence this revert.
|
||||
|
||||
[0] https://lore.kernel.org/linux-wireless/CAA93jw6NJ2cmLmMauz0xAgC2MGbBq6n0ZiZzAdkK0u4b+O2yXg@mail.gmail.com/
|
||||
[1] https://forum.openwrt.org/t/reducing-multiplexing-latencies-still-further-in-wifi/133605/130
|
||||
|
||||
Suggested-By: Dave Taht <dave.taht@gmail.com>
|
||||
In-memory-of: Dave Taht <dave.taht@gmail.com>
|
||||
Signed-off-by: Toke Høiland-Jørgensen <toke@toke.dk>
|
||||
|
||||
--- a/include/net/mac80211.h
|
||||
+++ b/include/net/mac80211.h
|
||||
@@ -5347,22 +5347,6 @@ void ieee80211_get_tx_rates(struct ieee8
|
||||
int max_rates);
|
||||
|
||||
/**
|
||||
- * ieee80211_sta_set_expected_throughput - set the expected tpt for a station
|
||||
- *
|
||||
- * Call this function to notify mac80211 about a change in expected throughput
|
||||
- * to a station. A driver for a device that does rate control in firmware can
|
||||
- * call this function when the expected throughput estimate towards a station
|
||||
- * changes. The information is used to tune the CoDel AQM applied to traffic
|
||||
- * going towards that station (which can otherwise be too aggressive and cause
|
||||
- * slow stations to starve).
|
||||
- *
|
||||
- * @pubsta: the station to set throughput for.
|
||||
- * @thr: the current expected throughput in kbps.
|
||||
- */
|
||||
-void ieee80211_sta_set_expected_throughput(struct ieee80211_sta *pubsta,
|
||||
- u32 thr);
|
||||
-
|
||||
-/**
|
||||
* ieee80211_tx_rate_update - transmit rate update callback
|
||||
*
|
||||
* Drivers should call this functions with a non-NULL pub sta
|
||||
--- a/net/mac80211/debugfs_sta.c
|
||||
+++ b/net/mac80211/debugfs_sta.c
|
||||
@@ -152,12 +152,6 @@ static ssize_t sta_aqm_read(struct file
|
||||
|
||||
p += scnprintf(p,
|
||||
bufsz + buf - p,
|
||||
- "target %uus interval %uus ecn %s\n",
|
||||
- codel_time_to_us(sta->cparams.target),
|
||||
- codel_time_to_us(sta->cparams.interval),
|
||||
- sta->cparams.ecn ? "yes" : "no");
|
||||
- p += scnprintf(p,
|
||||
- bufsz + buf - p,
|
||||
"tid ac backlog-bytes backlog-packets new-flows drops marks overlimit collisions tx-bytes tx-packets flags\n");
|
||||
|
||||
for (i = 0; i < ARRAY_SIZE(sta->sta.txq); i++) {
|
||||
--- a/net/mac80211/rate.c
|
||||
+++ b/net/mac80211/rate.c
|
||||
@@ -990,8 +990,6 @@ int rate_control_set_rates(struct ieee80
|
||||
if (sta->uploaded)
|
||||
drv_sta_rate_tbl_update(hw_to_local(hw), sta->sdata, pubsta);
|
||||
|
||||
- ieee80211_sta_set_expected_throughput(pubsta, sta_get_expected_throughput(sta));
|
||||
-
|
||||
return 0;
|
||||
}
|
||||
EXPORT_SYMBOL(rate_control_set_rates);
|
||||
--- a/net/mac80211/sta_info.c
|
||||
+++ b/net/mac80211/sta_info.c
|
||||
@@ -18,7 +18,6 @@
|
||||
#include <linux/timer.h>
|
||||
#include <linux/rtnetlink.h>
|
||||
|
||||
-#include <net/codel.h>
|
||||
#include <net/mac80211.h>
|
||||
#include "ieee80211_i.h"
|
||||
#include "driver-ops.h"
|
||||
@@ -702,13 +701,6 @@ __sta_info_alloc(struct ieee80211_sub_if
|
||||
}
|
||||
}
|
||||
|
||||
- sta->cparams.ce_threshold = CODEL_DISABLED_THRESHOLD;
|
||||
- sta->cparams.target = MS2TIME(20);
|
||||
- sta->cparams.interval = MS2TIME(100);
|
||||
- sta->cparams.ecn = true;
|
||||
- sta->cparams.ce_threshold_selector = 0;
|
||||
- sta->cparams.ce_threshold_mask = 0;
|
||||
-
|
||||
sta_dbg(sdata, "Allocated STA %pM\n", sta->sta.addr);
|
||||
|
||||
return sta;
|
||||
@@ -2928,27 +2920,6 @@ unsigned long ieee80211_sta_last_active(
|
||||
return sta->deflink.status_stats.last_ack;
|
||||
}
|
||||
|
||||
-static void sta_update_codel_params(struct sta_info *sta, u32 thr)
|
||||
-{
|
||||
- if (thr && thr < STA_SLOW_THRESHOLD * sta->local->num_sta) {
|
||||
- sta->cparams.target = MS2TIME(50);
|
||||
- sta->cparams.interval = MS2TIME(300);
|
||||
- sta->cparams.ecn = false;
|
||||
- } else {
|
||||
- sta->cparams.target = MS2TIME(20);
|
||||
- sta->cparams.interval = MS2TIME(100);
|
||||
- sta->cparams.ecn = true;
|
||||
- }
|
||||
-}
|
||||
-
|
||||
-void ieee80211_sta_set_expected_throughput(struct ieee80211_sta *pubsta,
|
||||
- u32 thr)
|
||||
-{
|
||||
- struct sta_info *sta = container_of(pubsta, struct sta_info, sta);
|
||||
-
|
||||
- sta_update_codel_params(sta, thr);
|
||||
-}
|
||||
-
|
||||
int ieee80211_sta_allocate_link(struct sta_info *sta, unsigned int link_id)
|
||||
{
|
||||
struct ieee80211_sub_if_data *sdata = sta->sdata;
|
||||
--- a/net/mac80211/sta_info.h
|
||||
+++ b/net/mac80211/sta_info.h
|
||||
@@ -467,14 +467,6 @@ struct ieee80211_fragment_cache {
|
||||
unsigned int next;
|
||||
};
|
||||
|
||||
-/*
|
||||
- * The bandwidth threshold below which the per-station CoDel parameters will be
|
||||
- * scaled to be more lenient (to prevent starvation of slow stations). This
|
||||
- * value will be scaled by the number of active stations when it is being
|
||||
- * applied.
|
||||
- */
|
||||
-#define STA_SLOW_THRESHOLD 6000 /* 6 Mbps */
|
||||
-
|
||||
/**
|
||||
* struct link_sta_info - Link STA information
|
||||
* All link specific sta info are stored here for reference. This can be
|
||||
@@ -627,7 +619,6 @@ struct link_sta_info {
|
||||
* @sta: station information we share with the driver
|
||||
* @sta_state: duplicates information about station state (for debug)
|
||||
* @rcu_head: RCU head used for freeing this station struct
|
||||
- * @cparams: CoDel parameters for this station.
|
||||
* @reserved_tid: reserved TID (if any, otherwise IEEE80211_TID_UNRESERVED)
|
||||
* @amsdu_mesh_control: track the mesh A-MSDU format used by the peer:
|
||||
*
|
||||
@@ -718,8 +709,6 @@ struct sta_info {
|
||||
struct dentry *debugfs_dir;
|
||||
#endif
|
||||
|
||||
- struct codel_params cparams;
|
||||
-
|
||||
u8 reserved_tid;
|
||||
s8 amsdu_mesh_control;
|
||||
|
||||
--- a/net/mac80211/tx.c
|
||||
+++ b/net/mac80211/tx.c
|
||||
@@ -1402,16 +1402,9 @@ static struct sk_buff *fq_tin_dequeue_fu
|
||||
|
||||
local = container_of(fq, struct ieee80211_local, fq);
|
||||
txqi = container_of(tin, struct txq_info, tin);
|
||||
+ cparams = &local->cparams;
|
||||
cstats = &txqi->cstats;
|
||||
|
||||
- if (txqi->txq.sta) {
|
||||
- struct sta_info *sta = container_of(txqi->txq.sta,
|
||||
- struct sta_info, sta);
|
||||
- cparams = &sta->cparams;
|
||||
- } else {
|
||||
- cparams = &local->cparams;
|
||||
- }
|
||||
-
|
||||
if (flow == &tin->default_flow)
|
||||
cvars = &txqi->def_cvars;
|
||||
else
|
Reference in New Issue
Block a user