diff options
author | Eric Dumazet <eric.dumazet@gmail.com> | 2010-09-30 01:36:29 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-10-01 03:36:51 -0400 |
commit | 367e5e376922dcf52f92e1db436010fb828d3bfa (patch) | |
tree | ee2fb2f50b23303a06b93492da2dea74b78cb263 | |
parent | bb7196d2bf30e4cb06fe5fed046c9084465e854c (diff) |
neigh: reorder fields in struct neighbour
On 64bit arches, there are two 32bit holes that we can remove.
sizeof(struct neighbour) shrinks from 0xf8 to 0xf0 bytes
Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r-- | include/net/neighbour.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/include/net/neighbour.h b/include/net/neighbour.h index 242879b6c4df..7d08fd1062f0 100644 --- a/include/net/neighbour.h +++ b/include/net/neighbour.h | |||
@@ -94,7 +94,7 @@ struct neighbour { | |||
94 | struct neighbour *next; | 94 | struct neighbour *next; |
95 | struct neigh_table *tbl; | 95 | struct neigh_table *tbl; |
96 | struct neigh_parms *parms; | 96 | struct neigh_parms *parms; |
97 | struct net_device *dev; | 97 | struct net_device *dev; |
98 | unsigned long used; | 98 | unsigned long used; |
99 | unsigned long confirmed; | 99 | unsigned long confirmed; |
100 | unsigned long updated; | 100 | unsigned long updated; |
@@ -102,11 +102,11 @@ struct neighbour { | |||
102 | __u8 nud_state; | 102 | __u8 nud_state; |
103 | __u8 type; | 103 | __u8 type; |
104 | __u8 dead; | 104 | __u8 dead; |
105 | atomic_t refcnt; | ||
105 | atomic_t probes; | 106 | atomic_t probes; |
106 | rwlock_t lock; | 107 | rwlock_t lock; |
107 | unsigned char ha[ALIGN(MAX_ADDR_LEN, sizeof(unsigned long))]; | 108 | unsigned char ha[ALIGN(MAX_ADDR_LEN, sizeof(unsigned long))]; |
108 | struct hh_cache *hh; | 109 | struct hh_cache *hh; |
109 | atomic_t refcnt; | ||
110 | int (*output)(struct sk_buff *skb); | 110 | int (*output)(struct sk_buff *skb); |
111 | struct sk_buff_head arp_queue; | 111 | struct sk_buff_head arp_queue; |
112 | struct timer_list timer; | 112 | struct timer_list timer; |
@@ -163,7 +163,7 @@ struct neigh_table { | |||
163 | atomic_t entries; | 163 | atomic_t entries; |
164 | rwlock_t lock; | 164 | rwlock_t lock; |
165 | unsigned long last_rand; | 165 | unsigned long last_rand; |
166 | struct kmem_cache *kmem_cachep; | 166 | struct kmem_cache *kmem_cachep; |
167 | struct neigh_statistics __percpu *stats; | 167 | struct neigh_statistics __percpu *stats; |
168 | struct neighbour **hash_buckets; | 168 | struct neighbour **hash_buckets; |
169 | unsigned int hash_mask; | 169 | unsigned int hash_mask; |