From: Pavel Roskin <proski@gnu.org>
To: Mohammed Shafi <shafi.wireless@gmail.com>
Cc: Lorenzo Bianconi <lorenzo.bianconi83@gmail.com>,
linux-wireless@vger.kernel.org
Subject: Re: [PATCH 1/1] ath9k: decrypt_error flag issue
Date: Thu, 9 Aug 2012 16:48:10 -0400 [thread overview]
Message-ID: <20120809164810.20c89c59@mj> (raw)
In-Reply-To: <CAD2nsn3qwus1fZiGrcTmOiEOqPJHKDhHXmuJd7c=WWK5U=5JNw@mail.gmail.com>
On Thu, 9 Aug 2012 18:21:59 +0530
Mohammed Shafi <shafi.wireless@gmail.com> wrote:
> > Assume hw reports a decryption error, the flag decrypt_error is set
> > to true in ath9k_rx_accept.
> > Since this flag is initialized to false just out of ath_rx_tasklet
> > while cycle, all subsequent frames are marked as corrupted until
> > ath_rx_tasklet ends.
>
> seems to be a nice catch!
> It would be great if we can simulate this situation (ie
> decrypt_error is set to true, and subsequent frames are discarded)
> may be we can try this some time, purposefully setting the
> decrypt_error 'true' for the first instance and see if there is data
> loss/throughput diff because of this.
That simulation might be too much work. The only affected frames would
be those that are processed in the same tasklet as the frame with
decryption error. What frame is processed in which tasklet is
timing-dependent.
It's enough to see that the code is wrong as it is.
ath9k_rx_accept() only sets decrypt_error to true and never to false.
It's not my favorite way of handling errors, but it's OK.
ath9k_rx_skb_preprocess() calls ath9k_rx_accept() and never writes or
reads decrypt_error in any other way.
ath_rx_tasklet() calls ath9k_rx_skb_preprocess() in a loop over the
frames to be processed. Then it calls ath9k_rx_skb_postprocess() and
passes decrypt_error to it. So we can have a leftover value from
another frame passed there. In that case, the frame won't me marked as
decrypted.
I think it would be nice to examine all the variables initialized
outside the loop in ath_rx_tasklet(). There may be more catches
waiting to be discovered.
--
Regards,
Pavel Roskin
prev parent reply other threads:[~2012-08-09 20:48 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-08-08 17:20 [PATCH 1/1] ath9k: decrypt_error flag issue Lorenzo Bianconi
2012-08-08 20:48 ` Pavel Roskin
2012-08-09 12:27 ` Lorenzo Bianconi
2012-08-09 12:51 ` Mohammed Shafi
2012-08-09 20:48 ` Pavel Roskin [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=20120809164810.20c89c59@mj \
--to=proski@gnu.org \
--cc=linux-wireless@vger.kernel.org \
--cc=lorenzo.bianconi83@gmail.com \
--cc=shafi.wireless@gmail.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.