[ammarfaizi2-block:paulmck/linux-rcu/lazy.2022.09.03b 38/40] include/net/dst.h:230:2: error: call to __compiletime_assert_401 declared with 'error' attribute: BUILD_BUG_ON failed: offsetof(struct dst_entry, __refcnt) & 63

From: kernel test robot
Date: Sun Sep 04 2022 - 23:10:29 EST


tree: https://github.com/ammarfaizi2/linux-block paulmck/linux-rcu/lazy.2022.09.03b
head: 485ca0ab99b3e10ff521fff226c3c8fe48fad488
commit: c944944108dcac62942ab154ce09e96afcd190c5 [38/40] rcu: Add per-CB tracing for queuing, flush and invocation.
config: powerpc-allmodconfig (https://download.01.org/0day-ci/archive/20220905/202209051011.pAmcAnkK-lkp@xxxxxxxxx/config)
compiler: clang version 16.0.0 (https://github.com/llvm/llvm-project c55b41d5199d2394dd6cdb8f52180d8b81d809d4)
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# install powerpc cross compiling tool for clang build
# apt-get install binutils-powerpc-linux-gnu
# https://github.com/ammarfaizi2/linux-block/commit/c944944108dcac62942ab154ce09e96afcd190c5
git remote add ammarfaizi2-block https://github.com/ammarfaizi2/linux-block
git fetch --no-tags ammarfaizi2-block paulmck/linux-rcu/lazy.2022.09.03b
git checkout c944944108dcac62942ab154ce09e96afcd190c5
# save the config file
mkdir build_dir && cp config build_dir/.config
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=powerpc SHELL=/bin/bash net/sched/

If you fix the issue, kindly add following tag where applicable
Reported-by: kernel test robot <lkp@xxxxxxxxx>

All errors (new ones prefixed by >>):

In file included from net/sched/act_tunnel_key.c:12:
In file included from include/net/geneve.h:5:
In file included from include/net/udp_tunnel.h:5:
In file included from include/net/ip_tunnels.h:13:
In file included from include/net/dsfield.h:12:
In file included from include/linux/ipv6.h:93:
In file included from include/linux/tcp.h:19:
In file included from include/net/sock.h:66:
>> include/net/dst.h:230:2: error: call to __compiletime_assert_401 declared with 'error' attribute: BUILD_BUG_ON failed: offsetof(struct dst_entry, __refcnt) & 63
BUILD_BUG_ON(offsetof(struct dst_entry, __refcnt) & 63);
^
include/linux/build_bug.h:50:2: note: expanded from macro 'BUILD_BUG_ON'
BUILD_BUG_ON_MSG(condition, "BUILD_BUG_ON failed: " #condition)
^
include/linux/build_bug.h:39:37: note: expanded from macro 'BUILD_BUG_ON_MSG'
#define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
^
include/linux/compiler_types.h:354:2: note: expanded from macro 'compiletime_assert'
_compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
^
include/linux/compiler_types.h:342:2: note: expanded from macro '_compiletime_assert'
__compiletime_assert(condition, msg, prefix, suffix)
^
include/linux/compiler_types.h:335:4: note: expanded from macro '__compiletime_assert'
prefix ## suffix(); \
^
<scratch space>:218:1: note: expanded from here
__compiletime_assert_401
^
1 error generated.


vim +/error +230 include/net/dst.h

^1da177e4c3f41 Linus Torvalds 2005-04-16 223
^1da177e4c3f41 Linus Torvalds 2005-04-16 224 static inline void dst_hold(struct dst_entry *dst)
^1da177e4c3f41 Linus Torvalds 2005-04-16 225 {
5635c10d976716 Eric Dumazet 2008-11-16 226 /*
5635c10d976716 Eric Dumazet 2008-11-16 227 * If your kernel compilation stops here, please check
8b207e7374c244 David Miller 2017-11-28 228 * the placement of __refcnt in struct dst_entry
5635c10d976716 Eric Dumazet 2008-11-16 229 */
5635c10d976716 Eric Dumazet 2008-11-16 @230 BUILD_BUG_ON(offsetof(struct dst_entry, __refcnt) & 63);
44ebe79149ff41 Wei Wang 2017-06-17 231 WARN_ON(atomic_inc_not_zero(&dst->__refcnt) == 0);
^1da177e4c3f41 Linus Torvalds 2005-04-16 232 }
^1da177e4c3f41 Linus Torvalds 2005-04-16 233

:::::: The code at line 230 was first introduced by commit
:::::: 5635c10d976716ef47ae441998aeae144c7e7387 net: make sure struct dst_entry refcount is aligned on 64 bytes

:::::: TO: Eric Dumazet <dada1@xxxxxxxxxxxxx>
:::::: CC: David S. Miller <davem@xxxxxxxxxxxxx>

--
0-DAY CI Kernel Test Service
https://01.org/lkp