From: Maxime Bizon <mbizon@freebox.fr>
To: "Toke Høiland-Jørgensen" <toke@redhat.com>
Cc: linux-wireless@vger.kernel.org
Subject: Re: Regarding .wake_tx_queue() model
Date: Tue, 5 May 2020 15:15:31 +0200 [thread overview]
Message-ID: <20200505131531.GA32619@sakura> (raw)
In-Reply-To: <878si6oabp.fsf@toke.dk>
On Tuesday 05 May 2020 à 14:06:18 (+0200), Toke Høiland-Jørgensen wrote:
Hello Toke,
thanks for your comments
> I don't think ieee80211_stop_queue() is meant to be used this way at all
> in the wake_tx_queue case. Rather, when you get a wake_tx_queue()
> callback, you just queue as many frames as you feel like (see '2
> aggregate' limit above), and then return. Then, on a TX completion you
> just call your internal driver function that tries to pull more frames
> from the mac80211 TXQs.
alright, indeed .wake_tx_queue() does not have to result in any actual
frame sent.
but what about .release_buffered_frames then ?
.release_buffered_frames() and .drv_tx() are both "push" oriented
interface. When they are called, you have to push a frame to the
hardware, so if they are called when hardware FIFO is full, you need
to drop the frame (or add yet another intermediate level of queuing)
from what I can see, .release_buffered_frames() will happily be called
even if queue is stopped, and you have to at least send one frame.
I'm just trying to avoid any additionnal intermediate queing in the
driver between what mac80211 gives me and the HW fifo which has a
fixed size (well actually you can choose the size, but only at init
time).
my current workaround is to pre-size the hw fifo queue to handle what
I think is the worst case
Also .release_buffered_frames() codepath is difficult to test, how do
you trigger that reliably ? assuming VIF is an AP, then you need the
remote STA to go to sleep even though you have traffic waiting for it
in the txqi. For now I patch the stack to introduce artificial delay.
Since my hardware has a sticky per-STA PS filter with good status
reporting, I'm considering using ieee80211_sta_block_awake() and only
unblock STA when all its txqi are empty to get rid of
.release_buffered_frames() complexity.
--
Maxime
next prev parent reply other threads:[~2020-05-05 13:25 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-05-04 19:39 Regarding .wake_tx_queue() model Maxime Bizon
2020-05-05 12:06 ` Toke Høiland-Jørgensen
2020-05-05 13:15 ` Maxime Bizon [this message]
2020-05-05 13:53 ` Toke Høiland-Jørgensen
2020-05-05 15:20 ` Maxime Bizon
2020-05-05 16:50 ` Toke Høiland-Jørgensen
2020-05-05 17:49 ` Maxime Bizon
2020-05-05 20:49 ` Toke Høiland-Jørgensen
2020-05-25 9:47 ` Johannes Berg
2020-05-26 10:33 ` Maxime Bizon
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=20200505131531.GA32619@sakura \
--to=mbizon@freebox.fr \
--cc=linux-wireless@vger.kernel.org \
--cc=toke@redhat.com \
/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).