All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] mac80211: disable u-APSD queues by default
@ 2015-02-10 11:48 Michal Kazior
  2015-03-03  9:16 ` Johannes Berg
  0 siblings, 1 reply; 7+ messages in thread
From: Michal Kazior @ 2015-02-10 11:48 UTC (permalink / raw)
  To: linux-wireless; +Cc: johannes, Michal Kazior

Some APs experience problems when working with
U-APSD. Decreasing the probability of that
happening by using legacy mode for all ACs but VO
isn't enough.

Cisco 4410N originally forced us to enable VO by
default only because it treated non-VO ACs as
legacy.

However some APs (notably Netgear R7000) silently
reclassify packets to different ACs. Since u-APSD
ACs require trigger frames for frame retrieval
clients would never see some frames (e.g. ARP
responses) or would fetch them accidentally after
a long time.

It makes little sense to enable u-APSD queues by
default because it needs userspace applications to
be aware of it to actually take advantage of the
possible additional powersavings. Implicitly
depending on driver autotrigger frame support
doesn't make much sense.

Signed-off-by: Michal Kazior <michal.kazior@tieto.com>
---
 net/mac80211/ieee80211_i.h | 23 +++++++++++++++++------
 1 file changed, 17 insertions(+), 6 deletions(-)

diff --git a/net/mac80211/ieee80211_i.h b/net/mac80211/ieee80211_i.h
index 3afe368..c0e089c 100644
--- a/net/mac80211/ieee80211_i.h
+++ b/net/mac80211/ieee80211_i.h
@@ -58,13 +58,24 @@ struct ieee80211_local;
 #define IEEE80211_UNSET_POWER_LEVEL	INT_MIN
 
 /*
- * 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. Decreasing the
+ * probability of that happening by using legacy mode for all ACs but VO isn't
+ * enough.
+ *
+ * Cisco 4410N originally forced us to enable VO by default only because it
+ * treated non-VO ACs as legacy.
+ *
+ * However some APs (notably Netgear R7000) silently reclassify packets to
+ * different ACs. Since u-APSD ACs require trigger frames for frame retrieval
+ * clients would never see some frames (e.g. ARP responses) or would fetch them
+ * accidentally after a long time.
+ *
+ * It makes little sense to enable u-APSD queues by default because it needs
+ * userspace applications to be aware of it to actually take advantage of the
+ * possible additional powersavings. Implicitly depending on driver autotrigger
+ * frame support doesn't make much sense.
  */
-#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.8.5.3


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [PATCH] mac80211: disable u-APSD queues by default
  2015-02-10 11:48 [PATCH] mac80211: disable u-APSD queues by default Michal Kazior
@ 2015-03-03  9:16 ` Johannes Berg
  2015-03-03  9:33   ` Krishna Chaitanya
  0 siblings, 1 reply; 7+ messages in thread
From: Johannes Berg @ 2015-03-03  9:16 UTC (permalink / raw)
  To: Michal Kazior; +Cc: linux-wireless

On Tue, 2015-02-10 at 12:48 +0100, Michal Kazior wrote:
> Some APs experience problems when working with
> U-APSD. Decreasing the probability of that
> happening by using legacy mode for all ACs but VO
> isn't enough.
> 
> Cisco 4410N originally forced us to enable VO by
> default only because it treated non-VO ACs as
> legacy.
> 
> However some APs (notably Netgear R7000) silently
> reclassify packets to different ACs. Since u-APSD
> ACs require trigger frames for frame retrieval
> clients would never see some frames (e.g. ARP
> responses) or would fetch them accidentally after
> a long time.

This makes me a little sad, but I've applied this and even added a Cc
stable tag due to the interoperability issues.

johannes


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] mac80211: disable u-APSD queues by default
  2015-03-03  9:16 ` Johannes Berg
@ 2015-03-03  9:33   ` Krishna Chaitanya
  2015-03-03  9:36     ` Johannes Berg
  0 siblings, 1 reply; 7+ messages in thread
From: Krishna Chaitanya @ 2015-03-03  9:33 UTC (permalink / raw)
  To: Johannes Berg; +Cc: Michal Kazior, linux-wireless

