2012-06-26 12:03:42

by Eyal Shapira

[permalink] [raw]
Subject: [PATCH] mac80211: use legacy mode for all ACs

AVM FritzBox 7390 has a weird behaviour where once we enable
U-APSD only on the VO AC it limits the rate of the packets
it sends to 39Mbps and doesn't do AMPDU aggregation.
This causes a big degradation in throughput obviously.
It's important to note that this isn't related to PS and happens
also when ACTIVE is forced. The traffic affected is sent in BE AC.
Once legacy mode for all ACs is used the AP begins using higher rates
as well as AMPDU aggregation which improves throughput significantly.

In order to deal with this AP and potentially others switch to
using legacy mode for all ACs by default.

Signed-off-by: Eyal Shapira <[email protected]>
---
In case you're wondering what happens with U-APSD on all ACs
it breaks down as well and even worse, not only a TP issue but
broken PS functionality.

net/mac80211/ieee80211_i.h | 17 +++++++++++------
1 files changed, 11 insertions(+), 6 deletions(-)

diff --git a/net/mac80211/ieee80211_i.h b/net/mac80211/ieee80211_i.h
index 341d77d..370a646 100644
--- a/net/mac80211/ieee80211_i.h
+++ b/net/mac80211/ieee80211_i.h
@@ -57,13 +57,18 @@ struct ieee80211_local;
#define TU_TO_EXP_TIME(x) (jiffies + TU_TO_JIFFIES(x))

/*
- * Some APs experience problems when working with U-APSD. Decrease the
- * probability of that happening by using legacy mode for all ACs but VO.
- * The AP that caused us trouble was a Cisco 4410N. It ignores our
- * setting, and always treats non-VO ACs as legacy.
+ * Some APs experience problems when working with U-APSD:
+ * Cisco 4410N - It ignores our setting, and always treats non-VO ACs as legacy.
+ *
+ * AVM FritzBox 7930 - Setting U-APSD on VO AC only (which solves the
+ * Cisco 4410N problem) causes the FritzBox to limit the rates of packets
+ * sent by it to 39Mbps and disables AMPDU aggregation. This causes a major
+ * througput degradation with this AP.
+ *
+ * Avoid these issues by using legacy mode for all ACs by default.
+ * U-APSD can still be configured from userspace.
*/
-#define IEEE80211_DEFAULT_UAPSD_QUEUES \
- IEEE80211_WMM_IE_STA_QOSINFO_AC_VO
+#define IEEE80211_DEFAULT_UAPSD_QUEUES 0

#define IEEE80211_DEFAULT_MAX_SP_LEN \
IEEE80211_WMM_IE_STA_QOSINFO_SP_ALL
--
1.7.4.1



2012-06-26 12:09:00

by Johannes Berg

[permalink] [raw]
Subject: Re: [PATCH] mac80211: use legacy mode for all ACs

On Tue, 2012-06-26 at 15:03 +0300, Eyal Shapira wrote:
> AVM FritzBox 7390 has a weird behaviour where once we enable
> U-APSD only on the VO AC it limits the rate of the packets
> it sends to 39Mbps and doesn't do AMPDU aggregation.
> This causes a big degradation in throughput obviously.
> It's important to note that this isn't related to PS and happens
> also when ACTIVE is forced. The traffic affected is sent in BE AC.
> Once legacy mode for all ACs is used the AP begins using higher rates
> as well as AMPDU aggregation which improves throughput significantly.
>
> In order to deal with this AP and potentially others switch to
> using legacy mode for all ACs by default.

This actually somewhat makes sense if they have a bad aggregation
implementation, because you don't want VO to have latency, *especially*
not when uAPSD was enabled, indicating that you want VO-like low-latency
behaviour.

I don't see why you're optimising for TPT on VO rather then latency?

johannes


2012-06-26 12:21:57

by Eyal Shapira

[permalink] [raw]
Subject: Re: [PATCH] mac80211: use legacy mode for all ACs

On 26 June 2012 15:08, Johannes Berg <[email protected]> wrote:
>
> On Tue, 2012-06-26 at 15:03 +0300, Eyal Shapira wrote:
> > AVM FritzBox 7390 has a weird behaviour where once we enable
> > U-APSD only on the VO AC it limits the rate of the packets
> > it sends to 39Mbps and doesn't do AMPDU aggregation.
> > This causes a big degradation in throughput obviously.
> > It's important to note that this isn't related to PS and happens
> > also when ACTIVE is forced. The traffic affected is sent in BE AC.
> > Once legacy mode for all ACs is used the AP begins using higher rates
> > as well as AMPDU aggregation which improves throughput significantly.
> >
> > In order to deal with this AP and potentially others switch to
> > using legacy mode for all ACs by default.
>
> This actually somewhat makes sense if they have a bad aggregation
> implementation, because you don't want VO to have latency, *especially*
> not when uAPSD was enabled, indicating that you want VO-like low-latency
> behaviour.
>
> I don't see why you're optimising for TPT on VO rather then latency?
>

The problem is that when we're requesting uAPSD on VO it messes up with
traffic sent on the BE AC which isn't supposed to get affected but it
does (probably
a bug). The effect is that any traffic we're doing gets very low TPT.
Apparently this AP
is quite common in Germany and other places so we can't just ignore it.

I was thinking that if someone wants uAPSD on the VO they can still
set it from userspace
through the nl80211.

>
> johannes
>