Search Linux Wireless

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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 2018-08-29 02:44, Toke Høiland-Jørgensen wrote:
Rajkumar Manoharan <rmanohar@xxxxxxxxxxxxxx> writes:

+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;

+	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



[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Wireless Personal Area Network]     [Linux Bluetooth]     [Wireless Regulations]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Hiking]     [MIPS Linux]     [ARM Linux]     [Linux RAID]

  Powered by Linux