ath9k-devel.lists.ath9k.org archive mirror
 help / color / mirror / Atom feed
From: Tim Shepard <shep@alum.mit.edu>
To: ath9k-devel@lists.ath9k.org
Subject: [ath9k-devel] [PATCH] ath9k: Switch to using mac80211 intermediate software queues.
Date: Sun, 03 Jul 2016 03:53:18 -0000	[thread overview]
Message-ID: <E1bJYSp-0001M8-00@www.xplot.org> (raw)
In-Reply-To: Your message of Sat, 18 Jun 2016 21:05:05 +0200. <20160618190505.24038-1-toke@toke.dk>




Toke,

I've been tesing your ath9k patch (using it instead of my earlier
ath9k patch) and plan to continue testing it.

Thanks for unconfusing me a couple weeks ago, and cluing me into how
the limit on ->pending_frames is not really relevant for the data
packets that go through the new intermediate queues.

But I'm not sure if this would allow us to remove the limit on
pending_frames because even though normal data packets would not
normally build up that many packets, there are other packet types
which bypass the intermediate queues and are transmitted directly
(also in most cases bypassing the ath9k internal queues in the way
ath9k worked before we patched it to use the mac80211 intermediate
queues).


Along similar lines, from reading the code I think your patch has
introduced a bug (but I don't know how to demonstrate it at runtime).

Looking in the body of ath_tx_start() at the result of applying your
patch, we now see this:

	[...]

	/* Force queueing of all frames that belong to a virtual interface on
	 * a different channel context, to ensure that they are sent on the
	 * correct channel.
	 */
	if (((avp && avp->chanctx != sc->cur_chan) ||
	     sc->cur_chan->stopped) && !txctl->force_channel) {
		if (!txctl->an)
			txctl->an = &avp->mcast_node;
		queue = true;
		skip_uapsd = true;
	}

	if (!skip_uapsd && ps_resp) {
		ath_txq_unlock(sc, txq);
		txq = sc->tx.uapsdq;
		ath_txq_lock(sc, txq);
	} else if(WARN_ON(txctl->an && queue)) 
		ath_txq_unlock(sc, txq);
		return -EINVAL;
	}

	[...]


In the case where the first if body above is run to force queuing of
all packets (not just normal data packets), then the else case of the
second if statement above will surely run and its if statement will
surely be true, so your new WARN_ON will happen.

This is why I left the previous ath9k internal queueing mechanisms in
place.  I couldn't figure out how to handle the above case without
leaving the ath9k internal queueing mechanisms.

I'm not sure how to test for this though... I don't know what sort of
configuration scenario I would need to set up to generate the above
situation and trigger the warning. (Presumably, it involves multiple
vifs on different channels.)  But unless the first if statement body
is dead code that can never happen, I think you've introduced a bug
here (with a good WARN_ON to make it obvious when it happens).

Earlier Felix said:

> Channel context based queue handling can be dealt with by
> stopping/starting relevant queues on channel context changes.

But I don't see how to handle the case here where packets get passed
to the driver with ath_tx_start() and wind up in the scenario above.


			-Tim Shepard
			 shep at alum.mit.edu

  parent reply	other threads:[~2016-07-03  3:53 UTC|newest]

Thread overview: 50+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-17  9:09 [ath9k-devel] [PATCH 0/2] ath9k: Add airtime fairness scheduler Toke Høiland-Jørgensen
2016-06-17  9:09 ` [ath9k-devel] [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:43     ` Toke Høiland-Jørgensen
2016-06-17 13:48       ` Felix Fietkau
2016-06-17 16:33         ` Felix Fietkau
2016-06-17 14:08     ` Tim Shepard
2016-06-17 14:35       ` Felix Fietkau
2016-06-17 17:45         ` Tim Shepard
2016-06-17 19:16           ` Toke Høiland-Jørgensen
2016-06-17 14:10     ` Dave Taht
2016-06-18 19:06   ` [ath9k-devel] [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:40         ` Tim Shepard
2016-06-19 13:50           ` Toke Høiland-Jørgensen
2016-07-03  3:53     ` Tim Shepard [this message]
2016-07-04 17:47       ` Toke Høiland-Jørgensen
2016-07-06 13:23         ` Felix Fietkau
2016-07-06 14:46           ` Toke Høiland-Jørgensen
2016-07-06 16:17     ` [ath9k-devel] [PATCH v2] " Toke Høiland-Jørgensen
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 18:19       ` Sebastian Gottschall
2016-07-06 19:38       ` [ath9k-devel] [PATCH v3] " Toke Høiland-Jørgensen
2016-07-08 14:26         ` [ath9k-devel] [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         ` [ath9k-devel] [PATCH v3] " Tim Shepard
2016-07-09 15:45           ` Toke Høiland-Jørgensen
2016-08-05 16:05         ` [ath9k-devel] [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:58                     ` Arend van Spriel
2016-10-05 14:09                     ` 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-06-17  9:09 ` [ath9k-devel] [PATCH 2/2] ath9k: Add a per-station airtime deficit scheduler Toke Høiland-Jørgensen

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=E1bJYSp-0001M8-00@www.xplot.org \
    --to=shep@alum.mit.edu \
    --cc=ath9k-devel@lists.ath9k.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 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).