All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Toke Høiland-Jørgensen" <toke@toke.dk>
To: make-wifi-fast@lists.bufferbloat.net, linux-wireless@vger.kernel.org
Cc: "Toke Høiland-Jørgensen" <toke@toke.dk>
Subject: [PATCH v9 1/2] mac80211: Move ieee802111_tx_dequeue() to later in tx.c
Date: Thu, 22 Sep 2016 19:04:19 +0200	[thread overview]
Message-ID: <20160922170420.5193-2-toke@toke.dk> (raw)
In-Reply-To: <20160922170420.5193-1-toke@toke.dk>
In-Reply-To: <20160906114426.25520-1-toke@toke.dk>

The TXQ path restructure requires ieee80211_tx_dequeue() to call TX
handlers and parts of the xmit_fast path. Move the function to later in
tx.c in preparation for this.

Signed-off-by: Toke H=C3=B8iland-J=C3=B8rgensen <toke@toke.dk>
---
 net/mac80211/tx.c | 90 +++++++++++++++++++++++++++----------------------=
------
 1 file changed, 45 insertions(+), 45 deletions(-)

diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c
index 61d302d..e8c9964 100644
--- a/net/mac80211/tx.c
+++ b/net/mac80211/tx.c
@@ -1476,51 +1476,6 @@ void ieee80211_txq_teardown_flows(struct ieee80211=
_local *local)
 	spin_unlock_bh(&fq->lock);
 }