On Tue, Mar 3, 2015 at 2:46 PM, Johannes Berg <johannes@sipsolutions.net> wrote:
> On Tue, 2015-02-10 at 12:48 +0100, Michal Kazior wrote:
>> Some APs experience problems when working with
>> U-APSD. Decreasing the probability of that
>> happening by using legacy mode for all ACs but VO
>> isn't enough.
>>
>> Cisco 4410N originally forced us to enable VO by
>> default only because it treated non-VO ACs as
>> legacy.
>>
>> However some APs (notably Netgear R7000) silently
>> reclassify packets to different ACs. Since u-APSD
>> ACs require trigger frames for frame retrieval
>> clients would never see some frames (e.g. ARP
>> responses) or would fetch them accidentally after
>> a long time.
>
> This makes me a little sad, but I've applied this and even added a Cc
> stable tag due to the interoperability issues.
>
Mixed mode (uapsd + legacy) is not really the optimal
configuration, where we expect STA to send trigger frames periodically
to retrieve the DL packets (especially very first packet).

But still if we want power save, i suggest going for
All u-apsd (0xF), so that AP will inform us by setting the TIM bit
and we can retrieve the first frame.
(We have this patch internally and it works well).

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] mac80211: disable u-APSD queues by default
  2015-03-03  9:33   ` Krishna Chaitanya
@ 2015-03-03  9:36     ` Johannes Berg
  2015-03-03 10:15       ` Krishna Chaitanya
  0 siblings, 1 reply; 7+ messages in thread
From: Johannes Berg @ 2015-03-03  9:36 UTC (permalink / raw)
  To: Krishna Chaitanya; +Cc: Michal Kazior, linux-wireless


> >> Cisco 4410N originally forced us to enable VO by
> >> default only because it treated non-VO ACs as
> >> legacy.

> Mixed mode (uapsd + legacy) is not really the optimal
> configuration, where we expect STA to send trigger frames periodically
> to retrieve the DL packets (especially very first packet).
> 
> But still if we want power save, i suggest going for
> All u-apsd (0xF), so that AP will inform us by setting the TIM bit
> and we can retrieve the first frame.
> (We have this patch internally and it works well).

Except where it doesn't work, like on the Cisco 4410N - see above.

johannes


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] mac80211: disable u-APSD queues by default
  2015-03-03  9:36     ` Johannes Berg
@ 2015-03-03 10:15       ` Krishna Chaitanya
  2015-03-03 10:28         ` Michal Kazior
  0 siblings, 1 reply; 7+ messages in thread
From: Krishna Chaitanya @ 2015-03-03 10:15 UTC (permalink / raw)
  To: Johannes Berg; +Cc: Michal Kazior, linux-wireless

On Tue, Mar 3, 2015 at 3:06 PM, Johannes Berg <johannes@sipsolutions.net> wrote:
>
>> >> Cisco 4410N originally forced us to enable VO by
>> >> default only because it treated non-VO ACs as
>> >> legacy.
>
>> Mixed mode (uapsd + legacy) is not really the optimal
>> configuration, where we expect STA to send trigger frames periodically
>> to retrieve the DL packets (especially very first packet).
>>
>> But still if we want power save, i suggest going for
>> All u-apsd (0xF), so that AP will inform us by setting the TIM bit
>> and we can retrieve the first frame.
>> (We have this patch internally and it works well).
>
> Except where it doesn't work, like on the Cisco 4410N - see above.
But for that single AP, we are forced to lose efficient power savings
unless user configured explicitly.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] mac80211: disable u-APSD queues by default
  2015-03-03 10:15       ` Krishna Chaitanya
@ 2015-03-03 10:28         ` Michal Kazior
  2015-03-03 11:20           ` Krishna Chaitanya
  0 siblings, 1 reply; 7+ messages in thread
From: Michal Kazior @ 2015-03-03 10:28 UTC (permalink / raw)
  To: Krishna Chaitanya; +Cc: Johannes Berg, linux-wireless

On 3 March 2015 at 11:15, Krishna Chaitanya <chaitanya.mgit@gmail.com> wrote:
> On Tue, Mar 3, 2015 at 3:06 PM, Johannes Berg <johannes@sipsolutions.net> wrote:
>>
>>> >> Cisco 4410N originally forced us to enable VO by
>>> >> default only because it treated non-VO ACs as
>>> >> legacy.
>>
>>> Mixed mode (uapsd + legacy) is not really the optimal
>>> configuration, where we expect STA to send trigger frames periodically
>>> to retrieve the DL packets (especially very first packet).
>>>
>>> But still if we want power save, i suggest going for
>>> All u-apsd (0xF), so that AP will inform us by setting the TIM bit
>>> and we can retrieve the first frame.
>>> (We have this patch internally and it works well).
>>
>> Except where it doesn't work, like on the Cisco 4410N - see above.
> But for that single AP, we are forced to lose efficient power savings
> unless user configured explicitly.

Correct me if I'm wrong, but u-APSD makes sense only if you have
userspace apps aware of it. I don't know any. VoIP traffic uses and it
works just because it generate bi-directional traffic in most cases so
you have implicit trigger frames generated when you Tx, but that's
probably as far as the practical use-case goes, no? You'd still need
netfilter rules to reclassify your traffic anyway, wouldn't you? If
you mainly wait for data you need to send trigger frames periodically
and only userspace app knows what Rx latency is tolerated (that's why
relying on driver/firmware auto-trigger generation doesn't cut it).

Anyway I don't think you can ask users to do the opposite (i.e.
disable u-APSD if they experience problems with APs). Wi-Fi should
Just Work. Joys of IOT..


Michał

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] mac80211: disable u-APSD queues by default
  2015-03-03 10:28         ` Michal Kazior
