Thread (4 messages) 4 messages, 2 authors, 2018-08-30

Re: [RFC v2 2/2] mac80211: manage txq transmission based on airtime deficit

From: Rajkumar Manoharan <hidden>
Date: 2018-08-30 04:28:42

On 2018-08-29 02:44, Toke Høiland-Jørgensen wrote:
Rajkumar Manoharan [off-list ref] writes:
quoted
+bool ieee80211_txq_can_transmit(struct ieee80211_hw *hw,
+				struct ieee80211_txq *txq)
+{
+	struct ieee80211_local *local = hw_to_local(hw);
+	struct txq_info *txqi, *f_txqi;
+	bool can_tx;
+
+	txqi = to_txq_info(txq);
+	/* Check whether txq is paused or not */
+	if (test_bit(IEEE80211_TXQ_PAUSE, &txqi->flags))
+		return false;
+
+	can_tx = false;
+	spin_lock_bh(&local->active_txq_lock);
+	f_txqi = find_txqi(local, txq->ac);
+	if (!f_txqi)
+		goto out;
+
+	/* Allow only head node to ensure fairness */
+	if (f_txqi != txqi)
+		goto out;
+
+	/* Check if txq is in negative deficit */
+	if (!ieee80211_txq_requeued(local, txqi))
+		can_tx = true;
+
My bad... The above check should be as below

-       if (!ieee80211_txq_requeued(local, txqi))
-               can_tx = true;
+       if (ieee80211_txq_requeued(local, txqi))
+               goto out;

+       can_tx = true;
quoted
+	list_del_init(&txqi->schedule_order);
Why are you removing the txq from the list here, and how do you expect
it to get added back?
Otherwise driver has to call next_txq() to dequeue the node before
processing it. If head node is not removed from list, driver can not 
process
remaining txqs from same pull request (fetch_ind()).

The node is added back in tail when txq is paused in 
ieee80211_sta_register_airtime()

-Rajkumar
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help