From: Rajkumar Manoharan <rmanohar@codeaurora.org>
To: "Toke Høiland-Jørgensen" <toke@toke.dk>
Cc: johannes@sipsolutions.net, linux-wireless@vger.kernel.org,
linux-wireless-owner@vger.kernel.org
Subject: Re: [RFC v2 2/2] mac80211: manage txq transmission based on airtime deficit
Date: Wed, 29 Aug 2018 17:29:16 -0700 [thread overview]
Message-ID: <1eab13f53cc86e6b1315f2670811a6bd@codeaurora.org> (raw)
In-Reply-To: <874lfd4idu.fsf@toke.dk>
On 2018-08-29 02:44, Toke Høiland-Jørgensen wrote:
> Rajkumar Manoharan <rmanohar@codeaurora.org> 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
prev parent reply other threads:[~2018-08-30 4:28 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-08-29 0:46 [RFC v2 1/2] mac80211: make airtime txq list per ac Rajkumar Manoharan
2018-08-29 0:46 ` [RFC v2 2/2] mac80211: manage txq transmission based on airtime deficit Rajkumar Manoharan
2018-08-29 9:44 ` Toke Høiland-Jørgensen
2018-08-30 0:29 ` Rajkumar Manoharan [this message]
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=1eab13f53cc86e6b1315f2670811a6bd@codeaurora.org \
--to=rmanohar@codeaurora.org \
--cc=johannes@sipsolutions.net \
--cc=linux-wireless-owner@vger.kernel.org \
--cc=linux-wireless@vger.kernel.org \
--cc=toke@toke.dk \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).