=20
-struct sk_buff *ieee80211_tx_dequeue(struct ieee80211_hw *hw,
-				     struct ieee80211_txq *txq)
-{
-	struct ieee80211_local *local =3D hw_to_local(hw);
-	struct txq_info *txqi =3D container_of(txq, struct txq_info, txq);
-	struct ieee80211_hdr *hdr;
-	struct sk_buff *skb =3D NULL;
-	struct fq *fq =3D &local->fq;
-	struct fq_tin *tin =3D &txqi->tin;
-
-	spin_lock_bh(&fq->lock);
-
-	if (test_bit(IEEE80211_TXQ_STOP, &txqi->flags))
-		goto out;
-
-	skb =3D fq_tin_dequeue(fq, tin, fq_tin_dequeue_func);
-	if (!skb)
-		goto out;
-
-	ieee80211_set_skb_vif(skb, txqi);
-
-	hdr =3D (struct ieee80211_hdr *)skb->data;
-	if (txq->sta && ieee80211_is_data_qos(hdr->frame_control)) {
-		struct sta_info *sta =3D container_of(txq->sta, struct sta_info,
-						    sta);
-		struct ieee80211_tx_info *info =3D IEEE80211_SKB_CB(skb);
-
-		hdr->seq_ctrl =3D ieee80211_tx_next_seq(sta, txq->tid);
-		if (test_bit(IEEE80211_TXQ_AMPDU, &txqi->flags))
-			info->flags |=3D IEEE80211_TX_CTL_AMPDU;
-		else
-			info->flags &=3D ~IEEE80211_TX_CTL_AMPDU;
-	}
-
-out:
-	spin_unlock_bh(&fq->lock);
-
-	if (skb && skb_has_frag_list(skb) &&
-	    !ieee80211_hw_check(&local->hw, TX_FRAG_LIST))
-		skb_linearize(skb);
-
-	return skb;
-}
-EXPORT_SYMBOL(ieee80211_tx_dequeue);
-
 static bool ieee80211_tx_frags(struct ieee80211_local *local,
 			       struct ieee80211_vif *vif,
 			       struct ieee80211_sta *sta,
@@ -3311,6 +3266,51 @@ static bool ieee80211_xmit_fast(struct ieee80211_s=
ub_if_data *sdata,
 	return true;
 }
=20
+struct sk_buff *ieee80211_tx_dequeue(struct ieee80211_hw *hw,
+				     struct ieee80211_txq *txq)
+{
+	struct ieee80211_local *local =3D hw_to_local(hw);
+	struct txq_info *txqi =3D container_of(txq, struct txq_info, txq);
+	struct ieee80211_hdr *hdr;
+	struct sk_buff *skb =3D NULL;
+	struct fq *fq =3D &local->fq;
+	struct fq_tin *tin =3D &txqi->tin;
+
+	spin_lock_bh(&fq->lock);
+
+	if (test_bit(IEEE80211_TXQ_STOP, &txqi->flags))
+		goto out;
+
+	skb =3D fq_tin_dequeue(fq, tin, fq_tin_dequeue_func);
+	if (!skb)
+		goto out;
+
+	ieee80211_set_skb_vif(skb, txqi);
+
+	hdr =3D (struct ieee80211_hdr *)skb->data;
+	if (txq->sta && ieee80211_is_data_qos(hdr->frame_control)) {
+		struct sta_info *sta =3D container_of(txq->sta, struct sta_info,
+						    sta);
+		struct ieee80211_tx_info *info =3D IEEE80211_SKB_CB(skb);
+
+		hdr->seq_ctrl =3D ieee80211_tx_next_seq(sta, txq->tid);
+		if (test_bit(IEEE80211_TXQ_AMPDU, &txqi->flags))
+			info->flags |=3D IEEE80211_TX_CTL_AMPDU;
+		else
+			info->flags &=3D ~IEEE80211_TX_CTL_AMPDU;
+	}
+
+out:
+	spin_unlock_bh(&fq->lock);
+
+	if (skb && skb_has_frag_list(skb) &&
+	    !ieee80211_hw_check(&local->hw, TX_FRAG_LIST))
+		skb_linearize(skb);
+
+	return skb;
+}
+EXPORT_SYMBOL(ieee80211_tx_dequeue);
+
 void __ieee80211_subif_start_xmit(struct sk_buff *skb,
 				  struct net_device *dev,
 				  u32 info_flags)
--=20
2.9.3

  parent reply	other threads:[~2016-09-22 17:04 UTC|newest]

Thread overview: 51+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-08-17 12:58 [PATCH] mac80211: Move crypto IV generation to after TXQ dequeue Toke Høiland-Jørgensen
2016-08-17 13:08 ` Johannes Berg
2016-08-17 13:16   ` Toke Høiland-Jørgensen
2016-08-17 13:18     ` Johannes Berg
2016-08-17 13:23       ` Toke Høiland-Jørgensen
2016-08-17 14:45 ` [PATCH v2] " Toke Høiland-Jørgensen
2016-08-17 19:49   ` Johannes Berg
2016-08-17 20:07     ` [Make-wifi-fast] " Dave Taht
2016-08-17 20:43       ` Johannes Berg
2016-08-22 14:47         ` Toke Høiland-Jørgensen
2016-08-26  8:38           ` Johannes Berg
2016-08-26  8:54             ` Toke Høiland-Jørgensen
2016-08-24 16:20   ` [PATCH v3] mac80211: Move reorder-sensitive TX handlers " Toke Høiland-Jørgensen
2016-08-30 13:15     ` [PATCH v4] " Toke Høiland-Jørgensen
2016-08-31 21:06       ` Johannes Berg
2016-09-01  8:23         ` Toke Høiland-Jørgensen
2016-09-01  8:34           ` Johannes Berg
2016-09-01  8:38             ` Toke Høiland-Jørgensen
2016-09-01  9:07               ` Johannes Berg
2016-09-01  9:20                 ` Toke Høiland-Jørgensen
2016-09-01  9:27                   ` Johannes Berg
2016-09-01  9:42                     ` Toke Høiland-Jørgensen
2016-09-01 16:03       ` [PATCH v5] " Toke Høiland-Jørgensen
2016-09-01 17:59         ` Johannes Berg
2016-09-01 18:30           ` Toke Høiland-Jørgensen
2016-09-01 18:35             ` Johannes Berg
2016-09-02  2:48         ` Jason Andryuk
2016-09-02  9:27           ` Toke Høiland-Jørgensen
2016-09-02 13:41         ` [PATCH v6] " Toke Høiland-Jørgensen
2016-09-02 14:44           ` Toke Høiland-Jørgensen
2016-09-05 11:30           ` [PATCH v7] " Toke Høiland-Jørgensen
2016-09-05 17:49             ` Felix Fietkau
2016-09-05 17:59               ` Toke Høiland-Jørgensen
2016-09-05 18:44                 ` Felix Fietkau
2016-09-06 11:43             ` Toke Høiland-Jørgensen
2016-09-06 11:45               ` Toke Høiland-Jørgensen
2016-09-06 11:44             ` [PATCH v8] " Toke Høiland-Jørgensen
2016-09-06 22:04               ` Felix Fietkau
2016-09-12 12:35               ` Johannes Berg
2016-09-12 13:08                 ` Toke Høiland-Jørgensen
2016-09-12 13:19                   ` Johannes Berg
2016-09-22 17:04               ` [PATCH v9 0/2] mac80211: TXQ dequeue path rework Toke Høiland-Jørgensen
2016-09-22 17:04               ` Toke Høiland-Jørgensen [this message]
2016-09-30 11:13                 ` [PATCH v9 1/2] mac80211: Move ieee802111_tx_dequeue() to later in tx.c Johannes Berg
2016-09-22 17:04               ` [PATCH v9 2/2] mac80211: Move reorder-sensitive TX handlers to after TXQ dequeue Toke Høiland-Jørgensen
2016-09-30 10:27                 ` Johannes Berg
2016-09-30 12:39                   ` Toke Høiland-Jørgensen
2016-09-30 12:43                     ` Johannes Berg
2016-09-30 12:45                       ` Toke Høiland-Jørgensen
2016-09-30 12:49                 ` Johannes Berg
2016-09-30 14:01                   ` 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=20160922170420.5193-2-toke@toke.dk \
    --to=toke@toke.dk \
    --cc=linux-wireless@vger.kernel.org \
    --cc=make-wifi-fast@lists.bufferbloat.net \
    /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.