diff options
author | Thomas Graf <tgraf@suug.ch> | 2005-07-05 17:13:41 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2005-07-05 17:13:41 -0400 |
commit | 1cbb3380ef683f742876f48e3739b3df4ea9e168 (patch) | |
tree | f1c65a6325068ea7baeec716adea5176cdbe6f20 /include/linux/skbuff.h | |
parent | e176fe8954a5239c24afe79b1001ba3c29511963 (diff) |
[NET]: Reduce size of sk_buff by 4 bytes
Reduce local_df to a bit field and ip_summed to a 2 bits
field thus saving 13 bits. Move bit fields, packet type,
and protocol into the spare area between the priority
and the destructor. Saves 4 bytes on both, 32bit and
64bit architectures.
Signed-off-by: Thomas Graf <tgraf@suug.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/linux/skbuff.h')
-rw-r--r-- | include/linux/skbuff.h | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h index 1e6290f4f81e..14b950413495 100644 --- a/include/linux/skbuff.h +++ b/include/linux/skbuff.h | |||
@@ -248,17 +248,18 @@ struct sk_buff { | |||
248 | data_len, | 248 | data_len, |
249 | mac_len, | 249 | mac_len, |
250 | csum; | 250 | csum; |
251 | unsigned char local_df, | ||
252 | cloned:1, | ||
253 | nohdr:1, | ||
254 | pkt_type, | ||
255 | ip_summed; | ||
256 | __u32 priority; | 251 | __u32 priority; |
257 | unsigned short protocol; | 252 | __u8 local_df:1, |
253 | cloned:1, | ||
254 | ip_summed:2, | ||
255 | nohdr:1; | ||
256 | /* 3 bits spare */ | ||
257 | __u8 pkt_type; | ||
258 | __u16 protocol; | ||
258 | 259 | ||
259 | void (*destructor)(struct sk_buff *skb); | 260 | void (*destructor)(struct sk_buff *skb); |
260 | #ifdef CONFIG_NETFILTER | 261 | #ifdef CONFIG_NETFILTER |
261 | unsigned long nfmark; | 262 | unsigned long nfmark; |
262 | __u32 nfcache; | 263 | __u32 nfcache; |
263 | __u32 nfctinfo; | 264 | __u32 nfctinfo; |
264 | struct nf_conntrack *nfct; | 265 | struct nf_conntrack *nfct; |