提交 73bc9e0a 编写于 作者: J Johannes Berg

mac80211: don't apply flow control on management frames

In some cases (depending on the driver, but it's true e.g. for
iwlwifi) we're using an internal TXQ for management packets,
mostly to simplify the code and to have a place to queue them.
However, it appears that in certain cases we can confuse the
code and management frames are dropped, which is certainly not
what we want.

Short-circuit the processing of management frames. To keep the
impact minimal, only put them on the frags queue and check the
tid == management only for doing that and to skip the airtime
fairness checks, if applicable.
Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
Acked-by: NToke Høiland-Jørgensen <toke@redhat.com>
Link: https://lore.kernel.org/r/20210319232800.0e876c800866.Id2b66eb5a17f3869b776c39b5ca713272ea09d5d@changeidSigned-off-by: NJohannes Berg <johannes.berg@intel.com>
上级 272cd0e8
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
* Copyright 2006-2007 Jiri Benc <jbenc@suse.cz> * Copyright 2006-2007 Jiri Benc <jbenc@suse.cz>
* Copyright 2007 Johannes Berg <johannes@sipsolutions.net> * Copyright 2007 Johannes Berg <johannes@sipsolutions.net>
* Copyright 2013-2014 Intel Mobile Communications GmbH * Copyright 2013-2014 Intel Mobile Communications GmbH
* Copyright (C) 2018-2020 Intel Corporation * Copyright (C) 2018-2021 Intel Corporation
* *
* Transmit and frame generation functions. * Transmit and frame generation functions.
*/ */
...@@ -1388,8 +1388,17 @@ static void ieee80211_txq_enqueue(struct ieee80211_local *local, ...@@ -1388,8 +1388,17 @@ static void ieee80211_txq_enqueue(struct ieee80211_local *local,
ieee80211_set_skb_enqueue_time(skb); ieee80211_set_skb_enqueue_time(skb);
spin_lock_bh(&fq->lock); spin_lock_bh(&fq->lock);
fq_tin_enqueue(fq, tin, flow_idx, skb, /*
fq_skb_free_func); * For management frames, don't really apply codel etc.,
* we don't want to apply any shaping or anything we just
* want to simplify the driver API by having them on the
* txqi.
*/
if (unlikely(txqi->txq.tid == IEEE80211_NUM_TIDS))
__skb_queue_tail(&txqi->frags, skb);
else
fq_tin_enqueue(fq, tin, flow_idx, skb,
fq_skb_free_func);
spin_unlock_bh(&fq->lock); spin_unlock_bh(&fq->lock);
} }
...@@ -3835,6 +3844,9 @@ bool ieee80211_txq_airtime_check(struct ieee80211_hw *hw, ...@@ -3835,6 +3844,9 @@ bool ieee80211_txq_airtime_check(struct ieee80211_hw *hw,
if (!txq->sta) if (!txq->sta)
return true; return true;
if (unlikely(txq->tid == IEEE80211_NUM_TIDS))
return true;
sta = container_of(txq->sta, struct sta_info, sta); sta = container_of(txq->sta, struct sta_info, sta);
if (atomic_read(&sta->airtime[txq->ac].aql_tx_pending) < if (atomic_read(&sta->airtime[txq->ac].aql_tx_pending) <
sta->airtime[txq->ac].aql_limit_low) sta->airtime[txq->ac].aql_limit_low)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册