From: Ian Campbell Date: Thu, 5 Jan 2012 07:13:39 +0000 (+0000) Subject: net: pack skb_shared_info more efficiently X-Git-Tag: firefly_0821_release~3680^2~3834^2 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=9f42f126154786e6e76df513004800c8c633f020;p=firefly-linux-kernel-4.4.55.git 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 Acked-by: Eric Dumazet Signed-off-by: David S. Miller --- 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 { * the end of the header data, ie. at skb->end. */ struct skb_shared_info { - unsigned short nr_frags; + unsigned char nr_frags; + __u8 tx_flags; unsigned short gso_size; /* Warning: this field is not always filled in (UFO)! */ unsigned short gso_segs; unsigned short gso_type; - __be32 ip6_frag_id; - __u8 tx_flags; struct sk_buff *frag_list; struct skb_shared_hwtstamps hwtstamps; + __be32 ip6_frag_id; /* * Warning : all fields before dataref are cleared in __alloc_skb()