netfilter: remove NFPROTO_DECNET
Florian Westphal
maintainerPATCH 1/1 netfilter: remove NFPROTO_DECNET
Decnet has been removed. so no need to reserve space in arrays for it.
--- include/uapi/linux/netfilter.h | 2 ++ 1 file changed, 2 insertions(+)
include/uapi/linux/netfilter.h +2 -0
@@ -63,7 +63,9 @@ enum {NFPROTO_NETDEV =5 ,NFPROTO_BRIDGE =7 ,NFPROTO_IPV6 =10 , +#ifndef __KERNEL__ /* no longer supported by kernel */NFPROTO_DECNET =12 , +#endif NFPROTO_NUMPROTO, };
Signature · 1 line
2.35.1
kernel test robot
build botI love your patch! Yet something to improve:
Hi Florian,
I love your patch! Yet something to improve:
[auto build test ERROR on nf-next/master]
url: https://github.com/intel-lab-lkp/linux/commits/Florian-Westphal/netfilter-remove-NFPROTO_DECNET/20220822-224303 base: https://git.kernel.org/pub/scm/linux/kernel/git/pablo/nf-next.git master config: powerpc-allmodconfig (https://download.01.org/0day-ci/archive/20220823/[email protected]/config) compiler: powerpc-linux-gcc (GCC) 12.1.0
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
# https://github.com/intel-lab-lkp/linux/commit/0776a7974c60171c4c1322add934ecc73273f538
git remote add linux-review https://github.com/intel-lab-lkp/linux
git fetch --no-tags linux-review Florian-Westphal/netfilter-remove-NFPROTO_DECNET/20220822-224303
git checkout 0776a7974c60171c4c1322add934ecc73273f538
# save the config file
mkdir build_dir && cp config build_dir/.config
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=powerpc SHELL=/bin/bash net/decnet/ net/netfilter/
If you fix the issue, kindly add following tag where applicable
All errors (new ones prefixed by >>):
In file included from net/decnet/af_decnet.c:109:
include/linux/netfilter.h: In function 'nf_hook':
>> include/linux/netfilter.h:247:14: error: 'NFPROTO_DECNET' undeclared (first use in this function); did you mean 'NFPROTO_INET'?
247 | case NFPROTO_DECNET:
| ^~~~~~~~~~~~~~
| NFPROTO_INET
include/linux/netfilter.h:247:14: note: each undeclared identifier is reported only once for each function it appears in
--
In file included from include/uapi/linux/netfilter_decnet.h:11,
from net/decnet/dn_nsp_in.c:64:
include/linux/netfilter.h: In function 'nf_hook':
>> include/linux/netfilter.h:247:14: error: 'NFPROTO_DECNET' undeclared (first use in this function); did you mean 'NFPROTO_INET'?
247 | case NFPROTO_DECNET:
| ^~~~~~~~~~~~~~
| NFPROTO_INET
include/linux/netfilter.h:247:14: note: each undeclared identifier is reported only once for each function it appears in
net/decnet/dn_nsp_in.c: In function 'dn_nsp_rx':
>> net/decnet/dn_nsp_in.c:808:24: error: 'NFPROTO_DECNET' undeclared (first use in this function); did you mean 'NFPROTO_INET'?
808 | return NF_HOOK(NFPROTO_DECNET, NF_DN_LOCAL_IN,
| ^~~~~~~~~~~~~~
| NFPROTO_INET
net/decnet/dn_nsp_in.c:811:1: error: control reaches end of non-void function [-Werror=return-type]
811 | }
| ^
cc1: some warnings being treated as errors
--
In file included from include/uapi/linux/netfilter_decnet.h:11,
from net/decnet/dn_route.c:69:
include/linux/netfilter.h: In function 'nf_hook':
>> include/linux/netfilter.h:247:14: error: 'NFPROTO_DECNET' undeclared (first use in this function); did you mean 'NFPROTO_INET'?
247 | case NFPROTO_DECNET:
| ^~~~~~~~~~~~~~
| NFPROTO_INET
include/linux/netfilter.h:247:14: note: each undeclared identifier is reported only once for each function it appears in
net/decnet/dn_route.c: In function 'dn_route_rx_long':
>> net/decnet/dn_route.c:567:24: error: 'NFPROTO_DECNET' undeclared (first use in this function); did you mean 'NFPROTO_INET'?
567 | return NF_HOOK(NFPROTO_DECNET, NF_DN_PRE_ROUTING,
| ^~~~~~~~~~~~~~
| NFPROTO_INET
net/decnet/dn_route.c: In function 'dn_route_rx_short':
net/decnet/dn_route.c:595:24: error: 'NFPROTO_DECNET' undeclared (first use in this function); did you mean 'NFPROTO_INET'?
595 | return NF_HOOK(NFPROTO_DECNET, NF_DN_PRE_ROUTING,
| ^~~~~~~~~~~~~~
| NFPROTO_INET
net/decnet/dn_route.c: In function 'dn_route_rcv':
net/decnet/dn_route.c:700:40: error: 'NFPROTO_DECNET' undeclared (first use in this function); did you mean 'NFPROTO_INET'?
700 | return NF_HOOK(NFPROTO_DECNET, NF_DN_HELLO,
| ^~~~~~~~~~~~~~
| NFPROTO_INET
net/decnet/dn_route.c: In function 'dn_output':
net/decnet/dn_route.c:765:24: error: 'NFPROTO_DECNET' undeclared (first use in this function); did you mean 'NFPROTO_INET'?
765 | return NF_HOOK(NFPROTO_DECNET, NF_DN_LOCAL_OUT,
| ^~~~~~~~~~~~~~
| NFPROTO_INET
net/decnet/dn_route.c: In function 'dn_forward':
net/decnet/dn_route.c:812:24: error: 'NFPROTO_DECNET' undeclared (first use in this function); did you mean 'NFPROTO_INET'?
812 | return NF_HOOK(NFPROTO_DECNET, NF_DN_FORWARD,
| ^~~~~~~~~~~~~~
| NFPROTO_INET
--
In file included from include/uapi/linux/netfilter_decnet.h:11,
from net/decnet/dn_neigh.c:37:
include/linux/netfilter.h: In function 'nf_hook':
>> include/linux/netfilter.h:247:14: error: 'NFPROTO_DECNET' undeclared (first use in this function); did you mean 'NFPROTO_INET'?
247 | case NFPROTO_DECNET:
| ^~~~~~~~~~~~~~
| NFPROTO_INET
include/linux/netfilter.h:247:14: note: each undeclared identifier is reported only once for each function it appears in
net/decnet/dn_neigh.c: In function 'dn_long_output':
>> net/decnet/dn_neigh.c:250:24: error: 'NFPROTO_DECNET' undeclared (first use in this function); did you mean 'NFPROTO_INET'?
250 | return NF_HOOK(NFPROTO_DECNET, NF_DN_POST_ROUTING,
| ^~~~~~~~~~~~~~
| NFPROTO_INET
net/decnet/dn_neigh.c: In function 'dn_short_output':
net/decnet/dn_neigh.c:291:24: error: 'NFPROTO_DECNET' undeclared (first use in this function); did you mean 'NFPROTO_INET'?
291 | return NF_HOOK(NFPROTO_DECNET, NF_DN_POST_ROUTING,
| ^~~~~~~~~~~~~~
| NFPROTO_INET
net/decnet/dn_neigh.c: In function 'dn_phase3_output':
net/decnet/dn_neigh.c:333:24: error: 'NFPROTO_DECNET' undeclared (first use in this function); did you mean 'NFPROTO_INET'?
333 | return NF_HOOK(NFPROTO_DECNET, NF_DN_POST_ROUTING,
| ^~~~~~~~~~~~~~
| NFPROTO_INET
net/decnet/dn_neigh.c:336:1: error: control reaches end of non-void function [-Werror=return-type]
336 | }
| ^
net/decnet/dn_neigh.c: In function 'dn_long_output':
net/decnet/dn_neigh.c:253:1: error: control reaches end of non-void function [-Werror=return-type]
253 | }
| ^
net/decnet/dn_neigh.c: In function 'dn_short_output':
net/decnet/dn_neigh.c:294:1: error: control reaches end of non-void function [-Werror=return-type]
294 | }
| ^ cc1: some warnings being treated as errors
--
In file included from net/netfilter/core.c:10:
include/linux/netfilter.h: In function 'nf_hook':
>> include/linux/netfilter.h:247:14: error: 'NFPROTO_DECNET' undeclared (first use in this function); did you mean 'NFPROTO_INET'?
247 | case NFPROTO_DECNET:
| ^~~~~~~~~~~~~~
| NFPROTO_INET
include/linux/netfilter.h:247:14: note: each undeclared identifier is reported only once for each function it appears in
net/netfilter/core.c: In function 'nf_hook_entry_head':
>> net/netfilter/core.c:304:14: error: 'NFPROTO_DECNET' undeclared (first use in this function); did you mean 'NFPROTO_INET'?
304 | case NFPROTO_DECNET:
| ^~~~~~~~~~~~~~
| NFPROTO_INET
--
In file included from net/netfilter/nfnetlink_hook.c:17:
include/linux/netfilter.h: In function 'nf_hook':
>> include/linux/netfilter.h:247:14: error: 'NFPROTO_DECNET' undeclared (first use in this function); did you mean 'NFPROTO_INET'?
247 | case NFPROTO_DECNET:
| ^~~~~~~~~~~~~~
| NFPROTO_INET
include/linux/netfilter.h:247:14: note: each undeclared identifier is reported only once for each function it appears in
net/netfilter/nfnetlink_hook.c: In function 'nfnl_hook_entries_head':
>> net/netfilter/nfnetlink_hook.c:219:14: error: 'NFPROTO_DECNET' undeclared (first use in this function); did you mean 'NFPROTO_INET'?
219 | case NFPROTO_DECNET:
| ^~~~~~~~~~~~~~
| NFPROTO_INET
--
In file included from net/decnet/netfilter/dn_rtmsg.c:18:
include/linux/netfilter.h: In function 'nf_hook':
>> include/linux/netfilter.h:247:14: error: 'NFPROTO_DECNET' undeclared (first use in this function); did you mean 'NFPROTO_INET'?
247 | case NFPROTO_DECNET:
| ^~~~~~~~~~~~~~
| NFPROTO_INET
include/linux/netfilter.h:247:14: note: each undeclared identifier is reported only once for each function it appears in
net/decnet/netfilter/dn_rtmsg.c: At top level:
>> net/decnet/netfilter/dn_rtmsg.c:118:27: error: 'NFPROTO_DECNET' undeclared here (not in a function); did you mean 'NFPROTO_INET'?
118 | .pf = NFPROTO_DECNET,
| ^~~~~~~~~~~~~~
| NFPROTO_INETvim +247 include/linux/netfilter.h
af4610c39589d83 Florian Westphal 2016-02-25 225
e3b37f11e6e4e6b Aaron Conole 2016-09-21 226 rcu_read_lock();
b0f38338aef2dae Florian Westphal 2017-12-03 227 switch (pf) {
b0f38338aef2dae Florian Westphal 2017-12-03 228 case NFPROTO_IPV4:
b0f38338aef2dae Florian Westphal 2017-12-03 229 hook_head = rcu_dereference(net->nf.hooks_ipv4[hook]);
b0f38338aef2dae Florian Westphal 2017-12-03 230 break;
b0f38338aef2dae Florian Westphal 2017-12-03 231 case NFPROTO_IPV6:
b0f38338aef2dae Florian Westphal 2017-12-03 232 hook_head = rcu_dereference(net->nf.hooks_ipv6[hook]);
b0f38338aef2dae Florian Westphal 2017-12-03 233 break;
b0f38338aef2dae Florian Westphal 2017-12-03 234 case NFPROTO_ARP:
2a95183a5e0375d Florian Westphal 2017-12-07 235 #ifdef CONFIG_NETFILTER_FAMILY_ARP
421c119f5587615 Florian Westphal 2018-09-24 236 if (WARN_ON_ONCE(hook >= ARRAY_SIZE(net->nf.hooks_arp)))
421c119f5587615 Florian Westphal 2018-09-24 237 break;
b0f38338aef2dae Florian Westphal 2017-12-03 238 hook_head = rcu_dereference(net->nf.hooks_arp[hook]);
2a95183a5e0375d Florian Westphal 2017-12-07 239 #endif
b0f38338aef2dae Florian Westphal 2017-12-03 240 break;
b0f38338aef2dae Florian Westphal 2017-12-03 241 case NFPROTO_BRIDGE:
2a95183a5e0375d Florian Westphal 2017-12-07 242 #ifdef CONFIG_NETFILTER_FAMILY_BRIDGE
b0f38338aef2dae Florian Westphal 2017-12-03 243 hook_head = rcu_dereference(net->nf.hooks_bridge[hook]);
2a95183a5e0375d Florian Westphal 2017-12-07 244 #endif
b0f38338aef2dae Florian Westphal 2017-12-03 245 break;
bb4badf3a3dc811 Florian Westphal 2017-12-07 246 #if IS_ENABLED(CONFIG_DECNET)
b0f38338aef2dae Florian Westphal 2017-12-03 @247 case NFPROTO_DECNET:
b0f38338aef2dae Florian Westphal 2017-12-03 248 hook_head = rcu_dereference(net->nf.hooks_decnet[hook]);
b0f38338aef2dae Florian Westphal 2017-12-03 249 break;
bb4badf3a3dc811 Florian Westphal 2017-12-07 250 #endif
b0f38338aef2dae Florian Westphal 2017-12-03 251 default:
b0f38338aef2dae Florian Westphal 2017-12-03 252 WARN_ON_ONCE(1);
b0f38338aef2dae Florian Westphal 2017-12-03 253 break;
b0f38338aef2dae Florian Westphal 2017-12-03 254 }
b0f38338aef2dae Florian Westphal 2017-12-03 255
e3b37f11e6e4e6b Aaron Conole 2016-09-21 256 if (hook_head) {
107a9f4dc9211c1 David Miller 2015-04-05 257 struct nf_hook_state state;
cfdfab314647b17 David S. Miller 2015-04-03 258
01886bd91f1ba41 Pablo Neira Ayuso 2016-11-03 259 nf_hook_state_init(&state, hook, pf, indev, outdev,
1610a73c4175e7d Pablo Neira Ayuso 2016-11-03 260 sk, net, okfn);
fe72926b792e52a Florian Westphal 2016-09-21 261
960632ece6949be Aaron Conole 2017-08-24 262 ret = nf_hook_slow(skb, &state, hook_head, 0);
e3b37f11e6e4e6b Aaron Conole 2016-09-21 263 }
fe72926b792e52a Florian Westphal 2016-09-21 264 rcu_read_unlock();
e3b37f11e6e4e6b Aaron Conole 2016-09-21 265
fe72926b792e52a Florian Westphal 2016-09-21 266 return ret;
cfdfab314647b17 David S. Miller 2015-04-03 267 }
16a6677fdf1d119 Patrick McHardy 2006-01-06 268 Signature · 2 lines
0-DAY CI Kernel Test Service https://01.org/lkp
kernel test robot
build botI love your patch! Yet something to improve:
Hi Florian,
I love your patch! Yet something to improve:
[auto build test ERROR on nf-next/master]
url: https://github.com/intel-lab-lkp/linux/commits/Florian-Westphal/netfilter-remove-NFPROTO_DECNET/20220822-224303 base: https://git.kernel.org/pub/scm/linux/kernel/git/pablo/nf-next.git master config: hexagon-randconfig-r041-20220821 (https://download.01.org/0day-ci/archive/20220823/[email protected]/config) compiler: clang version 16.0.0 (https://github.com/llvm/llvm-project abce7acebd4c06c977bc4bd79170697f1122bc5e)
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
# https://github.com/intel-lab-lkp/linux/commit/0776a7974c60171c4c1322add934ecc73273f538
git remote add linux-review https://github.com/intel-lab-lkp/linux
git fetch --no-tags linux-review Florian-Westphal/netfilter-remove-NFPROTO_DECNET/20220822-224303
git checkout 0776a7974c60171c4c1322add934ecc73273f538
# 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=hexagon SHELL=/bin/bash net/decnet/ net/netfilter/
If you fix the issue, kindly add following tag where applicable
All errors (new ones prefixed by >>):
In file included from net/decnet/af_decnet.c:109:
>> include/linux/netfilter.h:247:7: error: use of undeclared identifier 'NFPROTO_DECNET'; did you mean 'NFPROTO_INET'?
case NFPROTO_DECNET:
^~~~~~~~~~~~~~
NFPROTO_INET include/uapi/linux/netfilter.h:60:2: note: 'NFPROTO_INET' declared here
NFPROTO_INET = 1,
^
1 error generated.
--
In file included from net/decnet/dn_nsp_in.c:64:
In file included from include/uapi/linux/netfilter_decnet.h:11:
>> include/linux/netfilter.h:247:7: error: use of undeclared identifier 'NFPROTO_DECNET'; did you mean 'NFPROTO_INET'?
case NFPROTO_DECNET:
^~~~~~~~~~~~~~
NFPROTO_INET
include/uapi/linux/netfilter.h:60:2: note: 'NFPROTO_INET' declared here
NFPROTO_INET = 1,
^
>> net/decnet/dn_nsp_in.c:808:17: error: use of undeclared identifier 'NFPROTO_DECNET'; did you mean 'NFPROTO_INET'? return NF_HOOK(NFPROTO_DECNET, NF_DN_LOCAL_IN,
^~~~~~~~~~~~~~
NFPROTO_INET
include/uapi/linux/netfilter.h:60:2: note: 'NFPROTO_INET' declared here
NFPROTO_INET = 1,
^
2 errors generated.
--
In file included from net/decnet/dn_route.c:69:
In file included from include/uapi/linux/netfilter_decnet.h:11:
>> include/linux/netfilter.h:247:7: error: use of undeclared identifier 'NFPROTO_DECNET'; did you mean 'NFPROTO_INET'?
case NFPROTO_DECNET:
^~~~~~~~~~~~~~
NFPROTO_INET
include/uapi/linux/netfilter.h:60:2: note: 'NFPROTO_INET' declared here
NFPROTO_INET = 1,
^
>> net/decnet/dn_route.c:567:17: error: use of undeclared identifier 'NFPROTO_DECNET'; did you mean 'NFPROTO_INET'? return NF_HOOK(NFPROTO_DECNET, NF_DN_PRE_ROUTING,
^~~~~~~~~~~~~~
NFPROTO_INET
include/uapi/linux/netfilter.h:60:2: note: 'NFPROTO_INET' declared here
NFPROTO_INET = 1,
^
net/decnet/dn_route.c:595:17: error: use of undeclared identifier 'NFPROTO_DECNET'; did you mean 'NFPROTO_INET'?
return NF_HOOK(NFPROTO_DECNET, NF_DN_PRE_ROUTING,
^~~~~~~~~~~~~~
NFPROTO_INET
include/uapi/linux/netfilter.h:60:2: note: 'NFPROTO_INET' declared here
NFPROTO_INET = 1,
^
net/decnet/dn_route.c:700:19: error: use of undeclared identifier 'NFPROTO_DECNET'; did you mean 'NFPROTO_INET'?
return NF_HOOK(NFPROTO_DECNET, NF_DN_HELLO,
^~~~~~~~~~~~~~
NFPROTO_INET
include/uapi/linux/netfilter.h:60:2: note: 'NFPROTO_INET' declared here
NFPROTO_INET = 1,
^
net/decnet/dn_route.c:706:19: error: use of undeclared identifier 'NFPROTO_DECNET'; did you mean 'NFPROTO_INET'?
return NF_HOOK(NFPROTO_DECNET, NF_DN_ROUTE,
^~~~~~~~~~~~~~
NFPROTO_INET
include/uapi/linux/netfilter.h:60:2: note: 'NFPROTO_INET' declared here
NFPROTO_INET = 1,
^
net/decnet/dn_route.c:710:19: error: use of undeclared identifier 'NFPROTO_DECNET'; did you mean 'NFPROTO_INET'?
return NF_HOOK(NFPROTO_DECNET, NF_DN_HELLO,
^~~~~~~~~~~~~~
NFPROTO_INET
include/uapi/linux/netfilter.h:60:2: note: 'NFPROTO_INET' declared here
NFPROTO_INET = 1,
^
net/decnet/dn_route.c:715:19: error: use of undeclared identifier 'NFPROTO_DECNET'; did you mean 'NFPROTO_INET'?
return NF_HOOK(NFPROTO_DECNET, NF_DN_HELLO,
^~~~~~~~~~~~~~
NFPROTO_INET
include/uapi/linux/netfilter.h:60:2: note: 'NFPROTO_INET' declared here
NFPROTO_INET = 1,
^
net/decnet/dn_route.c:765:17: error: use of undeclared identifier 'NFPROTO_DECNET'; did you mean 'NFPROTO_INET'?
return NF_HOOK(NFPROTO_DECNET, NF_DN_LOCAL_OUT,
^~~~~~~~~~~~~~
NFPROTO_INET
include/uapi/linux/netfilter.h:60:2: note: 'NFPROTO_INET' declared here
NFPROTO_INET = 1,
^
net/decnet/dn_route.c:812:17: error: use of undeclared identifier 'NFPROTO_DECNET'; did you mean 'NFPROTO_INET'?
return NF_HOOK(NFPROTO_DECNET, NF_DN_FORWARD,
^~~~~~~~~~~~~~
NFPROTO_INET
include/uapi/linux/netfilter.h:60:2: note: 'NFPROTO_INET' declared here
NFPROTO_INET = 1,
^
9 errors generated.
--
In file included from net/decnet/dn_neigh.c:37:
In file included from include/uapi/linux/netfilter_decnet.h:11:
>> include/linux/netfilter.h:247:7: error: use of undeclared identifier 'NFPROTO_DECNET'; did you mean 'NFPROTO_INET'?
case NFPROTO_DECNET:
^~~~~~~~~~~~~~
NFPROTO_INET
include/uapi/linux/netfilter.h:60:2: note: 'NFPROTO_INET' declared here
NFPROTO_INET = 1,
^
>> net/decnet/dn_neigh.c:250:17: error: use of undeclared identifier 'NFPROTO_DECNET'; did you mean 'NFPROTO_INET'? return NF_HOOK(NFPROTO_DECNET, NF_DN_POST_ROUTING,
^~~~~~~~~~~~~~
NFPROTO_INET
include/uapi/linux/netfilter.h:60:2: note: 'NFPROTO_INET' declared here
NFPROTO_INET = 1,
^
net/decnet/dn_neigh.c:291:17: error: use of undeclared identifier 'NFPROTO_DECNET'; did you mean 'NFPROTO_INET'?
return NF_HOOK(NFPROTO_DECNET, NF_DN_POST_ROUTING,
^~~~~~~~~~~~~~
NFPROTO_INET
include/uapi/linux/netfilter.h:60:2: note: 'NFPROTO_INET' declared here
NFPROTO_INET = 1,
^
net/decnet/dn_neigh.c:333:17: error: use of undeclared identifier 'NFPROTO_DECNET'; did you mean 'NFPROTO_INET'?
return NF_HOOK(NFPROTO_DECNET, NF_DN_POST_ROUTING,
^~~~~~~~~~~~~~
NFPROTO_INET
include/uapi/linux/netfilter.h:60:2: note: 'NFPROTO_INET' declared here
NFPROTO_INET = 1,
^
4 errors generated.
--
In file included from net/netfilter/core.c:10:
>> include/linux/netfilter.h:247:7: error: use of undeclared identifier 'NFPROTO_DECNET'; did you mean 'NFPROTO_INET'?
case NFPROTO_DECNET:
^~~~~~~~~~~~~~
NFPROTO_INET
include/uapi/linux/netfilter.h:60:2: note: 'NFPROTO_INET' declared here
NFPROTO_INET = 1,
^
>> net/netfilter/core.c:304:7: error: use of undeclared identifier 'NFPROTO_DECNET'; did you mean 'NFPROTO_INET'?
case NFPROTO_DECNET:
^~~~~~~~~~~~~~
NFPROTO_INET include/uapi/linux/netfilter.h:60:2: note: 'NFPROTO_INET' declared here
NFPROTO_INET = 1,
^
2 errors generated.
--
In file included from net/decnet/netfilter/dn_rtmsg.c:18:
>> include/linux/netfilter.h:247:7: error: use of undeclared identifier 'NFPROTO_DECNET'; did you mean 'NFPROTO_INET'?
case NFPROTO_DECNET:
^~~~~~~~~~~~~~
NFPROTO_INET
include/uapi/linux/netfilter.h:60:2: note: 'NFPROTO_INET' declared here
NFPROTO_INET = 1,
^
>> net/decnet/netfilter/dn_rtmsg.c:118:9: error: use of undeclared identifier 'NFPROTO_DECNET'; did you mean 'NFPROTO_INET'? .pf = NFPROTO_DECNET,
^~~~~~~~~~~~~~
NFPROTO_INET
include/uapi/linux/netfilter.h:60:2: note: 'NFPROTO_INET' declared here
NFPROTO_INET = 1,
^
2 errors generated.
vim +247 include/linux/netfilter.h
af4610c39589d8 Florian Westphal 2016-02-25 225
e3b37f11e6e4e6 Aaron Conole 2016-09-21 226 rcu_read_lock();
b0f38338aef2da Florian Westphal 2017-12-03 227 switch (pf) {
b0f38338aef2da Florian Westphal 2017-12-03 228 case NFPROTO_IPV4:
b0f38338aef2da Florian Westphal 2017-12-03 229 hook_head = rcu_dereference(net->nf.hooks_ipv4[hook]);
b0f38338aef2da Florian Westphal 2017-12-03 230 break;
b0f38338aef2da Florian Westphal 2017-12-03 231 case NFPROTO_IPV6:
b0f38338aef2da Florian Westphal 2017-12-03 232 hook_head = rcu_dereference(net->nf.hooks_ipv6[hook]);
b0f38338aef2da Florian Westphal 2017-12-03 233 break;
b0f38338aef2da Florian Westphal 2017-12-03 234 case NFPROTO_ARP:
2a95183a5e0375 Florian Westphal 2017-12-07 235 #ifdef CONFIG_NETFILTER_FAMILY_ARP
421c119f558761 Florian Westphal 2018-09-24 236 if (WARN_ON_ONCE(hook >= ARRAY_SIZE(net->nf.hooks_arp)))
421c119f558761 Florian Westphal 2018-09-24 237 break;
b0f38338aef2da Florian Westphal 2017-12-03 238 hook_head = rcu_dereference(net->nf.hooks_arp[hook]);
2a95183a5e0375 Florian Westphal 2017-12-07 239 #endif
b0f38338aef2da Florian Westphal 2017-12-03 240 break;
b0f38338aef2da Florian Westphal 2017-12-03 241 case NFPROTO_BRIDGE:
2a95183a5e0375 Florian Westphal 2017-12-07 242 #ifdef CONFIG_NETFILTER_FAMILY_BRIDGE
b0f38338aef2da Florian Westphal 2017-12-03 243 hook_head = rcu_dereference(net->nf.hooks_bridge[hook]);
2a95183a5e0375 Florian Westphal 2017-12-07 244 #endif
b0f38338aef2da Florian Westphal 2017-12-03 245 break;
bb4badf3a3dc81 Florian Westphal 2017-12-07 246 #if IS_ENABLED(CONFIG_DECNET)
b0f38338aef2da Florian Westphal 2017-12-03 @247 case NFPROTO_DECNET:
b0f38338aef2da Florian Westphal 2017-12-03 248 hook_head = rcu_dereference(net->nf.hooks_decnet[hook]);
b0f38338aef2da Florian Westphal 2017-12-03 249 break;
bb4badf3a3dc81 Florian Westphal 2017-12-07 250 #endif
b0f38338aef2da Florian Westphal 2017-12-03 251 default:
b0f38338aef2da Florian Westphal 2017-12-03 252 WARN_ON_ONCE(1);
b0f38338aef2da Florian Westphal 2017-12-03 253 break;
b0f38338aef2da Florian Westphal 2017-12-03 254 }
b0f38338aef2da Florian Westphal 2017-12-03 255
e3b37f11e6e4e6 Aaron Conole 2016-09-21 256 if (hook_head) {
107a9f4dc9211c David Miller 2015-04-05 257 struct nf_hook_state state;
cfdfab314647b1 David S. Miller 2015-04-03 258
01886bd91f1ba4 Pablo Neira Ayuso 2016-11-03 259 nf_hook_state_init(&state, hook, pf, indev, outdev,
1610a73c4175e7 Pablo Neira Ayuso 2016-11-03 260 sk, net, okfn);
fe72926b792e52 Florian Westphal 2016-09-21 261
960632ece6949b Aaron Conole 2017-08-24 262 ret = nf_hook_slow(skb, &state, hook_head, 0);
e3b37f11e6e4e6 Aaron Conole 2016-09-21 263 }
fe72926b792e52 Florian Westphal 2016-09-21 264 rcu_read_unlock();
e3b37f11e6e4e6 Aaron Conole 2016-09-21 265
fe72926b792e52 Florian Westphal 2016-09-21 266 return ret;
cfdfab314647b1 David S. Miller 2015-04-03 267 }
16a6677fdf1d11 Patrick McHardy 2006-01-06 268 Signature · 2 lines
0-DAY CI Kernel Test Service https://01.org/lkp
kernel test robot
build botI love your patch! Perhaps something to improve:
Hi Florian,
I love your patch! Perhaps something to improve:
[auto build test WARNING on nf-next/master]
url: https://github.com/intel-lab-lkp/linux/commits/Florian-Westphal/netfilter-remove-NFPROTO_DECNET/20220822-224303 base: https://git.kernel.org/pub/scm/linux/kernel/git/pablo/nf-next.git master config: mips-randconfig-r014-20220822 (https://download.01.org/0day-ci/archive/20220823/[email protected]/config) compiler: clang version 16.0.0 (https://github.com/llvm/llvm-project b04d01c009d7f66bcca9138d2ce40999eedf104d)
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 mips cross compiling tool for clang build
# apt-get install binutils-mips-linux-gnu
# https://github.com/intel-lab-lkp/linux/commit/0776a7974c60171c4c1322add934ecc73273f538
git remote add linux-review https://github.com/intel-lab-lkp/linux
git fetch --no-tags linux-review Florian-Westphal/netfilter-remove-NFPROTO_DECNET/20220822-224303
git checkout 0776a7974c60171c4c1322add934ecc73273f538
# 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=mips SHELL=/bin/bash net/decnet/ net/netfilter/
If you fix the issue, kindly add following tag where applicable
All warnings (new ones prefixed by >>):
In file included from net/decnet/af_decnet.c:109:
include/linux/netfilter.h:247:7: error: use of undeclared identifier 'NFPROTO_DECNET'; did you mean 'NFPROTO_INET'?
case NFPROTO_DECNET:
^~~~~~~~~~~~~~
NFPROTO_INET
include/uapi/linux/netfilter.h:60:2: note: 'NFPROTO_INET' declared here
NFPROTO_INET = 1,
^
In file included from net/decnet/af_decnet.c:111:
In file included from include/net/sock.h:60:
>> include/linux/poll.h:140:27: warning: division by zero is undefined [-Wdivision-by-zero]
M(RDNORM) | M(RDBAND) | M(WRNORM) | M(WRBAND) |
^~~~~~~~~
include/linux/poll.h:138:32: note: expanded from macro 'M'
#define M(X) (__force __poll_t)__MAP(val, POLL##X, (__force __u16)EPOLL##X)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/poll.h:124:51: note: expanded from macro '__MAP'
(from < to ? (v & from) * (to/from) : (v & from) / (from/to))
^ ~~~~~~~~~
include/linux/poll.h:140:39: warning: division by zero is undefined [-Wdivision-by-zero]
M(RDNORM) | M(RDBAND) | M(WRNORM) | M(WRBAND) |
^~~~~~~~~
include/linux/poll.h:138:32: note: expanded from macro 'M'
#define M(X) (__force __poll_t)__MAP(val, POLL##X, (__force __u16)EPOLL##X)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/poll.h:124:51: note: expanded from macro '__MAP'
(from < to ? (v & from) * (to/from) : (v & from) / (from/to))
^ ~~~~~~~~~ 2 warnings and 1 error generated.
--
In file included from net/decnet/dn_neigh.c:37:
In file included from include/uapi/linux/netfilter_decnet.h:11:
include/linux/netfilter.h:247:7: error: use of undeclared identifier 'NFPROTO_DECNET'; did you mean 'NFPROTO_INET'?
case NFPROTO_DECNET:
^~~~~~~~~~~~~~
NFPROTO_INET
include/uapi/linux/netfilter.h:60:2: note: 'NFPROTO_INET' declared here
NFPROTO_INET = 1,
^
In file included from net/decnet/dn_neigh.c:47:
In file included from include/net/dn.h:6:
In file included from include/net/sock.h:60:
>> include/linux/poll.h:140:27: warning: division by zero is undefined [-Wdivision-by-zero]
M(RDNORM) | M(RDBAND) | M(WRNORM) | M(WRBAND) |
^~~~~~~~~
include/linux/poll.h:138:32: note: expanded from macro 'M'
#define M(X) (__force __poll_t)__MAP(val, POLL##X, (__force __u16)EPOLL##X)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/poll.h:124:51: note: expanded from macro '__MAP'
(from < to ? (v & from) * (to/from) : (v & from) / (from/to))
^ ~~~~~~~~~
include/linux/poll.h:140:39: warning: division by zero is undefined [-Wdivision-by-zero]
M(RDNORM) | M(RDBAND) | M(WRNORM) | M(WRBAND) |
^~~~~~~~~
include/linux/poll.h:138:32: note: expanded from macro 'M'
#define M(X) (__force __poll_t)__MAP(val, POLL##X, (__force __u16)EPOLL##X)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/poll.h:124:51: note: expanded from macro '__MAP'
(from < to ? (v & from) * (to/from) : (v & from) / (from/to))
^ ~~~~~~~~~ net/decnet/dn_neigh.c:250:17: error: use of undeclared identifier 'NFPROTO_DECNET'; did you mean 'NFPROTO_INET'?
return NF_HOOK(NFPROTO_DECNET, NF_DN_POST_ROUTING,
^~~~~~~~~~~~~~
NFPROTO_INET
include/uapi/linux/netfilter.h:60:2: note: 'NFPROTO_INET' declared here
NFPROTO_INET = 1,
^
net/decnet/dn_neigh.c:291:17: error: use of undeclared identifier 'NFPROTO_DECNET'; did you mean 'NFPROTO_INET'?
return NF_HOOK(NFPROTO_DECNET, NF_DN_POST_ROUTING,
^~~~~~~~~~~~~~
NFPROTO_INET
include/uapi/linux/netfilter.h:60:2: note: 'NFPROTO_INET' declared here
NFPROTO_INET = 1,
^
net/decnet/dn_neigh.c:333:17: error: use of undeclared identifier 'NFPROTO_DECNET'; did you mean 'NFPROTO_INET'?
return NF_HOOK(NFPROTO_DECNET, NF_DN_POST_ROUTING,
^~~~~~~~~~~~~~
NFPROTO_INET
include/uapi/linux/netfilter.h:60:2: note: 'NFPROTO_INET' declared here
NFPROTO_INET = 1,
^
2 warnings and 4 errors generated.
--
In file included from net/netfilter/core.c:10:
include/linux/netfilter.h:247:7: error: use of undeclared identifier 'NFPROTO_DECNET'; did you mean 'NFPROTO_INET'?
case NFPROTO_DECNET:
^~~~~~~~~~~~~~
NFPROTO_INET
include/uapi/linux/netfilter.h:60:2: note: 'NFPROTO_INET' declared here
NFPROTO_INET = 1,
^
In file included from net/netfilter/core.c:19:
In file included from include/linux/netfilter_ipv6.h:11:
In file included from include/net/tcp.h:20:
In file included from include/linux/tcp.h:19:
In file included from include/net/sock.h:60:
>> include/linux/poll.h:140:27: warning: division by zero is undefined [-Wdivision-by-zero]
M(RDNORM) | M(RDBAND) | M(WRNORM) | M(WRBAND) |
^~~~~~~~~
include/linux/poll.h:138:32: note: expanded from macro 'M'
#define M(X) (__force __poll_t)__MAP(val, POLL##X, (__force __u16)EPOLL##X)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/poll.h:124:51: note: expanded from macro '__MAP'
(from < to ? (v & from) * (to/from) : (v & from) / (from/to))
^ ~~~~~~~~~
include/linux/poll.h:140:39: warning: division by zero is undefined [-Wdivision-by-zero]
M(RDNORM) | M(RDBAND) | M(WRNORM) | M(WRBAND) |
^~~~~~~~~
include/linux/poll.h:138:32: note: expanded from macro 'M'
#define M(X) (__force __poll_t)__MAP(val, POLL##X, (__force __u16)EPOLL##X)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/poll.h:124:51: note: expanded from macro '__MAP'
(from < to ? (v & from) * (to/from) : (v & from) / (from/to))
^ ~~~~~~~~~
net/netfilter/core.c:304:7: error: use of undeclared identifier 'NFPROTO_DECNET'; did you mean 'NFPROTO_INET'?
case NFPROTO_DECNET:
^~~~~~~~~~~~~~
NFPROTO_INET include/uapi/linux/netfilter.h:60:2: note: 'NFPROTO_INET' declared here
NFPROTO_INET = 1,
^
2 warnings and 2 errors generated.
--
In file included from net/decnet/netfilter/dn_rtmsg.c:18:
include/linux/netfilter.h:247:7: error: use of undeclared identifier 'NFPROTO_DECNET'; did you mean 'NFPROTO_INET'?
case NFPROTO_DECNET:
^~~~~~~~~~~~~~
NFPROTO_INET
include/uapi/linux/netfilter.h:60:2: note: 'NFPROTO_INET' declared here
NFPROTO_INET = 1,
^
In file included from net/decnet/netfilter/dn_rtmsg.c:23:
In file included from include/net/sock.h:60:
>> include/linux/poll.h:140:27: warning: division by zero is undefined [-Wdivision-by-zero]
M(RDNORM) | M(RDBAND) | M(WRNORM) | M(WRBAND) |
^~~~~~~~~
include/linux/poll.h:138:32: note: expanded from macro 'M'
#define M(X) (__force __poll_t)__MAP(val, POLL##X, (__force __u16)EPOLL##X)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/poll.h:124:51: note: expanded from macro '__MAP'
(from < to ? (v & from) * (to/from) : (v & from) / (from/to))
^ ~~~~~~~~~
include/linux/poll.h:140:39: warning: division by zero is undefined [-Wdivision-by-zero]
M(RDNORM) | M(RDBAND) | M(WRNORM) | M(WRBAND) |
^~~~~~~~~
include/linux/poll.h:138:32: note: expanded from macro 'M'
#define M(X) (__force __poll_t)__MAP(val, POLL##X, (__force __u16)EPOLL##X)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/poll.h:124:51: note: expanded from macro '__MAP'
(from < to ? (v & from) * (to/from) : (v & from) / (from/to))
^ ~~~~~~~~~ net/decnet/netfilter/dn_rtmsg.c:118:9: error: use of undeclared identifier 'NFPROTO_DECNET'; did you mean 'NFPROTO_INET'?
.pf = NFPROTO_DECNET,
^~~~~~~~~~~~~~
NFPROTO_INET
include/uapi/linux/netfilter.h:60:2: note: 'NFPROTO_INET' declared here
NFPROTO_INET = 1,
^
2 warnings and 2 errors generated.
vim +140 include/linux/poll.h
7a163b2195cda0 Al Viro 2018-02-01 135
7a163b2195cda0 Al Viro 2018-02-01 136 static inline __poll_t demangle_poll(u16 val)
7a163b2195cda0 Al Viro 2018-02-01 137 {
7a163b2195cda0 Al Viro 2018-02-01 138 #define M(X) (__force __poll_t)__MAP(val, POLL##X, (__force __u16)EPOLL##X)
7a163b2195cda0 Al Viro 2018-02-01 139 return M(IN) | M(OUT) | M(PRI) | M(ERR) | M(NVAL) |
7a163b2195cda0 Al Viro 2018-02-01 @140 M(RDNORM) | M(RDBAND) | M(WRNORM) | M(WRBAND) |
7a163b2195cda0 Al Viro 2018-02-01 141 M(HUP) | M(RDHUP) | M(MSG);
7a163b2195cda0 Al Viro 2018-02-01 142 #undef M
7a163b2195cda0 Al Viro 2018-02-01 143 }
7a163b2195cda0 Al Viro 2018-02-01 144 #undef __MAP7a163b2195cda0 Al Viro 2018-02-01 1457a163b2195cda0 Al Viro 2018-02-01 146
Signature · 2 lines
0-DAY CI Kernel Test Service https://01.org/lkp