linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Toke Høiland-Jørgensen" <toke@toke.dk>
To: Tim Shepard <shep@alum.mit.edu>
Cc: linux-wireless@vger.kernel.org,
	make-wifi-fast@lists.bufferbloat.net,
	ath9k-devel@lists.ath9k.org, Felix Fietkau <nbd@nbd.name>
Subject: Re: [PATCH v3] ath9k: Switch to using mac80211 intermediate software queues.
Date: Sat, 09 Jul 2016 17:44:48 +0200	[thread overview]
Message-ID: <874m7ylssv.fsf@toke.dk> (raw)
In-Reply-To: <E1bLYmw-0004wm-00@www.xplot.org> (Tim Shepard's message of "Fri, 08 Jul 2016 12:38:02 -0400")

Tim Shepard <shep@alum.mit.edu> writes:

>> The old code path in ath_tx_start that would queue packets has been
>> removed completely, 
>
> It seems to me that this breaks the ath9k driver when non-data packets
> which mac80211 will not queue on the new intermediate queues, see
> ieee80211_drv_tx( ) in mac80211/tx.c where it says
>
> 	if (!ieee80211_is_data(hdr->frame_control))
> 		goto tx_normal;
>
> This means that non-data packets can come down from mac80211 via
> ath_tx --> ath_tx_start which might be for a vif that is not on the
> same channel, and so cannot be sent straight away but must be queued.
> Maybe this problem should be fixed in mac80211, but as of now this is
> a problem.   It appears to me that your new patch just sends them on
> the wrong channel.

Well, the idea is that the chanctx code will call ieee80211_stop_queue()
to make sure that packets for the wrong context are not pushed down to
the driver.

>> as has the qlen limit tunables (since there's no
>> longer a queue in the driver to limit).
>
>> diff --git a/drivers/net/wireless/ath/ath9k/ath9k.h b/drivers/net/wireless/ath/ath9k/ath9k.h
>> index 5294595..daf972c 100644
>> --- a/drivers/net/wireless/ath/ath9k/ath9k.h
>> +++ b/drivers/net/wireless/ath/ath9k/ath9k.h
>> @@ -91,7 +91,6 @@ int ath_descdma_setup(struct ath_softc *sc, struct ath_descdma *dd,
>>  #define ATH_RXBUF               512
>>  #define ATH_TXBUF               512
>>  #define ATH_TXBUF_RESERVE       5
>> -#define ATH_MAX_QDEPTH          (ATH_TXBUF / 4 - ATH_TXBUF_RESERVE)
>>  #define ATH_TXMAXTRY            13
>>  #define ATH_MAX_SW_RETRIES      30
>
> I thought the purpose of ATH_MAX_QDEPTH was due to a limit on the
> depth of a hardware FIFO.

It's not. The limit is way too high for that. I'm a little fuzzy on the
details, but the hardware queue depth is somewhat lower:

#define ATH_TXFIFO_DEPTH           8

The ATH_MAX_QDEPTH was supposed to keep the number of packets queued in
the driver under control. And since we're no longer queueing in the
driver, there's no longer a need for it.

> Not all packets that get handed to the hardware come through a
> software queue (e.g. those that bypass the intermediate queueing in
> mac80211 now) and (it seems to me) there needs to be a limit to
> prevent overflowing a hardware fifo. Yes, normal data packets are
> (much) further limited as you taught me a few weeks ago, but not all
> packets are subject to that constraint (as far as I can understand at
> the moment). I'm not entirely sure of the details, but I think it is
> the sorts of packets sent directly by hostapd and wpa_supplicant that
> bypass all the queueing. And maybe those things aren't likely to be
> sending a burst of hundreds of packets in a very short period of time
> (where it could overrun the FIFO), but there may be other tools that
> send raw 802.11 non-data packets which could then overflow the above
> limit, and it seems you are removing the check. Actually I think my
> original version of this patch may have had a flaw in that some
> combination of non-data and data packets could be combined to overflow
> this limit (since I failed to check overflowing this limit where I
> pulled from the mac80211 intermediate queue).

Hmm, I'm not sure I can confidently say that what you describe would
never happen. But I'm pretty sure that ATH_MAX_QDEPTH wasn't what was
keeping it from happening...

-Toke

  reply	other threads:[~2016-07-09 15:44 UTC|newest]

Thread overview: 68+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-17  9:09 [PATCH 0/2] ath9k: Add airtime fairness scheduler Toke Høiland-Jørgensen
2016-06-17  9:09 ` [PATCH 1/2] ath9k: use mac80211 intermediate software queues Toke Høiland-Jørgensen
2016-06-17 13:28   ` Felix Fietkau
2016-06-17 13:41     ` Tim Shepard
2016-06-17 14:35       ` Felix Fietkau
2016-06-17 17:45         ` Tim Shepard
2016-06-17 19:15           ` Toke Høiland-Jørgensen
2016-06-17 13:43     ` Toke Høiland-Jørgensen
2016-06-17 13:48       ` Felix Fietkau
2016-06-17 16:33         ` Felix Fietkau
2016-06-17 14:10     ` [ath9k-devel] " Dave Taht
2016-06-18 19:05   ` [PATCH] ath9k: Switch to using " Toke Høiland-Jørgensen
2016-06-19  3:17     ` Tim Shepard
2016-06-19  8:52       ` Toke Høiland-Jørgensen
2016-06-19 13:39         ` Tim Shepard
2016-06-19 13:50           ` Toke Høiland-Jørgensen
2016-07-03  3:52     ` Tim Shepard
2016-07-04 17:46       ` Toke Høiland-Jørgensen
2016-07-06 13:23         ` Felix Fietkau
2016-07-06 14:45           ` Toke Høiland-Jørgensen
2016-07-06 16:16     ` [PATCH v2] " Toke Høiland-Jørgensen
2016-07-06 17:57       ` Sebastian Gottschall
2016-07-06 18:13       ` Felix Fietkau
2016-07-06 18:52         ` Toke Høiland-Jørgensen
2016-07-06 18:59           ` Felix Fietkau
2016-07-06 19:08             ` Toke Høiland-Jørgensen
2016-07-06 19:34       ` [PATCH v3] " Toke Høiland-Jørgensen
2016-07-08 14:26         ` [v3] " Kalle Valo
2016-07-08 15:53           ` Toke Høiland-Jørgensen
2016-07-08 16:10             ` Felix Fietkau
2016-07-08 16:28               ` Toke Høiland-Jørgensen
2016-07-08 16:31                 ` Felix Fietkau
2016-07-08 16:38                   ` Toke Høiland-Jørgensen
2016-07-08 18:24                   ` Sebastian Gottschall
2016-07-09 12:00                     ` Toke Høiland-Jørgensen
2016-07-08 16:38         ` [PATCH v3] " Tim Shepard
2016-07-09 15:44           ` Toke Høiland-Jørgensen [this message]
2016-08-05 16:03         ` [PATCH v4] " Toke Høiland-Jørgensen
2016-08-22 15:43           ` Kalle Valo
2016-08-22 16:16             ` Toke Høiland-Jørgensen
2016-08-22 17:02               ` Kalle Valo
2016-08-22 17:13                 ` Toke Høiland-Jørgensen
2016-08-23  6:59                   ` Kalle Valo
2016-08-23  8:52                     ` Arend van Spriel
2016-10-05 14:02                     ` Toke Høiland-Jørgensen
2016-10-05 15:50                       ` Kalle Valo
2016-10-05 16:55                         ` Toke Høiland-Jørgensen
2016-10-05 17:54                           ` Kalle Valo
2016-10-05 19:56                             ` Toke Høiland-Jørgensen
2016-09-02 14:00           ` [PATCH v5] " Toke Høiland-Jørgensen
2016-09-03 10:16             ` Felix Fietkau
2016-10-07 11:43             ` [v5] " Kalle Valo
2016-11-09  2:22             ` Kalle Valo
2016-11-09  2:44               ` Tim Shepard
2016-11-09 10:42                 ` Toke Høiland-Jørgensen
2016-11-09 20:07                   ` Valo, Kalle
2016-11-09 11:31             ` [PATCH v6] " Toke Høiland-Jørgensen
2016-11-09 22:42               ` [v6] " Kalle Valo
2016-11-09 23:10                 ` Toke Høiland-Jørgensen
2016-11-15 15:00               ` Kalle Valo
2016-06-17  9:09 ` [PATCH 2/2] ath9k: Add a per-station airtime deficit scheduler Toke Høiland-Jørgensen
2016-11-24 13:54 ` [PATCH v2] ath9k: Introduce airtime fairness scheduling between stations Toke Høiland-Jørgensen
2016-11-25 15:16   ` Valo, Kalle
2016-11-27 15:58     ` Toke Høiland-Jørgensen
2016-11-28  9:34       ` Felix Fietkau
2016-11-28 10:00         ` Toke Høiland-Jørgensen
2016-11-28 10:12 ` [PATCH v3] " Toke Høiland-Jørgensen
2016-12-15  8:43   ` [v3] " Kalle Valo

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=874m7ylssv.fsf@toke.dk \
    --to=toke@toke.dk \
    --cc=ath9k-devel@lists.ath9k.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=make-wifi-fast@lists.bufferbloat.net \
    --cc=nbd@nbd.name \
    --cc=shep@alum.mit.edu \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).