Linux wireless drivers development
 help / color / mirror / Atom feed
From: "Tomas Winkler" <tomasw@gmail.com>
To: "Johannes Berg" <johannes@sipsolutions.net>,
	"David Miller" <davem@davemloft.net>
Cc: linux-wireless <linux-wireless@vger.kernel.org>,
	"Guy Cohen" <guy.cohen@intel.com>,
	"Rindjunsky, Ron" <ron.rindjunsky@intel.com>
Subject: Another fragmentation multiqueue kludge
Date: Thu, 24 Jul 2008 00:41:57 +0300	[thread overview]
Message-ID: <1ba2fa240807231441u7b870a15rb525771e364f65f3@mail.gmail.com> (raw)

Here is the scenario. This is happening with what we have in
wireless-testing code

When hw queue get full we call
 ieeee80211_stop_queue(dev, q);

When this is happens in the middle of the fragmentation . This is
easiest to reproduces  with fragmentation but probably happens also in
other cases.

int __ieee80211_tx()
....

if (netif_subqueue_stopped(local->mdev,
						   tx->extra_frag[i]))
				return IEEE80211_TX_FRAG_AGAIN;


The fragment should  stored into local->queues_pending[queue]
(Actually I'm not sure it is)

now when we HW queue got cleared a bit we call wake queues where
tx_pending_tasklet is woken up ( queue is not woken up here)

void ieee80211_wake_queue(struct ieee80211_hw *hw, int queue)
{
	struct ieee80211_local *local = hw_to_local(hw);

	if (test_bit(queue, local->queues_pending)) {
		tasklet_schedule(&local->tx_pending_tasklet);
	}
      ..... <snip>
}

The check if the queue  is open causes that queue is actually never
woken up so traffic is stalled. However removing this line causes some
other panic I didn't have time to process.

void ieee80211_tx_pending(unsigned long data)
{
<snip>

	netif_tx_lock_bh(dev);
	for (i = 0; i < ieee80211_num_regular_queues(&local->hw); i++) {
		/* Check that this queue is ok */
		if (__netif_subqueue_stopped(local->mdev, i))
--- This line causes that fact that the actual wake queue is never
called.
			continue;

		if (!test_bit(i, local->queues_pending)) {
			ieee80211_wake_queue(&local->hw, i);
			continue;
		}
</snip>

             reply	other threads:[~2008-07-23 21:42 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-07-23 21:41 Tomas Winkler [this message]
2008-07-24 13:01 ` Another fragmentation multiqueue kludge Tomas Winkler
2008-07-24 14:16   ` Johannes Berg
2008-07-24 14:37     ` Tomas Winkler
2008-07-24 14:46       ` Johannes Berg
2008-07-24 14:55         ` Tomas Winkler
2008-07-24 14:59           ` Johannes Berg
2008-07-24 15:02             ` Tomas Winkler

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=1ba2fa240807231441u7b870a15rb525771e364f65f3@mail.gmail.com \
    --to=tomasw@gmail.com \
    --cc=davem@davemloft.net \
    --cc=guy.cohen@intel.com \
    --cc=johannes@sipsolutions.net \
    --cc=linux-wireless@vger.kernel.org \
    --cc=ron.rindjunsky@intel.com \
    /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