From e913173f4948dbc2ea11d4963d82b0ecc02457ad Mon Sep 17 00:00:00 2001 From: "David S. Miller" Date: Mon, 24 Mar 2003 13:09:40 -0800 Subject: [NET]: Make SKB layout/initialization/copy more cache friendly. --- include/linux/skbuff.h | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) (limited to 'include/linux') diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h index eeb6322193d7..3be29f0d15f6 100644 --- a/include/linux/skbuff.h +++ b/include/linux/skbuff.h @@ -231,15 +231,8 @@ struct sk_buff { pkt_type, ip_summed; __u32 priority; - atomic_t users; unsigned short protocol, security; - unsigned int truesize; - - unsigned char *head, - *data, - *tail, - *end; void (*destructor)(struct sk_buff *skb); #ifdef CONFIG_NETFILTER @@ -261,6 +254,14 @@ struct sk_buff { #ifdef CONFIG_NET_SCHED __u32 tc_index; /* traffic control index */ #endif + + /* These elements must be at the end, see alloc_skb() for details. */ + unsigned int truesize; + atomic_t users; + unsigned char *head, + *data, + *tail, + *end; }; #define SK_WMEM_MAX 65535 -- cgit v1.2.3