提交 9f42f126 编写于 作者: I Ian Campbell 提交者: David S. Miller

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: NIan Campbell <ian.campbell@citrix.com>
Acked-by: NEric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 eeca6688
...@@ -242,15 +242,15 @@ struct ubuf_info { ...@@ -242,15 +242,15 @@ struct ubuf_info {
* the end of the header data, ie. at skb->end. * the end of the header data, ie. at skb->end.
*/ */
struct skb_shared_info { struct skb_shared_info {
unsigned short nr_frags; unsigned char nr_frags;
__u8 tx_flags;
unsigned short gso_size; unsigned short gso_size;
/* Warning: this field is not always filled in (UFO)! */ /* Warning: this field is not always filled in (UFO)! */
unsigned short gso_segs; unsigned short gso_segs;
unsigned short gso_type; unsigned short gso_type;
__be32 ip6_frag_id;
__u8 tx_flags;
struct sk_buff *frag_list; struct sk_buff *frag_list;
struct skb_shared_hwtstamps hwtstamps; struct skb_shared_hwtstamps hwtstamps;
__be32 ip6_frag_id;
/* /*
* Warning : all fields before dataref are cleared in __alloc_skb() * Warning : all fields before dataref are cleared in __alloc_skb()
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册