diff options
author | Ian Campbell <Ian.Campbell@citrix.com> | 2012-01-05 02:13:39 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2012-01-05 14:01:21 -0500 |
commit | 9f42f126154786e6e76df513004800c8c633f020 (patch) | |
tree | 0f6247b0a7d804fbbace2d12429b7d80c3e7470e /include/linux/skbuff.h | |
parent | eeca6688d6599c28bc449a45facb67d7f203be74 (diff) |
net: pack skb_shared_info more efficiently
nr_frags can be 8 bits since 256 is plenty of fragments. This allows it to be
packed with tx_flags.
Also by moving ip6_frag_id and dataref (both 4 bytes) next to each other we can
avoid a hole between ip6_frag_id and frag_list on 64 bit systems.
Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/linux/skbuff.h')
-rw-r--r-- | include/linux/skbuff.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h index f47f0c3939f2..50db9b04a552 100644 --- a/include/linux/skbuff.h +++ b/include/linux/skbuff.h | |||
@@ -242,15 +242,15 @@ struct ubuf_info { | |||
242 | * the end of the header data, ie. at skb->end. | 242 | * the end of the header data, ie. at skb->end. |
243 | */ | 243 | */ |
244 | struct skb_shared_info { | 244 | struct skb_shared_info { |
245 | unsigned short nr_frags; | 245 | unsigned char nr_frags; |
246 | __u8 tx_flags; | ||
246 | unsigned short gso_size; | 247 | unsigned short gso_size; |
247 | /* Warning: this field is not always filled in (UFO)! */ | 248 | /* Warning: this field is not always filled in (UFO)! */ |
248 | unsigned short gso_segs; | 249 | unsigned short gso_segs; |
249 | unsigned short gso_type; | 250 | unsigned short gso_type; |
250 | __be32 ip6_frag_id; | ||
251 | __u8 tx_flags; | ||
252 | struct sk_buff *frag_list; | 251 | struct sk_buff *frag_list; |
253 | struct skb_shared_hwtstamps hwtstamps; | 252 | struct skb_shared_hwtstamps hwtstamps; |
253 | __be32 ip6_frag_id; | ||
254 | 254 | ||
255 | /* | 255 | /* |
256 | * Warning : all fields before dataref are cleared in __alloc_skb() | 256 | * Warning : all fields before dataref are cleared in __alloc_skb() |