* [PATCH] net: Fix struct inet_timewait_sock bitfield annotation
@ 2009-10-19 8:48 Eric Dumazet
2009-10-20 8:14 ` David Miller
0 siblings, 1 reply; 2+ messages in thread
From: Eric Dumazet @ 2009-10-19 8:48 UTC (permalink / raw)
To: David S. Miller; +Cc: Linux Netdev List
commit 9e337b0f (net: annotate inet_timewait_sock bitfields)
added 4/8 bytes in struct inet_timewait_sock.
Fix this by declaring tw_ipv6_offset in the 'flags' bitfield
The 14 bits hole is named tw_pad to make it cleary apparent.
Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
---
diff --git a/include/net/inet_timewait_sock.h b/include/net/inet_timewait_sock.h
index 37f3aea..b5ad469 100644
--- a/include/net/inet_timewait_sock.h
+++ b/include/net/inet_timewait_sock.h
@@ -130,11 +130,11 @@ struct inet_timewait_sock {
__u16 tw_num;
kmemcheck_bitfield_begin(flags);
/* And these are ours. */
- __u8 tw_ipv6only:1,
- tw_transparent:1;
- /* 14 bits hole, try to pack */
+ unsigned int tw_ipv6only : 1,
+ tw_transparent : 1,
+ tw_pad : 14, /* 14 bits hole */
+ tw_ipv6_offset : 16;
kmemcheck_bitfield_end(flags);
- __u16 tw_ipv6_offset;
unsigned long tw_ttd;
struct inet_bind_bucket *tw_tb;
struct hlist_node tw_death_node;
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] net: Fix struct inet_timewait_sock bitfield annotation
2009-10-19 8:48 [PATCH] net: Fix struct inet_timewait_sock bitfield annotation Eric Dumazet
@ 2009-10-20 8:14 ` David Miller
0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2009-10-20 8:14 UTC (permalink / raw)
To: eric.dumazet; +Cc: netdev
From: Eric Dumazet <eric.dumazet@gmail.com>
Date: Mon, 19 Oct 2009 10:48:51 +0200
> commit 9e337b0f (net: annotate inet_timewait_sock bitfields)
> added 4/8 bytes in struct inet_timewait_sock.
>
> Fix this by declaring tw_ipv6_offset in the 'flags' bitfield
> The 14 bits hole is named tw_pad to make it cleary apparent.
>
> Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Applied to net-2.6, thanks.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2009-10-20 8:14 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-10-19 8:48 [PATCH] net: Fix struct inet_timewait_sock bitfield annotation Eric Dumazet
2009-10-20 8:14 ` David Miller
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).