summaryrefslogtreecommitdiffstats
path: root/include/net/dst.h
diff options
context:
space:
mode:
authorJiri Benc <jbenc@redhat.com>2015-08-21 12:41:14 +0200
committerDavid S. Miller <davem@davemloft.net>2015-08-23 16:51:17 -0700
commit751a587ac9f9a8bf314590fbac32d9e418060c5a (patch)
tree9ddb90651ebd72777150a6af48f22f7f088b71fb /include/net/dst.h
parent31fbde9967330404175a06df15bdb24d671d4475 (diff)
downloadblackbird-op-linux-751a587ac9f9a8bf314590fbac32d9e418060c5a.tar.gz
blackbird-op-linux-751a587ac9f9a8bf314590fbac32d9e418060c5a.zip
route: fix breakage after moving lwtunnel state
__recnt and related fields need to be in its own cacheline for performance reasons. Commit 61adedf3e3f1 ("route: move lwtunnel state to dst_entry") broke that on 32bit archs, causing BUILD_BUG_ON in dst_hold to be triggered. This patch fixes the breakage by moving the lwtunnel state to the end of dst_entry on 32bit archs. Unfortunately, this makes it share the cacheline with __refcnt and may affect performance, thus further patches may be needed. Reported-by: kbuild test robot <fengguang.wu@intel.com> Fixes: 61adedf3e3f1 ("route: move lwtunnel state to dst_entry") Signed-off-by: Jiri Benc <jbenc@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/net/dst.h')
-rw-r--r--include/net/dst.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/include/net/dst.h b/include/net/dst.h
index 0a9a723f6c19..ef8f1d43a203 100644
--- a/include/net/dst.h
+++ b/include/net/dst.h
@@ -44,7 +44,6 @@ struct dst_entry {
#else
void *__pad1;
#endif
- struct lwtunnel_state *lwtstate;
int (*input)(struct sk_buff *);
int (*output)(struct sock *sk, struct sk_buff *skb);
@@ -85,11 +84,12 @@ struct dst_entry {
__u32 __pad2;
#endif
+#ifdef CONFIG_64BIT
+ struct lwtunnel_state *lwtstate;
/*
* Align __refcnt to a 64 bytes alignment
* (L1_CACHE_SIZE would be too much)
*/
-#ifdef CONFIG_64BIT
long __pad_to_align_refcnt[1];
#endif
/*
@@ -99,6 +99,9 @@ struct dst_entry {
atomic_t __refcnt; /* client references */
int __use;
unsigned long lastuse;
+#ifndef CONFIG_64BIT
+ struct lwtunnel_state *lwtstate;
+#endif
union {
struct dst_entry *next;
struct rtable __rcu *rt_next;
OpenPOWER on IntegriCloud