@ 2015-03-03 11:20           ` Krishna Chaitanya
  0 siblings, 0 replies; 7+ messages in thread
From: Krishna Chaitanya @ 2015-03-03 11:20 UTC (permalink / raw)
  To: Michal Kazior; +Cc: Johannes Berg, linux-wireless

On Tue, Mar 3, 2015 at 3:58 PM, Michal Kazior <michal.kazior@tieto.com> wrote:
> On 3 March 2015 at 11:15, Krishna Chaitanya <chaitanya.mgit@gmail.com> wrote:
>> On Tue, Mar 3, 2015 at 3:06 PM, Johannes Berg <johannes@sipsolutions.net> wrote:
>>>
>>>> >> Cisco 4410N originally forced us to enable VO by
>>>> >> default only because it treated non-VO ACs as
>>>> >> legacy.
>>>
>>>> Mixed mode (uapsd + legacy) is not really the optimal
>>>> configuration, where we expect STA to send trigger frames periodically
>>>> to retrieve the DL packets (especially very first packet).
>>>>
>>>> But still if we want power save, i suggest going for
>>>> All u-apsd (0xF), so that AP will inform us by setting the TIM bit
>>>> and we can retrieve the first frame.
>>>> (We have this patch internally and it works well).
>>>
>>> Except where it doesn't work, like on the Cisco 4410N - see above.
>> But for that single AP, we are forced to lose efficient power savings
>> unless user configured explicitly.
>
> Correct me if I'm wrong, but u-APSD makes sense only if you have
> userspace apps aware of it. I don't know any. VoIP traffic uses and it
> works just because it generate bi-directional traffic in most cases so
> you have implicit trigger frames generated when you Tx, but that's
> probably as far as the practical use-case goes, no? You'd still need
> netfilter rules to reclassify your traffic anyway, wouldn't you? If
> you mainly wait for data you need to send trigger frames periodically
> and only userspace app knows what Rx latency is tolerated (that's why
> relying on driver/firmware auto-trigger generation doesn't cut it).

Agree u-apsd is tightly coupled with the applications. But there is a
provision in the protocol to deliver buffered frames without sending
explicit triggers (which is quite waste of tx power). So it might be
optimized for each application, but overall it will not break the
functionality for those drivers who do not send explicit triggers
frames periodically.

Even for unidirectional protocol has a provison when All AC's are
delivery enabled, it will still set the TIM bit, so using which we can
start sending trigger frames. So either disabling/enabling u-apsd is
fine aslong as we do it for all AC's together, mixed mode is useless.

>
> Anyway I don't think you can ask users to do the opposite (i.e.
> disable u-APSD if they experience problems with APs). Wi-Fi should
> Just Work. Joys of IOT..
May be in utopia ;-).




-- 
Thanks,
Regards,
Chaitanya T K.

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2015-03-03 11:20 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-02-10 11:48 [PATCH] mac80211: disable u-APSD queues by default Michal Kazior
2015-03-03  9:16 ` Johannes Berg
2015-03-03  9:33   ` Krishna Chaitanya
2015-03-03  9:36     ` Johannes Berg
2015-03-03 10:15       ` Krishna Chaitanya
2015-03-03 10:28         ` Michal Kazior
2015-03-03 11:20           ` Krishna Chaitanya

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.