@rickkz0r and @dtaht I stumbled across this yesterday and immediately gravitated toward it as I am keenly interested in improving latency.
I am presently running with this patch, though I know there are debates as to the efficacy of the values therein:
The Patch (Do not blindly copy and use, people)
--- a/net/mac80211/sta_info.c
+++ b/net/mac80211/sta_info.c
@@ -685,8 +685,8 @@ __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.target = MS2TIME(5);
+ sta->cparams.interval = MS2TIME(50);
sta->cparams.ecn = true;
sta->cparams.ce_threshold_selector = 0;
sta->cparams.ce_threshold_mask = 0;
@@ -2878,15 +2878,7 @@ unsigned long ieee80211_sta_last_active(
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;
- }
+ return;
}
void ieee80211_sta_set_expected_throughput(struct ieee80211_sta *pubsta,
--- a/net/mac80211/tx.c
+++ b/net/mac80211/tx.c
@@ -1607,8 +1607,8 @@ int ieee80211_txq_setup_flows(struct iee
fq->memory_limit = 4 << 20; /* 4 Mbytes */
codel_params_init(&local->cparams);
- local->cparams.interval = MS2TIME(100);
- local->cparams.target = MS2TIME(20);
+ local->cparams.interval = MS2TIME(50);
+ local->cparams.target = MS2TIME(5);
local->cparams.ecn = true;
local->cvars = kcalloc(fq->flows_cnt, sizeof(local->cvars[0]),
@rickkz0r I tried to modify these patches to work with my APs (GL-MT6000 devices) running snapshot builds with the testing kernel (currently 6.6). While I got a clean build, I was not able to get any data back from my get codel
calls:
root@AP-Office:~# iw phy0 get codel
root@AP-Office:~# iw phy1 get codel
root@AP-Office:~# iw phy0 get | grep codel
phy <phyname> get codel
phy <phyname> set codel [ecn <0|1>] [ interval <time in ms> ] [ target <time in ms> ]
For grins, I tried the set codel
command with even lesser success...
root@AP-Office:~# iw phy phy0 set codel target 10
kernel reports: NLA_F_NESTED is missing
command failed: Invalid argument (-22)
root@AP-Office:~# iw phy phy1 set codel target 10
kernel reports: NLA_F_NESTED is missing
command failed: Invalid argument (-22)
I started researching the error and it seems that NLA_F_NESTED
has to be passed in newer kernels (5.14+ ??) with each modification due to:
This is needed to make cfg80211 allow the nl80211 command
NL80211_ATTR_TID_CONFIG in the new kernel versions that enforce netlink
attribute policy validation.
(from https://lore.kernel.org/all/20210910141618.1594617-1-gokulkumar792@gmail.com/)
Just curious if you've run into the same and have, perhaps, crossed this bridge already. Thanks!