linux-next: build failure after merge of the net-next tree
Subsystems (3)
Hi all,
After merging the net-next tree, today's linux-next build (arm multi_v7_defconfig) failed like this:
In function 'dst_hold',
inlined from '__ipv6_dev_ac_dec' at /home/sfr/next/next/net/ipv6/anycast.c:328:2:
/home/sfr/next/next/include/linux/compiler.h:447:38: error: call to '__compiletime_assert_243' declared with attribute error: BUILD_BUG_ON failed: offsetof(struct dst_entry, __refcnt) & 63
_compiletime_assert(condition, msg, __compiletime_assert_, __LINE__)
^
/home/sfr/next/next/include/linux/compiler.h:430:4: note: in definition of macro '__compiletime_assert'
prefix ## suffix(); \
^/home/sfr/next/next/include/linux/compiler.h:447:2: note: in expansion of macro '_compiletime_assert'
_compiletime_assert(condition, msg, __compiletime_assert_, __LINE__)
^/home/sfr/next/next/include/linux/bug.h:50:37: note: in expansion of macro 'compiletime_assert'
#define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
^/home/sfr/next/next/include/linux/bug.h:74:2: note: in expansion of macro 'BUILD_BUG_ON_MSG'
BUILD_BUG_ON_MSG(condition, "BUILD_BUG_ON failed: " #condition)
^/home/sfr/next/next/include/net/dst.h:243:2: note: in expansion of macro 'BUILD_BUG_ON'
BUILD_BUG_ON(offsetof(struct dst_entry, __refcnt) & 63);
^
And many more :-(
Caused by commit
61adedf3e3f1 ("route: move lwtunnel state to dst_entry")
I have used the net-next tree from next-20150821 for today.
Signature · 2 lines
Cheers, Stephen Rothwell [email protected]
David Miller
maintainerFrom: Stephen Rothwell <[email protected]>
Date: Mon, 24 Aug 2015 13:21:11 +1000
Quoted 2 lines
After merging the net-next tree, today's linux-next build (arm
multi_v7_defconfig) failed like this:
Fixed by:
====================
[PATCH] 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.
--- include/net/dst.h | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-)
include/net/dst.h +5 -2
@@ -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;
Signature · 1 line
2.1.0
Hi Dave,
Quoted 11 lines · On Sun, 23 Aug 2015 20:33:25 -0700 (PDT) David Miller <[email protected]>…
From: Stephen Rothwell <[email protected]>
Date: Mon, 24 Aug 2015 13:21:11 +1000Quoted 2 lines
After merging the net-next tree, today's linux-next build (arm
multi_v7_defconfig) failed like this:Fixed by:
====================
[PATCH] route: fix breakage after moving lwtunnel state
Thanks, I will get that tomorrow. I must try to remember to check to see if you have added fixes to your tree when I get these errors (not that it happens all that often).
Signature · 2 lines
Cheers, Stephen Rothwell [email protected]