tree:
https://github.com/dsahern/linux nexthops/del-group-03
head: b8c06bc47e0a04603de20861b8d5f7291ff0bc12
commit: 718aea0ab241a4f76294d37797bb2e7e50705ee6 [6/7] ipv4: nexthop version of
fib_info_nh_uses_dev
config: x86_64-allyesconfig (attached as .config)
compiler: clang version 11.0.0 (
https://github.com/llvm/llvm-project
3393cc4cebf9969db94dc424b7a2b6195589c33b)
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 x86_64 cross compiling tool for clang build
# apt-get install binutils-x86-64-linux-gnu
git checkout 718aea0ab241a4f76294d37797bb2e7e50705ee6
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=x86_64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kbuild test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>, old ones prefixed by <<):
In file included from net/core/flow_dissector.c:9:
In file included from include/net/dst_metadata.h:6:
In file included from include/net/ip_tunnels.h:24:
In file included from include/net/ip6_route.h:30:
> include/net/nexthop.h:278:18: warning: address of
'nhi->fib_nhc' will always evaluate to 'true'
[-Wpointer-bool-conversion]
return &nhi->fib_nhc;
~~~~~~ ~~~~~^~~~~~~
include/net/nexthop.h:283:17: warning: address of 'nhi->fib_nhc' will always
evaluate to 'true' [-Wpointer-bool-conversion]
return &nhi->fib_nhc;
~~~~~~ ~~~~~^~~~~~~
2 warnings generated.
--
In file included from net/netfilter/nf_conntrack_standalone.c:17:
In file included from include/net/netfilter/nf_conntrack.h:23:
In file included from include/linux/netfilter/nf_conntrack_proto_gre.h:5:
In file included from include/net/gre.h:6:
In file included from include/net/ip_tunnels.h:24:
In file included from include/net/ip6_route.h:30:
> include/net/nexthop.h:278:18: warning: address of
'nhi->fib_nhc' will always evaluate to 'true'
[-Wpointer-bool-conversion]
return &nhi->fib_nhc;
~~~~~~ ~~~~~^~~~~~~
include/net/nexthop.h:283:17: warning: address of 'nhi->fib_nhc' will always
evaluate to 'true' [-Wpointer-bool-conversion]
return &nhi->fib_nhc;
~~~~~~ ~~~~~^~~~~~~
net/netfilter/nf_conntrack_standalone.c:60:7: warning: format specifies type 'unsigned
short' but the argument has type 'int' [-Wformat]
ntohs(tuple->src.u.tcp.port),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/byteorder/generic.h:142:18: note: expanded from macro 'ntohs'
#define ntohs(x) ___ntohs(x)
^~~~~~~~~~~
include/linux/byteorder/generic.h:137:21: note: expanded from macro '___ntohs'
#define ___ntohs(x) __be16_to_cpu(x)
^~~~~~~~~~~~~~~~
include/uapi/linux/byteorder/little_endian.h:42:26: note: expanded from macro
'__be16_to_cpu'
#define __be16_to_cpu(x) __swab16((__force __u16)(__be16)(x))
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/uapi/linux/swab.h:105:2: note: expanded from macro '__swab16'
(__builtin_constant_p((__u16)(x)) ?
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
net/netfilter/nf_conntrack_standalone.c:61:7: warning: format specifies type 'unsigned
short' but the argument has type 'int' [-Wformat]
ntohs(tuple->dst.u.tcp.port));
^~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/byteorder/generic.h:142:18: note: expanded from macro 'ntohs'
#define ntohs(x) ___ntohs(x)
^~~~~~~~~~~
include/linux/byteorder/generic.h:137:21: note: expanded from macro '___ntohs'
#define ___ntohs(x) __be16_to_cpu(x)
^~~~~~~~~~~~~~~~
include/uapi/linux/byteorder/little_endian.h:42:26: note: expanded from macro
'__be16_to_cpu'
#define __be16_to_cpu(x) __swab16((__force __u16)(__be16)(x))
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/uapi/linux/swab.h:105:2: note: expanded from macro '__swab16'
(__builtin_constant_p((__u16)(x)) ?
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
net/netfilter/nf_conntrack_standalone.c:66:7: warning: format specifies type 'unsigned
short' but the argument has type 'int' [-Wformat]
ntohs(tuple->src.u.udp.port),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/byteorder/generic.h:142:18: note: expanded from macro 'ntohs'
#define ntohs(x) ___ntohs(x)
^~~~~~~~~~~
include/linux/byteorder/generic.h:137:21: note: expanded from macro '___ntohs'
#define ___ntohs(x) __be16_to_cpu(x)
^~~~~~~~~~~~~~~~
include/uapi/linux/byteorder/little_endian.h:42:26: note: expanded from macro
'__be16_to_cpu'
#define __be16_to_cpu(x) __swab16((__force __u16)(__be16)(x))
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/uapi/linux/swab.h:105:2: note: expanded from macro '__swab16'
(__builtin_constant_p((__u16)(x)) ?
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
net/netfilter/nf_conntrack_standalone.c:67:7: warning: format specifies type 'unsigned
short' but the argument has type 'int' [-Wformat]
ntohs(tuple->dst.u.udp.port));
^~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/byteorder/generic.h:142:18: note: expanded from macro 'ntohs'
#define ntohs(x) ___ntohs(x)
^~~~~~~~~~~
include/linux/byteorder/generic.h:137:21: note: expanded from macro '___ntohs'
#define ___ntohs(x) __be16_to_cpu(x)
^~~~~~~~~~~~~~~~
include/uapi/linux/byteorder/little_endian.h:42:26: note: expanded from macro
'__be16_to_cpu'
#define __be16_to_cpu(x) __swab16((__force __u16)(__be16)(x))
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/uapi/linux/swab.h:105:2: note: expanded from macro '__swab16'
(__builtin_constant_p((__u16)(x)) ?
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
net/netfilter/nf_conntrack_standalone.c:72:7: warning: format specifies type 'unsigned
short' but the argument has type 'int' [-Wformat]
ntohs(tuple->src.u.dccp.port),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/byteorder/generic.h:142:18: note: expanded from macro 'ntohs'
#define ntohs(x) ___ntohs(x)
^~~~~~~~~~~
include/linux/byteorder/generic.h:137:21: note: expanded from macro '___ntohs'
#define ___ntohs(x) __be16_to_cpu(x)
^~~~~~~~~~~~~~~~
include/uapi/linux/byteorder/little_endian.h:42:26: note: expanded from macro
'__be16_to_cpu'
#define __be16_to_cpu(x) __swab16((__force __u16)(__be16)(x))
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/uapi/linux/swab.h:105:2: note: expanded from macro '__swab16'
(__builtin_constant_p((__u16)(x)) ?
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
net/netfilter/nf_conntrack_standalone.c:73:7: warning: format specifies type 'unsigned
short' but the argument has type 'int' [-Wformat]
ntohs(tuple->dst.u.dccp.port));
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/byteorder/generic.h:142:18: note: expanded from macro 'ntohs'
#define ntohs(x) ___ntohs(x)
^~~~~~~~~~~
include/linux/byteorder/generic.h:137:21: note: expanded from macro '___ntohs'
#define ___ntohs(x) __be16_to_cpu(x)
^~~~~~~~~~~~~~~~
include/uapi/linux/byteorder/little_endian.h:42:26: note: expanded from macro
'__be16_to_cpu'
#define __be16_to_cpu(x) __swab16((__force __u16)(__be16)(x))
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/uapi/linux/swab.h:105:2: note: expanded from macro '__swab16'
(__builtin_constant_p((__u16)(x)) ?
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
net/netfilter/nf_conntrack_standalone.c:77:7: warning: format specifies type 'unsigned
short' but the argument has type 'int' [-Wformat]
ntohs(tuple->src.u.sctp.port),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/byteorder/generic.h:142:18: note: expanded from macro 'ntohs'
#define ntohs(x) ___ntohs(x)
--
In file included from net/netfilter/nf_conntrack_h323_main.c:25:
In file included from include/net/ip6_route.h:30:
> include/net/nexthop.h:278:18: warning: address of
'nhi->fib_nhc' will always evaluate to 'true'
[-Wpointer-bool-conversion]
return &nhi->fib_nhc;
~~~~~~ ~~~~~^~~~~~~
include/net/nexthop.h:283:17: warning: address of 'nhi->fib_nhc' will always
evaluate to 'true' [-Wpointer-bool-conversion]
return &nhi->fib_nhc;
~~~~~~ ~~~~~^~~~~~~
net/netfilter/nf_conntrack_h323_main.c:197:6: warning: format specifies type 'unsigned
short' but the argument has type 'int' [-Wformat]
tpktlen - 4);
^~~~~~~~~~~
include/linux/printk.h:330:26: note: expanded from macro 'pr_debug'
dynamic_pr_debug(fmt, ##__VA_ARGS__)
~~~ ^~~~~~~~~~~
include/linux/dynamic_debug.h:154:22: note: expanded from macro
'dynamic_pr_debug'
pr_fmt(fmt), ##__VA_ARGS__)
~~~ ^~~~~~~~~~~
include/linux/dynamic_debug.h:143:56: note: expanded from macro
'_dynamic_func_call'
__dynamic_func_call(__UNIQUE_ID(ddebug), fmt, func, ##__VA_ARGS__)
^~~~~~~~~~~
include/linux/dynamic_debug.h:125:15: note: expanded from macro
'__dynamic_func_call'
func(&id, ##__VA_ARGS__); ^~~~~~~~~~~
net/netfilter/nf_conntrack_h323_main.c:870:12: warning: format specifies type
'unsigned short' but the argument has type 'int' [-Wformat]
&addr, ntohs(port), &ct->tuplehash[!dir].tuple.src.u3,
^~~~~~~~~~~
include/linux/printk.h:330:26: note: expanded from macro 'pr_debug'
dynamic_pr_debug(fmt, ##__VA_ARGS__)
~~~ ^~~~~~~~~~~
include/linux/dynamic_debug.h:154:22: note: expanded from macro
'dynamic_pr_debug'
pr_fmt(fmt), ##__VA_ARGS__)
~~~ ^~~~~~~~~~~
include/linux/dynamic_debug.h:143:56: note: expanded from macro
'_dynamic_func_call'
__dynamic_func_call(__UNIQUE_ID(ddebug), fmt, func, ##__VA_ARGS__)
^~~~~~~~~~~
note: (skipping 2 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all)
include/linux/byteorder/generic.h:137:21: note: expanded from macro '___ntohs'
#define ___ntohs(x) __be16_to_cpu(x)
^~~~~~~~~~~~~~~~
include/uapi/linux/byteorder/little_endian.h:42:26: note: expanded from macro
'__be16_to_cpu'
#define __be16_to_cpu(x) __swab16((__force __u16)(__be16)(x))
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/uapi/linux/swab.h:105:2: note: expanded from macro '__swab16'
(__builtin_constant_p((__u16)(x)) ?
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
net/netfilter/nf_conntrack_h323_main.c:871:5: warning: format specifies type 'unsigned
short' but the argument has type 'int' [-Wformat]
ntohs(ct->tuplehash[!dir].tuple.src.u.tcp.port));
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/printk.h:330:26: note: expanded from macro 'pr_debug'
dynamic_pr_debug(fmt, ##__VA_ARGS__)
~~~ ^~~~~~~~~~~
include/linux/dynamic_debug.h:154:22: note: expanded from macro
'dynamic_pr_debug'
pr_fmt(fmt), ##__VA_ARGS__)
~~~ ^~~~~~~~~~~
include/linux/dynamic_debug.h:143:56: note: expanded from macro
'_dynamic_func_call'
__dynamic_func_call(__UNIQUE_ID(ddebug), fmt, func, ##__VA_ARGS__)
^~~~~~~~~~~
note: (skipping 2 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all)
include/linux/byteorder/generic.h:137:21: note: expanded from macro '___ntohs'
#define ___ntohs(x) __be16_to_cpu(x)
^~~~~~~~~~~~~~~~
include/uapi/linux/byteorder/little_endian.h:42:26: note: expanded from macro
'__be16_to_cpu'
#define __be16_to_cpu(x) __swab16((__force __u16)(__be16)(x))
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/uapi/linux/swab.h:105:2: note: expanded from macro '__swab16'
(__builtin_constant_p((__u16)(x)) ?
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
net/netfilter/nf_conntrack_h323_main.c:887:12: warning: format specifies type
'unsigned short' but the argument has type 'int' [-Wformat]
&addr, ntohs(port), &ct->tuplehash[!dir].tuple.dst.u3,
^~~~~~~~~~~
include/linux/printk.h:330:26: note: expanded from macro 'pr_debug'
dynamic_pr_debug(fmt, ##__VA_ARGS__)
~~~ ^~~~~~~~~~~
include/linux/dynamic_debug.h:154:22: note: expanded from macro
'dynamic_pr_debug'
pr_fmt(fmt), ##__VA_ARGS__)
~~~ ^~~~~~~~~~~
include/linux/dynamic_debug.h:143:56: note: expanded from macro
'_dynamic_func_call'
__dynamic_func_call(__UNIQUE_ID(ddebug), fmt, func, ##__VA_ARGS__)
^~~~~~~~~~~
note: (skipping 2 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all)
include/linux/byteorder/generic.h:137:21: note: expanded from macro '___ntohs'
#define ___ntohs(x) __be16_to_cpu(x)
^~~~~~~~~~~~~~~~
include/uapi/linux/byteorder/little_endian.h:42:26: note: expanded from macro
'__be16_to_cpu'
#define __be16_to_cpu(x) __swab16((__force __u16)(__be16)(x))
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/uapi/linux/swab.h:105:2: note: expanded from macro '__swab16'
(__builtin_constant_p((__u16)(x)) ?
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
net/netfilter/nf_conntrack_h323_main.c:888:5: warning: format specifies type 'unsigned
short' but the argument has type 'int' [-Wformat]
ntohs(ct->tuplehash[!dir].tuple.dst.u.tcp.port));
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/printk.h:330:26: note: expanded from macro 'pr_debug'
dynamic_pr_debug(fmt, ##__VA_ARGS__)
~~~ ^~~~~~~~~~~
include/linux/dynamic_debug.h:154:22: note: expanded from macro
'dynamic_pr_debug'
pr_fmt(fmt), ##__VA_ARGS__)
~~~ ^~~~~~~~~~~
include/linux/dynamic_debug.h:143:56: note: expanded from macro
'_dynamic_func_call'
__dynamic_func_call(__UNIQUE_ID(ddebug), fmt, func, ##__VA_ARGS__)
^~~~~~~~~~~
note: (skipping 2 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all)
include/linux/byteorder/generic.h:137:21: note: expanded from macro '___ntohs'
--
In file included from net/ipv4/fib_trie.c:72:
In file included from net/ipv4/fib_lookup.h:8:
> include/net/nexthop.h:278:18: warning: address of
'nhi->fib_nhc' will always evaluate to 'true'
[-Wpointer-bool-conversion]
return &nhi->fib_nhc;
~~~~~~ ~~~~~^~~~~~~
include/net/nexthop.h:283:17: warning: address of 'nhi->fib_nhc' will always
evaluate to 'true' [-Wpointer-bool-conversion]
return &nhi->fib_nhc;
~~~~~~ ~~~~~^~~~~~~
net/ipv4/fib_trie.c:1559:8: warning: variable 'nhsel' is used uninitialized
whenever 'if' condition is true [-Wsometimes-uninitialized]
if (nhc)
^~~
net/ipv4/fib_trie.c:1575:18: note: uninitialized use occurs here
res->nh_sel = nhsel;
^~~~~
net/ipv4/fib_trie.c:1559:4: note: remove the 'if' if its condition is always
false
if (nhc)
^~~~~~~~
net/ipv4/fib_trie.c:1527:12: note: initialize the variable 'nhsel' to silence this
warning
int nhsel, err;
^
= 0
3 warnings generated.
--
In file included from net/ipv6/udp.c:41:
In file included from include/net/ip6_route.h:30:
> include/net/nexthop.h:278:18: warning: address of
'nhi->fib_nhc' will always evaluate to 'true'
[-Wpointer-bool-conversion]
return &nhi->fib_nhc;
~~~~~~ ~~~~~^~~~~~~
include/net/nexthop.h:283:17: warning: address of 'nhi->fib_nhc' will always
evaluate to 'true' [-Wpointer-bool-conversion]
return &nhi->fib_nhc;
~~~~~~ ~~~~~^~~~~~~
net/ipv6/udp.c:974:30: warning: no previous prototype for function
'udp_v6_early_demux' [-Wmissing-prototypes]
INDIRECT_CALLABLE_SCOPE void udp_v6_early_demux(struct sk_buff *skb)
^
net/ipv6/udp.c:974:25: note: declare 'static' if the function is not intended to
be used outside of this translation unit
INDIRECT_CALLABLE_SCOPE void udp_v6_early_demux(struct sk_buff *skb)
^
static
net/ipv6/udp.c:1015:29: warning: no previous prototype for function 'udpv6_rcv'
[-Wmissing-prototypes]
INDIRECT_CALLABLE_SCOPE int udpv6_rcv(struct sk_buff *skb)
^
net/ipv6/udp.c:1015:25: note: declare 'static' if the function is not intended to
be used outside of this translation unit
INDIRECT_CALLABLE_SCOPE int udpv6_rcv(struct sk_buff *skb)
^
static
4 warnings generated.
--
In file included from net/ipv6/tcp_ipv6.c:51:
In file included from include/net/ip6_route.h:30:
> include/net/nexthop.h:278:18: warning: address of
'nhi->fib_nhc' will always evaluate to 'true'
[-Wpointer-bool-conversion]
return &nhi->fib_nhc;
~~~~~~ ~~~~~^~~~~~~
include/net/nexthop.h:283:17: warning: address of 'nhi->fib_nhc' will always
evaluate to 'true' [-Wpointer-bool-conversion]
return &nhi->fib_nhc;
~~~~~~ ~~~~~^~~~~~~
net/ipv6/tcp_ipv6.c:1539:29: warning: no previous prototype for function
'tcp_v6_rcv' [-Wmissing-prototypes]
INDIRECT_CALLABLE_SCOPE int tcp_v6_rcv(struct sk_buff *skb)
^
net/ipv6/tcp_ipv6.c:1539:25: note: declare 'static' if the function is not
intended to be used outside of this translation unit
INDIRECT_CALLABLE_SCOPE int tcp_v6_rcv(struct sk_buff *skb)
^
static
net/ipv6/tcp_ipv6.c:1759:30: warning: no previous prototype for function
'tcp_v6_early_demux' [-Wmissing-prototypes]
INDIRECT_CALLABLE_SCOPE void tcp_v6_early_demux(struct sk_buff *skb)
^
net/ipv6/tcp_ipv6.c:1759:25: note: declare 'static' if the function is not
intended to be used outside of this translation unit
INDIRECT_CALLABLE_SCOPE void tcp_v6_early_demux(struct sk_buff *skb)
^
static
4 warnings generated.
--
In file included from net/ipv6/exthdrs.c:40:
In file included from include/net/ip6_route.h:30:
> include/net/nexthop.h:278:18: warning: address of
'nhi->fib_nhc' will always evaluate to 'true'
[-Wpointer-bool-conversion]
return &nhi->fib_nhc;
~~~~~~ ~~~~~^~~~~~~
include/net/nexthop.h:283:17: warning: address of 'nhi->fib_nhc' will always
evaluate to 'true' [-Wpointer-bool-conversion]
return &nhi->fib_nhc;
~~~~~~ ~~~~~^~~~~~~
net/ipv6/exthdrs.c:909:33: warning: unused function 'ipv6_skb_idev'
[-Wunused-function]
static inline struct inet6_dev *ipv6_skb_idev(struct sk_buff *skb)
^
3 warnings generated.
..
vim +278 include/net/nexthop.h
263
264 static inline bool nexthop_uses_dev(const struct nexthop *nh,
265 const struct net_device *dev)
266 {
267 struct nh_info *nhi;
268
269 if (nh->is_group) {
270 struct nh_group *nhg = rtnl_dereference(nh->nh_grp);
271 int i;
272
273 for (i = 0; i < nhg->num_nh; i++) {
274 struct nexthop *nhe = nhg->nh_entries[i].nh;
275
276 nhi = rcu_dereference(nhe->nh_info);
277 if (nhc_l3mdev_matches_dev(&nhi->fib_nhc, dev))
278 return &nhi->fib_nhc;
279 }
280 } else {
281 nhi = rcu_dereference(nh->nh_info);
282 if (nhc_l3mdev_matches_dev(&nhi->fib_nhc, dev))
283 return &nhi->fib_nhc;
284 }
285
286 return NULL;
287 }
288
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org