All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH net-next] neighbor: Improve neighbour struct layout
@ 2018-12-13 16:16 David Ahern
  2018-12-15 19:49 ` David Miller
  0 siblings, 1 reply; 2+ messages in thread
From: David Ahern @ 2018-12-13 16:16 UTC (permalink / raw)
  To: netdev; +Cc: davem, David Ahern

From: David Ahern <dsahern@gmail.com>

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>
---
 include/net/neighbour.h | 4 ++--
 1 file 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;
-- 
2.11.0

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH net-next] neighbor: Improve neighbour struct layout
  2018-12-13 16:16 [PATCH net-next] neighbor: Improve neighbour struct layout David Ahern
@ 2018-12-15 19:49 ` David Miller
  0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2018-12-15 19:49 UTC (permalink / raw)
  To: dsahern; +Cc: netdev, dsahern

From: David Ahern <dsahern@kernel.org>
Date: Thu, 13 Dec 2018 08:16:50 -0800

> From: David Ahern <dsahern@gmail.com>
> 
> 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>

Applied, thanks David.

I'm doing a build check on this so it'll take a little bit before it's
actually pushed out.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2018-12-15 19:49 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-12-13 16:16 [PATCH net-next] neighbor: Improve neighbour struct layout David Ahern
2018-12-15 19:49 ` David Miller

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.