From: Johannes Berg <johannes@sipsolutions.net>
To: Seth Forshee <seth.forshee@canonical.com>
Cc: linux-wireless@vger.kernel.org, Stanislaw Gruszka <sgruszka@redhat.com>
Subject: Re: [PATCH v4 1/2] mac80211: Fix tx queue handling during scans
Date: Mon, 11 Feb 2013 22:40:44 +0100 [thread overview]
Message-ID: <1360618844.8738.49.camel@jlt4.sipsolutions.net> (raw)
In-Reply-To: <1360603268-28594-1-git-send-email-seth.forshee@canonical.com>
On Mon, 2013-02-11 at 11:21 -0600, Seth Forshee wrote:
> + * @IEEE80211_TX_CTL_OFFCHAN_TX_OK: Internal to mac80211. Used to indicate
> + * that a frame can be transmitted while the queues are stopped for
> + * off-channel operation.
I'm renaming this to INTFL_ instead of CTL_, any objections? I don't
think drivers should (need to) use it.
> --- a/net/mac80211/tx.c
> +++ b/net/mac80211/tx.c
> @@ -1228,8 +1228,21 @@ static bool ieee80211_tx_frags(struct ieee80211_local *local,
> #endif
>
> spin_lock_irqsave(&local->queue_stop_reason_lock, flags);
> - if (local->queue_stop_reasons[q] ||
> - (!txpending && !skb_queue_empty(&local->pending[q]))) {
> + if (unlikely(info->flags & IEEE80211_TX_CTL_OFFCHAN_TX_OK)) {
> + /*
> + * Drop off-channel frames if queues are stopped for
> + * any reason other than off-channel operation. Never
> + * queue them.
> + */
> + if (local->queue_stop_reasons[q] &
> + ~BIT(IEEE80211_QUEUE_STOP_REASON_OFFCHANNEL)) {
> + spin_unlock_irqrestore(&local->queue_stop_reason_lock,
> + flags);
> + ieee80211_purge_tx_queue(&local->hw, skbs);
> + return true;
> + }
> + } else if (local->queue_stop_reasons[q] ||
> + (!txpending && !skb_queue_empty(&local->pending[q]))) {
I think this bit would be better written like this:
--- a/net/mac80211/tx.c
+++ b/net/mac80211/tx.c
@@ -1230,6 +1230,21 @@ static bool ieee80211_tx_frags(struct ieee80211_local *local,
spin_lock_irqsave(&local->queue_stop_reason_lock, flags);
if (local->queue_stop_reasons[q] ||
(!txpending && !skb_queue_empty(&local->pending[q]))) {
+ if (unlikely(info->flags &
+ IEEE80211_TX_INTFL_OFFCHAN_TX_OK &&
+ local->queue_stop_reasons[q] &
+ ~BIT(IEEE80211_QUEUE_STOP_REASON_OFFCHANNEL))) {
+ /*
+ * Drop off-channel frames if queues are stopped
+ * for any reason other than off-channel
+ * operation. Never queue them.
+ */
+ spin_unlock_irqrestore(
+ &local->queue_stop_reason_lock, flags);
+ ieee80211_purge_tx_queue(&local->hw, skbs);
+ return true;
+ }
+
/*
* Since queue is stopped, queue up frames for later
* transmission from the tx-pending tasklet when the
That would avoid hitting the fast-path as much, since the queues being
stopped is already something of a slow-path (and if they're stopped it
doesn't matter much ... packets won't go out soon anyway.)
I've made those changes, so just let me know if that seems OK, patch 2 I
also applied.
johannes
next prev parent reply other threads:[~2013-02-11 21:40 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-02-06 15:01 [PATCH 0/4] Improve queue handling for off-channel operation Seth Forshee
2013-02-06 15:01 ` [PATCH 1/4] mac80211: Return a status for tx operations Seth Forshee
2013-02-06 15:01 ` [PATCH 2/4] mac80211: Fix tx queue handling during scans Seth Forshee
2013-02-06 15:01 ` [PATCH 3/4] mac80211: Improve error handling for off-channel operation Seth Forshee
2013-02-06 21:44 ` Johannes Berg
2013-02-06 22:05 ` Seth Forshee
2013-02-06 22:10 ` Johannes Berg
2013-02-06 22:20 ` Seth Forshee
2013-02-06 22:26 ` Johannes Berg
2013-02-06 22:30 ` Johannes Berg
2013-02-07 17:54 ` [PATCH v3 1/2] mac80211: Fix tx queue handling during scans Seth Forshee
2013-02-07 17:54 ` [PATCH v3 2/2] mac80211: Add flushes before going off-channel Seth Forshee
2013-02-08 9:03 ` [PATCH v3 1/2] mac80211: Fix tx queue handling during scans Johannes Berg
2013-02-08 17:11 ` Seth Forshee
2013-02-08 17:17 ` Johannes Berg
2013-02-08 18:10 ` Seth Forshee
2013-02-08 19:05 ` Johannes Berg
2013-02-08 20:46 ` Seth Forshee
2013-02-08 20:53 ` Johannes Berg
2013-02-11 17:18 ` Seth Forshee
2013-02-11 17:21 ` [PATCH v4 " Seth Forshee
2013-02-11 17:21 ` [PATCH v4 2/2] mac80211: Add flushes before going off-channel Seth Forshee
2013-02-11 21:40 ` Johannes Berg [this message]
2013-02-11 21:50 ` [PATCH v4 1/2] mac80211: Fix tx queue handling during scans Seth Forshee
2013-02-06 15:01 ` [PATCH 4/4] mac80211: Add flushes before going off-channel Seth Forshee
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=1360618844.8738.49.camel@jlt4.sipsolutions.net \
--to=johannes@sipsolutions.net \
--cc=linux-wireless@vger.kernel.org \
--cc=seth.forshee@canonical.com \
--cc=sgruszka@redhat.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 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.