login
Login
/
Register
Search
Forums
News
Blogs
Features
Site
Home
»
Mailing list archives
»
linux-kernel
»
2008
»
August
»
28
Re: [RFC][PATCH] bitfields API
view
thread
!MAILaRCHIVE_VOTE_RePLACE
Previous message: [
thread
] [
date
] [
author
]
Next message: [
thread
] [
date
] [
author
]
[view in full thread]
From:
Alexey Dobriyan <adobriyan@...>
To: Vegard Nossum <vegard.nossum@...>
Cc: David Miller <davem@...>, Ingo Molnar <mingo@...>, Andrew Morton <akpm@...>, Pekka Enberg <penberg@...>, <linux-kernel@...>
Subject:
Re: [RFC][PATCH] bitfields API
Date: Thursday, August 28, 2008 - 3:05 pm
On Thu, Aug 28, 2008 at 08:46:43PM +0200, Vegard Nossum wrote:
quoted text
> On Thu, Aug 28, 2008 at 8:40 PM, Alexey Dobriyan <adobriyan@gmail.com> wrote: > > On Thu, Aug 28, 2008 at 08:32:23PM +0200, Vegard Nossum wrote: > >> How do you feel about this patch? It's all about making kmemcheck more > >> useful... and not much else. Does it have any chance of entering the > >> kernel along with kmemcheck (when/if that happens)? > > > > DEFINE_BITFIELD is horrible. > > > >> @@ -285,11 +286,12 @@ struct sk_buff { > >> }; > >> }; > >> __u32 priority; > >> - __u8 local_df:1, > >> + DEFINE_BITFIELD(__u8, flags1, > >> + local_df:1, > >> cloned:1, > >> ip_summed:2, > >> nohdr:1, > >> - nfctinfo:3; > >> + nfctinfo:3); > >> __u8 pkt_type:3, > >> fclone:2, > >> ipvs_property:1, > > Ok, that's constructive :-P > > Can we skip the type and always assume that it should be __u8/uint8_t?
Of course, no.
quoted text
> I read somewhere that bitfields should anyway always be 1 byte wide if > the bitfield should be "portable".
It should be signed int or unsigned int for maximum portability.
quoted text
> Would it help (to make this less > horrible) to omit the type declaration and have just the bitfield > members as arguments to the macro?
Or you can parse instruction stream a bit more. --
unsubscribe notice
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to
majordomo@vger.kernel.org
More majordomo info at
http://vger.kernel.org/majordomo-info.html
Please read the FAQ at
http://www.tux.org/lkml/
Previous message: [
thread
] [
date
] [
author
]
Next message: [
thread
] [
date
] [
author
]
Messages in current thread:
[RFC][PATCH] bitfields API
, Vegard Nossum
, (Thu Aug 28, 2:32 pm)
Re: [RFC][PATCH] bitfields API
, Alexey Dobriyan
, (Thu Aug 28, 2:40 pm)
Re: [RFC][PATCH] bitfields API
, Vegard Nossum
, (Thu Aug 28, 2:46 pm)
Re: [RFC][PATCH] bitfields API
, Alexey Dobriyan
, (Thu Aug 28, 3:05 pm)
Re: [RFC][PATCH] bitfields API
, Vegard Nossum
, (Thu Aug 28, 3:18 pm)
Re: [RFC][PATCH] bitfields API
, Pekka Enberg
, (Thu Aug 28, 3:07 pm)
Re: [RFC][PATCH] bitfields API
, Pekka J Enberg
, (Thu Aug 28, 3:02 pm)
Re: [RFC][PATCH] bitfields API
, Vegard Nossum
, (Thu Aug 28, 3:38 pm)
Re: [RFC][PATCH] bitfields API
, Vegard Nossum
, (Sat Aug 30, 4:28 am)
Re: [RFC][PATCH] bitfields API
, Pekka Enberg
, (Thu Aug 28, 2:40 pm)
Re: [RFC][PATCH] bitfields API
, Adrian Bunk
, (Thu Aug 28, 4:27 pm)
Re: [RFC][PATCH] bitfields API
, Vegard Nossum
, (Thu Aug 28, 4:59 pm)
Re: [RFC][PATCH] bitfields API
, Pekka Enberg
, (Thu Aug 28, 4:54 pm)
Navigation
Create content
Mailing list archives
Recent posts
Popular discussions
linux-kernel
:
Greg Kroah-Hartman
[PATCH 001/196] Chinese: Add the known_regression URI to the HOWTO
Andrew Morton
2.6.25-mm1
david
Re: Dual-Licensing Linux Kernel with GPL V2 and GPL V3
Bart Van Assche
Integration of SCST in the mainstream Linux kernel
git
:
linux-netdev
:
Jarek Poplawski
Re: [PATCH] pkt_sched: Destroy gen estimators under rtnl_lock().
Gerrit Renker
[PATCH 15/37] dccp: Set per-connection CCIDs via socket options
David Miller
[GIT]: Networking
Natalie Protasevich
[BUG] New Kernel Bugs
openbsd-misc
:
Colocation donated by:
Who's online
There are currently
1 user
and
495 guests
online.
Online users
strcmp
Syndicate