Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

neighbor: Improve neighbour struct layout

Move arp_queue_len_bytes ahead of arp_queue to remove two 4-byte holes.
Ensure ha element is always 8-byte aligned.

Signed-off-by: David Ahern <dsahern@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

authored by

David Ahern and committed by
David S. Miller
4b7cd11f 2561f972

+2 -2
+2 -2
include/net/neighbour.h
··· 140 140 unsigned long updated; 141 141 rwlock_t lock; 142 142 refcount_t refcnt; 143 - struct sk_buff_head arp_queue; 144 143 unsigned int arp_queue_len_bytes; 144 + struct sk_buff_head arp_queue; 145 145 struct timer_list timer; 146 146 unsigned long used; 147 147 atomic_t probes; ··· 150 150 __u8 type; 151 151 __u8 dead; 152 152 seqlock_t ha_lock; 153 - unsigned char ha[ALIGN(MAX_ADDR_LEN, sizeof(unsigned long))]; 153 + unsigned char ha[ALIGN(MAX_ADDR_LEN, sizeof(unsigned long))] __aligned(8); 154 154 struct hh_cache hh; 155 155 int (*output)(struct neighbour *, struct sk_buff *); 156 156 const struct neigh_ops *ops;