diff options
author | David Ahern <dsahern@gmail.com> | 2018-12-13 19:16:50 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2018-12-15 22:49:29 +0300 |
commit | 4b7cd11f22e5e62b68c543ee74ed3c9f9e70baba (patch) | |
tree | 0490328c1f8fcb00d060b397e6196498c008c962 /include/net | |
parent | 2561f97267d656c9b2c62b32614870abb3eabfe6 (diff) | |
download | linux-4b7cd11f22e5e62b68c543ee74ed3c9f9e70baba.tar.xz |
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>
Diffstat (limited to 'include/net')
-rw-r--r-- | include/net/neighbour.h | 4 |
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 { unsigned long updated; rwlock_t lock; refcount_t refcnt; - struct sk_buff_head arp_queue; unsigned int arp_queue_len_bytes; + struct sk_buff_head arp_queue; struct timer_list timer; unsigned long used; atomic_t probes; @@ -150,7 +150,7 @@ struct neighbour { __u8 type; __u8 dead; seqlock_t ha_lock; - unsigned char ha[ALIGN(MAX_ADDR_LEN, sizeof(unsigned long))]; + unsigned char ha[ALIGN(MAX_ADDR_LEN, sizeof(unsigned long))] __aligned(8); struct hh_cache hh; int (*output)(struct neighbour *, struct sk_buff *); const struct neigh_ops *ops; |