All of lore.kernel.org
 help / color / mirror / Atom feed
From: Johannes Berg <johannes@sipsolutions.net>
To: Karl Beldan <karl.beldan@gmail.com>
Cc: Helmut Schaa <helmut.schaa@googlemail.com>,
	linux-wireless <linux-wireless@vger.kernel.org>,
	Karl Beldan <karl.beldan@rivierawaves.com>,
	Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Subject: Re: [PATCH] mac80211: send {add,del}ba on AC_VO like other mgmt frames, as per spec
Date: Wed, 22 Jan 2014 19:51:53 +0100	[thread overview]
Message-ID: <1390416713.4334.46.camel@jlt4.sipsolutions.net> (raw)
In-Reply-To: <20140122164122.GC18365@magnum.frso.rivierawaves.com> (sfid-20140122_174223_742162_FF2E246A)

On Wed, 2014-01-22 at 17:41 +0100, Karl Beldan wrote:

> > >> If a DELBA is sent as AC_VO it might get received before the last AMPDU
> > >> of the BlockAck session. So, the pending AMPDUs will get dropped at the
> > >> receiver.
> > >>
> > >> In theory this could also be avoided by properly flushing all pending AMPDUs
> > >> of the TID in question from the hw queues or by waiting for the tx status
> > >> of all pending AMPDUs.

Let's get the issue straight first.

The (current) documentation for the TX_STOP ampdu actions says:

 * @IEEE80211_AMPDU_TX_STOP_CONT: stop TX aggregation but continue
transmitting
 *      queued packets, now unaggregated. After all packets are
transmitted the
 *      driver has to call ieee80211_stop_tx_ba_cb_irqsafe().
 * @IEEE80211_AMPDU_TX_STOP_FLUSH: stop TX aggregation and flush all
packets,
 *      called when the station is removed. There's no need or reason to
call
 *      ieee80211_stop_tx_ba_cb_irqsafe() in this case as mac80211
assumes the
 *      session is gone and removes the station.
 * @IEEE80211_AMPDU_TX_STOP_FLUSH_CONT: called when TX aggregation is
stopped
 *      but the driver hasn't called ieee80211_stop_tx_ba_cb_irqsafe()
yet and
 *      now the connection is dropped and the station will be removed.
Drivers
 *      should clean up and drop remaining packets when this is called.

I say "current" because we only completed this fairly recently (couple
months ago?) to make it complete with the three different possibilities.

Therefore, I don't think there's a need to ever *flush* the queues,
although the term "flush" is getting confusing and we should probably
call this IEEE80211_AMPDU_TX_STOP_DROP instead of _FLUSH, as that's what
it really means, drop all the remaining frames (if any.)

Given the fact that we only send the frame from
ieee80211_stop_tx_ba_cb() I don't see any problem. Even if we were to
send the frame directly after calling the ampdu_action, it seems it
would be fine, since the callback (now) requires sending the remaining
frames unaggregated. (Given that, I'm not even sure why we required the
packets to be sent unaggregated, Emmanuel, do you remember?)

> Callers of ieee80211_stop_tx_ba_cb_irqsafe are:
> ath9k
> ath9k_htc
> carl9170
> wcn36xx
> brcm80211
> iwlegacy
> iwlwifi
> mwl8k
> rt2x00
> rtlwifi
> 
> Johannes, what is your impression ?

I'm pretty sure iwlwifi should be safe. ath9k/htc/carl9170/wcn36xx are
probably fine, I can't really say anything about the other ones. I'd
guess brcm80211 should be OK since it builds aggregates in software and
should be able to easily stop transmitting aggregates. But see above - I
don't see how even if the driver didn't stop sending aggregates it could
be wrong. Unless the driver called ieee80211_stop_tx_ba_cb() immediately
but didn't actually stop sending. That's pretty much a bug anyway
though.

johannes


  reply	other threads:[~2014-01-22 18:51 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-01-22 11:52 [PATCH] mac80211: send {add,del}ba on AC_VO like other mgmt frames, as per spec Karl Beldan
2014-01-22 12:34 ` Johannes Berg
2014-01-22 13:09   ` Karl Beldan
2014-01-22 13:33     ` Helmut Schaa
2014-01-22 15:28       ` Karl Beldan
2014-01-22 15:36         ` Helmut Schaa
2014-01-22 16:41           ` Karl Beldan
2014-01-22 18:51             ` Johannes Berg [this message]
2014-01-22 19:16               ` Karl Beldan
2014-01-22 19:21                 ` Johannes Berg
2014-01-22 20:47                   ` Helmut Schaa
2014-01-23  6:08                     ` Grumbach, Emmanuel
2014-01-23 13:42                       ` Helmut Schaa
2014-01-23 14:08                         ` Johannes Berg
2014-01-23 19:06                           ` [PATCH v2] mac80211: send {ADD,DEL}BA " Karl Beldan
2014-01-23 19:15                             ` Johannes Berg
2014-01-23 19:38                               ` Karl Beldan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1390416713.4334.46.camel@jlt4.sipsolutions.net \
    --to=johannes@sipsolutions.net \
    --cc=emmanuel.grumbach@intel.com \
    --cc=helmut.schaa@googlemail.com \
    --cc=karl.beldan@gmail.com \
    --cc=karl.beldan@rivierawaves.com \
    --cc=linux-wireless@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.