summaryrefslogtreecommitdiffstats
path: root/net/mac80211/iface.c
diff options
context:
space:
mode:
authorMichal Kazior <michal.kazior@tieto.com>2016-05-19 04:37:49 -0400
committerJohannes Berg <johannes.berg@intel.com>2016-06-09 05:34:08 -0400
commitfa962b92120bb70693a4db545f89067eb3373294 (patch)
treec8e159c99501f312756ad295088c884ef2a2361c /net/mac80211/iface.c
parent80a83cfc434b1e3afe38974570b460db4898bec6 (diff)
mac80211: implement fair queueing per txq
mac80211's software queues were designed to work very closely with device tx queues. They are required to make use of 802.11 packet aggregation easily and efficiently. Due to the way 802.11 aggregation is designed it only makes sense to keep fair queuing as close to hardware as possible to reduce induced latency and inertia and provide the best flow responsiveness. This change doesn't translate directly to immediate and significant gains. End result depends on driver's induced latency. Best results can be achieved if driver keeps its own tx queue/fifo fill level to a minimum. Signed-off-by: Michal Kazior <michal.kazior@tieto.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/mac80211/iface.c')
-rw-r--r--net/mac80211/iface.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/net/mac80211/iface.c b/net/mac80211/iface.c
index 609c5174d798..b123a9e325b3 100644
--- a/net/mac80211/iface.c
+++ b/net/mac80211/iface.c
@@ -779,6 +779,7 @@ static void ieee80211_do_stop(struct ieee80211_sub_if_data *sdata,
779 bool going_down) 779 bool going_down)
780{ 780{
781 struct ieee80211_local *local = sdata->local; 781 struct ieee80211_local *local = sdata->local;
782 struct fq *fq = &local->fq;
782 unsigned long flags; 783 unsigned long flags;
783 struct sk_buff *skb, *tmp; 784 struct sk_buff *skb, *tmp;
784 u32 hw_reconf_flags = 0; 785 u32 hw_reconf_flags = 0;
@@ -976,13 +977,10 @@ static void ieee80211_do_stop(struct ieee80211_sub_if_data *sdata,
976 977
977 if (sdata->vif.txq) { 978 if (sdata->vif.txq) {
978 struct txq_info *txqi = to_txq_info(sdata->vif.txq); 979 struct txq_info *txqi = to_txq_info(sdata->vif.txq);
979 int n = skb_queue_len(&txqi->queue);
980 980
981 spin_lock_bh(&txqi->queue.lock); 981 spin_lock_bh(&fq->lock);
982 ieee80211_purge_tx_queue(&local->hw, &txqi->queue); 982 ieee80211_txq_purge(local, txqi);
983 atomic_sub(n, &sdata->num_tx_queued); 983 spin_unlock_bh(&fq->lock);
984 txqi->byte_cnt = 0;
985 spin_unlock_bh(&txqi->queue.lock);
986 } 984 }
987 985
988 if (local->open_count == 0) 986 if (local->open_count == 0)
@@ -1792,7 +1790,7 @@ int ieee80211_if_add(struct ieee80211_local *local, const char *name,
1792 1790
1793 if (txq_size) { 1791 if (txq_size) {
1794 txqi = netdev_priv(ndev) + size; 1792 txqi = netdev_priv(ndev) + size;
1795 ieee80211_init_tx_queue(sdata, NULL, txqi, 0); 1793 ieee80211_txq_init(sdata, NULL, txqi, 0);
1796 } 1794 }
1797 1795
1798 sdata->dev = ndev; 1796 sdata->dev = ndev;