linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Johannes Berg <johannes@sipsolutions.net>
To: Daniel Halperin <dhalperi@cs.washington.edu>
Cc: ipw3945-devel@lists.sourceforge.net, linux-wireless@vger.kernel.org
Subject: Re: paged RX skbs and BlockAck Request packets
Date: Sat, 29 May 2010 08:17:40 +0200	[thread overview]
Message-ID: <1275113860.3640.0.camel@jlt3.sipsolutions.net> (raw)
In-Reply-To: <9F6635B9-D6BE-4C6A-AA12-37662043B70E@cs.washington.edu>

On Fri, 2010-05-28 at 14:38 -0700, Daniel Halperin wrote:
> On May 28, 2010, at 1:34 PM, Johannes Berg wrote:
> > One thing I ask myself though is do we ever check that the frame is long
> > enough? In the patch below I will by checking the skb_copy_bits() return
> > value, but without that we don't, as far as I can tell?
> 
> Good point.

> > +		if (skb_copy_bits(skb, offsetof(struct ieee80211_bar, control),
> > +				  &bar_data, sizeof(bar_data)))
> > +			return RX_DROP_MONITOR;
> > +
> > 		if (!rx->sta)
> > 			return RX_DROP_MONITOR;
> 
> Maybe invert the order of these two exit conditions? Figure most CPUs
> will speculate anyway, but the second check seems a more efficient
> short-circuit.

Yeah, true. I think it probably makes more sense to just linearize
control frames like you did, and separately add a length check.

johannes


      reply	other threads:[~2010-05-29  6:17 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-05-28 19:46 paged RX skbs and BlockAck Request packets Daniel Halperin
2010-05-28 20:34 ` Johannes Berg
2010-05-28 21:38   ` Daniel Halperin
2010-05-29  6:17     ` Johannes Berg [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=1275113860.3640.0.camel@jlt3.sipsolutions.net \
    --to=johannes@sipsolutions.net \
    --cc=dhalperi@cs.washington.edu \
    --cc=ipw3945-devel@lists.sourceforge.net \
    --cc=linux-wireless@vger.kernel.org \
    /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).