f you feel like patching yer openwrt kernel, you can patch the mac80211 backports in openwrt to reduce the codel target. Please note this is still the wrong patch for 2.4ghz, but... my guess is you'll see quite a reduction in tcp rtt at no cost in throughput (For this particular test). put http://www.taht.net/~d/982-do-codel-right.patch into package/kernel/mac80211/patches/ath/982-do-codel-right.patch which I think is the right thing and right place.
diff --git a/net/mac80211/sta_info.c b/net/mac80211/sta_info.c
index c431722..92ba09b 100644
--- a/net/mac80211/sta_info.c
+++ b/net/mac80211/sta_info.c
@@ -476,10 +476,11 @@ struct sta_info *sta_info_alloc(struct ieee80211_sub_if_data *sdata,
sta->sta.max_rc_amsdu_len = IEEE80211_MAX_MPDU_LEN_HT_BA;
sta->cparams.ce_threshold = CODEL_DISABLED_THRESHOLD;
- sta->cparams.target = MS2TIME(20);
+ sta->cparams.target = MS2TIME(5);
sta->cparams.interval = MS2TIME(100);
sta->cparams.ecn = true;
-
+ sta_dbg(sdata, "Codel target, interval %d, %d\n", sta->cparams.target,
+ sta->cparams.interval);
sta_dbg(sdata, "Allocated STA %pM\n", sta->sta.addr);
return sta;
@@ -2468,15 +2469,9 @@ static void sta_update_codel_params(struct sta_info *sta, u32 thr)
if (!sta->sdata->local->ops->wake_tx_queue)
return;
- 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;
- }
+ sta->cparams.target = MS2TIME(5);
+ sta->cparams.interval = MS2TIME(100);
+ sta->cparams.ecn = true;
}
diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c
index 535911b..ca50d0a 100644
--- a/net/mac80211/tx.c
+++ b/net/mac80211/tx.c
@@ -1551,7 +1551,7 @@ int ieee80211_txq_setup_flows(struct ieee80211_local *local)
codel_params_init(&local->cparams);
local->cparams.interval = MS2TIME(100);
- local->cparams.target = MS2TIME(20);
+ local->cparams.target = MS2TIME(5);
local->cparams.ecn = true;
local->cvars = kcalloc(fq->flows_cnt, sizeof(local->cvars[0]),