ATH10K Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Ben Greear <greearb@candelatech.com>
To: Michal Kazior <michal.kazior@tieto.com>
Cc: "ath10k@lists.infradead.org" <ath10k@lists.infradead.org>
Subject: Re: Question on ath10k_mgmt_tx_flush
Date: Fri, 11 Apr 2014 06:25:26 -0700	[thread overview]
Message-ID: <5347ED46.3000406@candelatech.com> (raw)
In-Reply-To: <CA+BoTQmc=n7ifUh+8Lq_1P=t4KJyDDFjcs3Z1mW1nHFO+WR2hw@mail.gmail.com>

On 04/10/2014 10:21 PM, Michal Kazior wrote:
> On 10 April 2014 15:41, Ben Greear <greearb@candelatech.com> wrote:
>> Can we optimize this method to return early if the tx-credits
>> are fully replenished (ie, == 2) instead of just sleeping the
>> 2 x beacon-interval?  That would indicate all messages
>> have been flushed, right?
>
> Yeah. You're _almost_ right. Every odd mgmt frame will trigger tx
> credit replenishment, even if you set NEEDS_CREDITS htc tx flag for
> all packets. It seems that tx credits aren't replenished until you
> submit an even number of mgmt tx:
>
>   [tx credits =2]
>   vdev create [-1, =1]
>   [replenish +1, =2]
>   mgmt tx [-1, =1]
>   [frame is seen on air, means it left tx queue, but no replenishment]
>   vdev set param [-1, =0]
>   [replenish +1, =1]
>   mgmt tx [-1, =0]
>   [frame seen on air]
>   [replenish +2, =2]
>
> However once you flush peer tids you get the tx credit immediately.
> This means you don't ever reach having 2 mgmt tx consuming 2 tx
> credits (unless things go terribly terribly wrong at which point it's
> probably already beyond help).
>
> A very ugly hack would be to try and send out mgmt tx in pairs - a
> requested frame and a dummy frame (such that firmware will not buffer
> it) so that you use tx credit replenishment as tx completion
> indication.

If you ignore how firmware replenishes the tx-credits for now,
is it safe to assume that if you have 2 tx-credits while in
the flush routine, then everything is indeed flushed and
we can skip the sleep?

I imagine both I and the QCA firmware guys can make the
firmware properly replenish tx-credits one at a time instead
of the only-on-even/odd behaviour you found.

But even without that, we might be able to speed up the
flush 1/2 of the time?

Thanks,
Ben


-- 
Ben Greear <greearb@candelatech.com>
Candela Technologies Inc  http://www.candelatech.com


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

  reply	other threads:[~2014-04-11 13:25 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-04-10 13:41 Question on ath10k_mgmt_tx_flush Ben Greear
2014-04-11  5:21 ` Michal Kazior
2014-04-11 13:25   ` Ben Greear [this message]
2014-04-14  6:31     ` Michal Kazior
2014-04-14 15:45       ` Ben Greear
2014-04-15  6:41         ` Michal Kazior
2014-04-17  1:03           ` Ben Greear
2014-04-17  6:04             ` Michal Kazior
2014-04-17  6:35               ` Ben Greear

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=5347ED46.3000406@candelatech.com \
    --to=greearb@candelatech.com \
    --cc=ath10k@lists.infradead.org \
    --cc=michal.kazior@tieto.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