summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Ahern <dsahern@gmail.com>2018-12-13 11:16:50 -0500
committerDavid S. Miller <davem@davemloft.net>2018-12-15 14:49:29 -0500
commit4b7cd11f22e5e62b68c543ee74ed3c9f9e70baba (patch)
tree0490328c1f8fcb00d060b397e6196498c008c962
parent2561f97267d656c9b2c62b32614870abb3eabfe6 (diff)
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>
-rw-r--r--include/net/neighbour.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/include/net/neighbour.h b/include/net/neighbour.h
index ef0a60448a96..30fd50adf234 100644
--- a/include/net/neighbour.h
+++ b/include/net/neighbour.h
@@ -140,8 +140,8 @@ struct neighbour {
140 unsigned long updated; 140 unsigned long updated;
141 rwlock_t lock; 141 rwlock_t lock;
142 refcount_t refcnt; 142 refcount_t refcnt;
143 struct sk_buff_head arp_queue;
144 unsigned int arp_queue_len_bytes; 143 unsigned int arp_queue_len_bytes;
144 struct sk_buff_head arp_queue;
145 struct timer_list timer; 145 struct timer_list timer;
146 unsigned long used; 146 unsigned long used;
147 atomic_t probes; 147 atomic_t probes;
@@ -150,7 +150,7 @@ struct neighbour {
150 __u8 type; 150 __u8 type;
151 __u8 dead; 151 __u8 dead;
152 seqlock_t ha_lock; 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 struct hh_cache hh; 154 struct hh_cache hh;
155 int (*output)(struct neighbour *, struct sk_buff *); 155 int (*output)(struct neighbour *, struct sk_buff *);
156 const struct neigh_ops *ops; 156 const struct neigh_ops *ops;