netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Kimdon <david.kimdon@devicescape.com>
To: Jeff Garzik <jeff@garzik.org>
Cc: David Kimdon <david.kimdon@devicescape.com>,
	netdev@vger.kernel.org,
	"John W. Linville" <linville@tuxdriver.com>,
	Jiri Benc <jbenc@suse.cz>
Subject: Re: [take3 0/5] d80211: remove bitfields from include/net/d80211.h
Date: Wed, 25 Oct 2006 12:17:02 -0700	[thread overview]
Message-ID: <20061025191702.GA32410@devicescape.com> (raw)
In-Reply-To: <20061025190129.GH19513@havoc.gtf.org>

On Wed, Oct 25, 2006 at 03:01:29PM -0400, Jeff Garzik wrote:
> On Wed, Oct 25, 2006 at 11:42:44AM -0700, David Kimdon wrote:
> > Continue d80211 bitfield removal.  In general, compilers have
> > difficulty generating efficient code for bitfields.  This patchset
> > removes all bitfields from include/net/d80211.h.
> > 
> > I converted the 1 bit bitfields into a bit in a u32/u16 or u8 flags
> > structure member.  Larger bitfields I converted into their
> > u8/u16/whatever equivalent.
> 
> For bit flags, usually it is best to use up to 32 bits of an
> unsigned long, which guarantees that you use a machine integer for
> all platforms.

That is how I originally had the patch, but then had a question about
increasing structure size so I dropped flags to u16 or u8 for
structures that were made larger by the bitfield removal.

For the key_conf bitfields size doesn't matter much.  For the tx_control
bitfields size matters a bit more since it is needed per-packets and
dirvers currently need to store a copy to pass to the tx complete
handler.

Thoughts?

David

  reply	other threads:[~2006-10-25 19:17 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-10-25 18:42 [take3 0/5] d80211: remove bitfields from include/net/d80211.h David Kimdon
2006-10-25 19:01 ` Jeff Garzik
2006-10-25 19:17   ` David Kimdon [this message]
2006-10-25 19:28     ` Jeff Garzik
2006-11-03  3:30       ` John W. Linville
2006-11-08 15:39         ` David Kimdon

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=20061025191702.GA32410@devicescape.com \
    --to=david.kimdon@devicescape.com \
    --cc=jbenc@suse.cz \
    --cc=jeff@garzik.org \
    --cc=linville@tuxdriver.com \
    --cc=netdev@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).