* DELBA processed in workqueue too slow?
@ 2012-02-06 15:48 Helmut Schaa
2012-02-14 10:59 ` Johannes Berg
0 siblings, 1 reply; 3+ messages in thread
From: Helmut Schaa @ 2012-02-06 15:48 UTC (permalink / raw)
To: linux-wireless
Hi,
since all action frames are handled in the iface workqueue the following
situation can cause problems on slow devices in AP mode:
- data stream AP -> STA with established TX BA session
- peer sends a DELBA to tear the APs TX BA session down
- new frames are still send as AMPDU but the receiver doesn't BlockAck
them anymore since it assumes the BA session is already teared down.
- DELBA gets processed
Hence, most frames between receiving the DELBA and actually processing
it are basically lost. This can easily make TCP streams getting stuck for a
few seconds :(
Any ideas?
Thanks,
Helmut
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: DELBA processed in workqueue too slow?
2012-02-06 15:48 DELBA processed in workqueue too slow? Helmut Schaa
@ 2012-02-14 10:59 ` Johannes Berg
2012-02-14 12:46 ` Helmut Schaa
0 siblings, 1 reply; 3+ messages in thread
From: Johannes Berg @ 2012-02-14 10:59 UTC (permalink / raw)
To: Helmut Schaa; +Cc: linux-wireless
On Mon, 2012-02-06 at 16:48 +0100, Helmut Schaa wrote:
> Hi,
>
> since all action frames are handled in the iface workqueue the following
> situation can cause problems on slow devices in AP mode:
>
> - data stream AP -> STA with established TX BA session
> - peer sends a DELBA to tear the APs TX BA session down
> - new frames are still send as AMPDU but the receiver doesn't BlockAck
> them anymore since it assumes the BA session is already teared down.
> - DELBA gets processed
> Hence, most frames between receiving the DELBA and actually processing
> it are basically lost. This can easily make TCP streams getting stuck for a
> few seconds :(
Why are they lost? They haven't been acknowledged so wouldn't they be
retransmitted?
In any case, it seems the easiest solution may be to stop queues? But to
really make this fool-proof you'd also have to tell the driver to
release all its internal buffers -- and you're never going to solve the
race completely.
johannes
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: DELBA processed in workqueue too slow?
2012-02-14 10:59 ` Johannes Berg
@ 2012-02-14 12:46 ` Helmut Schaa
0 siblings, 0 replies; 3+ messages in thread
From: Helmut Schaa @ 2012-02-14 12:46 UTC (permalink / raw)
To: Johannes Berg; +Cc: linux-wireless
On Tue, Feb 14, 2012 at 11:59 AM, Johannes Berg
<johannes@sipsolutions.net> wrote:
> On Mon, 2012-02-06 at 16:48 +0100, Helmut Schaa wrote:
>> Hi,
>>
>> since all action frames are handled in the iface workqueue the following
>> situation can cause problems on slow devices in AP mode:
>>
>> - data stream AP -> STA with established TX BA session
>> - peer sends a DELBA to tear the APs TX BA session down
>> - new frames are still send as AMPDU but the receiver doesn't BlockAck
>> them anymore since it assumes the BA session is already teared down.
>> - DELBA gets processed
>
>> Hence, most frames between receiving the DELBA and actually processing
>> it are basically lost. This can easily make TCP streams getting stuck for a
>> few seconds :(
>
> Why are they lost? They haven't been acknowledged so wouldn't they be
> retransmitted?
Yes, they are retried till the retransmit timeout is reached, but they
are retried
as AMPDU again (rt2x00 does this in hw).
> In any case, it seems the easiest solution may be to stop queues?
Not sure, the action frame processing in the workqueue was added
last year in this patch:
commit bed7ee6e44cb7633a4f9821688a6c7ae977615ed
Author: Johannes Berg <johannes.berg@intel.com>
Date: Thu Jun 10 10:21:35 2010 +0200
mac80211: always process blockack action from workqueue
To prepare for making the ampdu_action callback
sleep, make mac80211 always process blockack
action frames from the skb queue. This gets rid
of the current special case for managed mode
interfaces as well.
Before that it was directly processed in the rx path.
> But to
> really make this fool-proof you'd also have to tell the driver to
> release all its internal buffers -- and you're never going to solve the
> race completely.
Correct, we will always have a small race here but getting it as small
as possible
seems reasonable to me :)
Maybe we could at least set HT_AGG_STATE_STOPPING already in the rx
path such that the aggregation logic won't continue sending AMPDUs
to the driver and instead buffers them till the work queue is processed ...
Helmut
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2012-02-14 12:46 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-02-06 15:48 DELBA processed in workqueue too slow? Helmut Schaa
2012-02-14 10:59 ` Johannes Berg
2012-02-14 12:46 ` Helmut Schaa
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox