Hi Felix

Thinking a bit more about this, I think that rather than having the
driver work around the API as in your example...

> do {
>       struct ieee80211_txq *pending_txq[4];
>       int n_pending_txq = 0;
>       int i;
>
>       if (hwq->pending < 4)
>               break;p
>
>       nframes = 0;
>
>       ieee80211_txq_schedule_start(hw, ac)
>       do {
>               bool requeue = false;
>
>               struct ieee80211_txq *txq;
>
>               txq = ieee80211_next_txq(hw, ac);
>               if (!txq)
>                       break;
>
>               nframes += schedule_txq(txq, &requeue);
>               if (requeue)
>                       pending_txq[n_pending_txq++] = txq;
>
>       } while (n_pending_txq < ARRAY_SIZE(pending_txq));
>
>       for (i = n_pending_txq; i > 0; i--)
>               ieee80211_return_txq(hw, pending_txq[i - 1]);
>
>       ieee80211_txq_schedule_end(hw, ac)
> } while (nframes);

... really what we want is that the driver can just do this:

ieee80211_txq_schedule_start(hw, ac);
while ((txq = ieee80211_next_txq(hw, ac)) {
        schedule_txq(txq, &requeue);
        return_txq(txq);
}
ieee80211_txq_schedule_end(hw, ac);

and expect so get through all eligible TXQs. Note that there will be
cases where there is only a single eligible TXQ (such as the example I
gave in the other email); in which case the current version is fine. But
there is (probably) also going to be cases where more than one TXQ is
eligible at the same time, which we cannot handle with the current RR
scheduler.

However, I think that assuming we can get the scheduler to guarantee
that it will return all eligible TXQs between each pair of calls to
schedule_start()/schedule_end(), we should be fine with the current API.
Do you agree with this?

-Toke

_______________________________________________
ath10k mailing list
ath10k@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/ath10k

Reply via email to