All of lore.kernel.org
 help / color / mirror / Atom feed
* [l1k:nft_egress_v5 4/5] net/netfilter/nfnetlink_hook.c:232:17: error: 'netdev' undeclared; did you mean 'net_eq'?
@ 2021-09-30  6:39 ` kernel test robot
  0 siblings, 0 replies; 4+ messages in thread
From: kernel test robot @ 2021-09-30  6:39 UTC (permalink / raw)
  To: Lukas Wunner; +Cc: kbuild-all, linux-kernel, Pablo Neira Ayuso

[-- Attachment #1: Type: text/plain, Size: 5425 bytes --]

tree:   https://github.com/l1k/linux nft_egress_v5
head:   dfe0f89e58fa6f22032d805c1afa8209dc84e03b
commit: 46bd81b602be7deb36db2aaa330a23cd01ce4cbe [4/5] netfilter: Introduce egress hook
config: alpha-buildonly-randconfig-r001-20210929 (attached as .config)
compiler: alpha-linux-gcc (GCC) 11.2.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/l1k/linux/commit/46bd81b602be7deb36db2aaa330a23cd01ce4cbe
        git remote add l1k https://github.com/l1k/linux
        git fetch --no-tags l1k nft_egress_v5
        git checkout 46bd81b602be7deb36db2aaa330a23cd01ce4cbe
        # save the attached .config to linux build tree
        mkdir build_dir
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross O=build_dir ARCH=alpha SHELL=/bin/bash net/netfilter/

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>

All errors (new ones prefixed by >>):

   net/netfilter/nfnetlink_hook.c: In function 'nfnl_hook_entries_head':
>> net/netfilter/nfnetlink_hook.c:232:17: error: 'netdev' undeclared (first use in this function); did you mean 'net_eq'?
     232 |                 netdev = dev_get_by_name_rcu(net, dev);
         |                 ^~~~~~
         |                 net_eq
   net/netfilter/nfnetlink_hook.c:232:17: note: each undeclared identifier is reported only once for each function it appears in


vim +232 net/netfilter/nfnetlink_hook.c

e2cf17d3774c323 Florian Westphal 2021-06-04  191  
e2cf17d3774c323 Florian Westphal 2021-06-04  192  	switch (pf) {
e2cf17d3774c323 Florian Westphal 2021-06-04  193  	case NFPROTO_IPV4:
e2cf17d3774c323 Florian Westphal 2021-06-04  194  		if (hook >= ARRAY_SIZE(net->nf.hooks_ipv4))
e2cf17d3774c323 Florian Westphal 2021-06-04  195  			return ERR_PTR(-EINVAL);
e2cf17d3774c323 Florian Westphal 2021-06-04  196  		hook_head = rcu_dereference(net->nf.hooks_ipv4[hook]);
e2cf17d3774c323 Florian Westphal 2021-06-04  197  		break;
e2cf17d3774c323 Florian Westphal 2021-06-04  198  	case NFPROTO_IPV6:
e2cf17d3774c323 Florian Westphal 2021-06-04  199  		if (hook >= ARRAY_SIZE(net->nf.hooks_ipv6))
e2cf17d3774c323 Florian Westphal 2021-06-04  200  			return ERR_PTR(-EINVAL);
5302560bb49d38b Colin Ian King   2021-06-08  201  		hook_head = rcu_dereference(net->nf.hooks_ipv6[hook]);
e2cf17d3774c323 Florian Westphal 2021-06-04  202  		break;
e2cf17d3774c323 Florian Westphal 2021-06-04  203  	case NFPROTO_ARP:
e2cf17d3774c323 Florian Westphal 2021-06-04  204  #ifdef CONFIG_NETFILTER_FAMILY_ARP
e2cf17d3774c323 Florian Westphal 2021-06-04  205  		if (hook >= ARRAY_SIZE(net->nf.hooks_arp))
e2cf17d3774c323 Florian Westphal 2021-06-04  206  			return ERR_PTR(-EINVAL);
e2cf17d3774c323 Florian Westphal 2021-06-04  207  		hook_head = rcu_dereference(net->nf.hooks_arp[hook]);
e2cf17d3774c323 Florian Westphal 2021-06-04  208  #endif
e2cf17d3774c323 Florian Westphal 2021-06-04  209  		break;
e2cf17d3774c323 Florian Westphal 2021-06-04  210  	case NFPROTO_BRIDGE:
e2cf17d3774c323 Florian Westphal 2021-06-04  211  #ifdef CONFIG_NETFILTER_FAMILY_BRIDGE
e2cf17d3774c323 Florian Westphal 2021-06-04  212  		if (hook >= ARRAY_SIZE(net->nf.hooks_bridge))
e2cf17d3774c323 Florian Westphal 2021-06-04  213  			return ERR_PTR(-EINVAL);
e2cf17d3774c323 Florian Westphal 2021-06-04  214  		hook_head = rcu_dereference(net->nf.hooks_bridge[hook]);
e2cf17d3774c323 Florian Westphal 2021-06-04  215  #endif
e2cf17d3774c323 Florian Westphal 2021-06-04  216  		break;
e2cf17d3774c323 Florian Westphal 2021-06-04  217  #if IS_ENABLED(CONFIG_DECNET)
e2cf17d3774c323 Florian Westphal 2021-06-04  218  	case NFPROTO_DECNET:
e2cf17d3774c323 Florian Westphal 2021-06-04  219  		if (hook >= ARRAY_SIZE(net->nf.hooks_decnet))
e2cf17d3774c323 Florian Westphal 2021-06-04  220  			return ERR_PTR(-EINVAL);
e2cf17d3774c323 Florian Westphal 2021-06-04  221  		hook_head = rcu_dereference(net->nf.hooks_decnet[hook]);
e2cf17d3774c323 Florian Westphal 2021-06-04  222  		break;
e2cf17d3774c323 Florian Westphal 2021-06-04  223  #endif
46bd81b602be7de Lukas Wunner     2020-03-11  224  #if defined(CONFIG_NETFILTER_INGRESS) || defined(CONFIG_NETFILTER_EGRESS)
e2cf17d3774c323 Florian Westphal 2021-06-04  225  	case NFPROTO_NETDEV:
46bd81b602be7de Lukas Wunner     2020-03-11  226  		if (hook >= NF_NETDEV_NUMHOOKS)
e2cf17d3774c323 Florian Westphal 2021-06-04  227  			return ERR_PTR(-EOPNOTSUPP);
e2cf17d3774c323 Florian Westphal 2021-06-04  228  
e2cf17d3774c323 Florian Westphal 2021-06-04  229  		if (!dev)
e2cf17d3774c323 Florian Westphal 2021-06-04  230  			return ERR_PTR(-ENODEV);
e2cf17d3774c323 Florian Westphal 2021-06-04  231  
e2cf17d3774c323 Florian Westphal 2021-06-04 @232  		netdev = dev_get_by_name_rcu(net, dev);
e2cf17d3774c323 Florian Westphal 2021-06-04  233  		if (!netdev)
e2cf17d3774c323 Florian Westphal 2021-06-04  234  			return ERR_PTR(-ENODEV);
e2cf17d3774c323 Florian Westphal 2021-06-04  235  

:::::: The code at line 232 was first introduced by commit
:::::: e2cf17d3774c323ef6dab6e9f7c0cfc5e742afd9 netfilter: add new hook nfnl subsystem

:::::: TO: Florian Westphal <fw@strlen.de>
:::::: CC: Pablo Neira Ayuso <pablo@netfilter.org>

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 36255 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [l1k:nft_egress_v5 4/5] net/netfilter/nfnetlink_hook.c:232:17: error: 'netdev' undeclared; did you mean 'net_eq'?
@ 2021-09-30  6:39 ` kernel test robot
  0 siblings, 0 replies; 4+ messages in thread
From: kernel test robot @ 2021-09-30  6:39 UTC (permalink / raw)
  To: kbuild-all

[-- Attachment #1: Type: text/plain, Size: 5513 bytes --]

tree:   https://github.com/l1k/linux nft_egress_v5
head:   dfe0f89e58fa6f22032d805c1afa8209dc84e03b
commit: 46bd81b602be7deb36db2aaa330a23cd01ce4cbe [4/5] netfilter: Introduce egress hook
config: alpha-buildonly-randconfig-r001-20210929 (attached as .config)
compiler: alpha-linux-gcc (GCC) 11.2.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/l1k/linux/commit/46bd81b602be7deb36db2aaa330a23cd01ce4cbe
        git remote add l1k https://github.com/l1k/linux
        git fetch --no-tags l1k nft_egress_v5
        git checkout 46bd81b602be7deb36db2aaa330a23cd01ce4cbe
        # save the attached .config to linux build tree
        mkdir build_dir
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross O=build_dir ARCH=alpha SHELL=/bin/bash net/netfilter/

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>

All errors (new ones prefixed by >>):

   net/netfilter/nfnetlink_hook.c: In function 'nfnl_hook_entries_head':
>> net/netfilter/nfnetlink_hook.c:232:17: error: 'netdev' undeclared (first use in this function); did you mean 'net_eq'?
     232 |                 netdev = dev_get_by_name_rcu(net, dev);
         |                 ^~~~~~
         |                 net_eq
   net/netfilter/nfnetlink_hook.c:232:17: note: each undeclared identifier is reported only once for each function it appears in


vim +232 net/netfilter/nfnetlink_hook.c

e2cf17d3774c323 Florian Westphal 2021-06-04  191  
e2cf17d3774c323 Florian Westphal 2021-06-04  192  	switch (pf) {
e2cf17d3774c323 Florian Westphal 2021-06-04  193  	case NFPROTO_IPV4:
e2cf17d3774c323 Florian Westphal 2021-06-04  194  		if (hook >= ARRAY_SIZE(net->nf.hooks_ipv4))
e2cf17d3774c323 Florian Westphal 2021-06-04  195  			return ERR_PTR(-EINVAL);
e2cf17d3774c323 Florian Westphal 2021-06-04  196  		hook_head = rcu_dereference(net->nf.hooks_ipv4[hook]);
e2cf17d3774c323 Florian Westphal 2021-06-04  197  		break;
e2cf17d3774c323 Florian Westphal 2021-06-04  198  	case NFPROTO_IPV6:
e2cf17d3774c323 Florian Westphal 2021-06-04  199  		if (hook >= ARRAY_SIZE(net->nf.hooks_ipv6))
e2cf17d3774c323 Florian Westphal 2021-06-04  200  			return ERR_PTR(-EINVAL);
5302560bb49d38b Colin Ian King   2021-06-08  201  		hook_head = rcu_dereference(net->nf.hooks_ipv6[hook]);
e2cf17d3774c323 Florian Westphal 2021-06-04  202  		break;
e2cf17d3774c323 Florian Westphal 2021-06-04  203  	case NFPROTO_ARP:
e2cf17d3774c323 Florian Westphal 2021-06-04  204  #ifdef CONFIG_NETFILTER_FAMILY_ARP
e2cf17d3774c323 Florian Westphal 2021-06-04  205  		if (hook >= ARRAY_SIZE(net->nf.hooks_arp))
e2cf17d3774c323 Florian Westphal 2021-06-04  206  			return ERR_PTR(-EINVAL);
e2cf17d3774c323 Florian Westphal 2021-06-04  207  		hook_head = rcu_dereference(net->nf.hooks_arp[hook]);
e2cf17d3774c323 Florian Westphal 2021-06-04  208  #endif
e2cf17d3774c323 Florian Westphal 2021-06-04  209  		break;
e2cf17d3774c323 Florian Westphal 2021-06-04  210  	case NFPROTO_BRIDGE:
e2cf17d3774c323 Florian Westphal 2021-06-04  211  #ifdef CONFIG_NETFILTER_FAMILY_BRIDGE
e2cf17d3774c323 Florian Westphal 2021-06-04  212  		if (hook >= ARRAY_SIZE(net->nf.hooks_bridge))
e2cf17d3774c323 Florian Westphal 2021-06-04  213  			return ERR_PTR(-EINVAL);
e2cf17d3774c323 Florian Westphal 2021-06-04  214  		hook_head = rcu_dereference(net->nf.hooks_bridge[hook]);
e2cf17d3774c323 Florian Westphal 2021-06-04  215  #endif
e2cf17d3774c323 Florian Westphal 2021-06-04  216  		break;
e2cf17d3774c323 Florian Westphal 2021-06-04  217  #if IS_ENABLED(CONFIG_DECNET)
e2cf17d3774c323 Florian Westphal 2021-06-04  218  	case NFPROTO_DECNET:
e2cf17d3774c323 Florian Westphal 2021-06-04  219  		if (hook >= ARRAY_SIZE(net->nf.hooks_decnet))
e2cf17d3774c323 Florian Westphal 2021-06-04  220  			return ERR_PTR(-EINVAL);
e2cf17d3774c323 Florian Westphal 2021-06-04  221  		hook_head = rcu_dereference(net->nf.hooks_decnet[hook]);
e2cf17d3774c323 Florian Westphal 2021-06-04  222  		break;
e2cf17d3774c323 Florian Westphal 2021-06-04  223  #endif
46bd81b602be7de Lukas Wunner     2020-03-11  224  #if defined(CONFIG_NETFILTER_INGRESS) || defined(CONFIG_NETFILTER_EGRESS)
e2cf17d3774c323 Florian Westphal 2021-06-04  225  	case NFPROTO_NETDEV:
46bd81b602be7de Lukas Wunner     2020-03-11  226  		if (hook >= NF_NETDEV_NUMHOOKS)
e2cf17d3774c323 Florian Westphal 2021-06-04  227  			return ERR_PTR(-EOPNOTSUPP);
e2cf17d3774c323 Florian Westphal 2021-06-04  228  
e2cf17d3774c323 Florian Westphal 2021-06-04  229  		if (!dev)
e2cf17d3774c323 Florian Westphal 2021-06-04  230  			return ERR_PTR(-ENODEV);
e2cf17d3774c323 Florian Westphal 2021-06-04  231  
e2cf17d3774c323 Florian Westphal 2021-06-04 @232  		netdev = dev_get_by_name_rcu(net, dev);
e2cf17d3774c323 Florian Westphal 2021-06-04  233  		if (!netdev)
e2cf17d3774c323 Florian Westphal 2021-06-04  234  			return ERR_PTR(-ENODEV);
e2cf17d3774c323 Florian Westphal 2021-06-04  235  

:::::: The code at line 232 was first introduced by commit
:::::: e2cf17d3774c323ef6dab6e9f7c0cfc5e742afd9 netfilter: add new hook nfnl subsystem

:::::: TO: Florian Westphal <fw@strlen.de>
:::::: CC: Pablo Neira Ayuso <pablo@netfilter.org>

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org

[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 36255 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [l1k:nft_egress_v5 4/5] net/netfilter/nfnetlink_hook.c:232:17: error: 'netdev' undeclared; did you mean 'net_eq'?
  2021-09-30  6:39 ` kernel test robot
@ 2021-09-30  7:13   ` Lukas Wunner
  -1 siblings, 0 replies; 4+ messages in thread
From: Lukas Wunner @ 2021-09-30  7:13 UTC (permalink / raw)
  To: kernel test robot; +Cc: kbuild-all, linux-kernel, Pablo Neira Ayuso

On Thu, Sep 30, 2021 at 02:39:37PM +0800, kernel test robot wrote:
>    net/netfilter/nfnetlink_hook.c: In function 'nfnl_hook_entries_head':
> >> net/netfilter/nfnetlink_hook.c:232:17: error: 'netdev' undeclared (first use in this function); did you mean 'net_eq'?
>      232 |                 netdev = dev_get_by_name_rcu(net, dev);
>          |                 ^~~~~~
>          |                 net_eq
>    net/netfilter/nfnetlink_hook.c:232:17: note: each undeclared identifier is reported only once for each function it appears in

Thank you, trusty robot.  I've just fixed up the branch as follows:


diff --git a/net/netfilter/nfnetlink_hook.c b/net/netfilter/nfnetlink_hook.c
index 782d2db..c1559e8 100644
--- a/net/netfilter/nfnetlink_hook.c
+++ b/net/netfilter/nfnetlink_hook.c
@@ -185,7 +185,7 @@ static int nfnl_hook_dump_one(struct sk_buff *nlskb,
 nfnl_hook_entries_head(u8 pf, unsigned int hook, struct net *net, const char *dev)
 {
 	const struct nf_hook_entries *hook_head = NULL;
-#ifdef CONFIG_NETFILTER_INGRESS
+#if defined(CONFIG_NETFILTER_INGRESS) || defined(CONFIG_NETFILTER_EGRESS)
 	struct net_device *netdev;
 #endif
 

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [l1k:nft_egress_v5 4/5] net/netfilter/nfnetlink_hook.c:232:17: error: 'netdev' undeclared; did you mean 'net_eq'?
@ 2021-09-30  7:13   ` Lukas Wunner
  0 siblings, 0 replies; 4+ messages in thread
From: Lukas Wunner @ 2021-09-30  7:13 UTC (permalink / raw)
  To: kbuild-all

[-- Attachment #1: Type: text/plain, Size: 1169 bytes --]

On Thu, Sep 30, 2021 at 02:39:37PM +0800, kernel test robot wrote:
>    net/netfilter/nfnetlink_hook.c: In function 'nfnl_hook_entries_head':
> >> net/netfilter/nfnetlink_hook.c:232:17: error: 'netdev' undeclared (first use in this function); did you mean 'net_eq'?
>      232 |                 netdev = dev_get_by_name_rcu(net, dev);
>          |                 ^~~~~~
>          |                 net_eq
>    net/netfilter/nfnetlink_hook.c:232:17: note: each undeclared identifier is reported only once for each function it appears in

Thank you, trusty robot.  I've just fixed up the branch as follows:


diff --git a/net/netfilter/nfnetlink_hook.c b/net/netfilter/nfnetlink_hook.c
index 782d2db..c1559e8 100644
--- a/net/netfilter/nfnetlink_hook.c
+++ b/net/netfilter/nfnetlink_hook.c
@@ -185,7 +185,7 @@ static int nfnl_hook_dump_one(struct sk_buff *nlskb,
 nfnl_hook_entries_head(u8 pf, unsigned int hook, struct net *net, const char *dev)
 {
 	const struct nf_hook_entries *hook_head = NULL;
-#ifdef CONFIG_NETFILTER_INGRESS
+#if defined(CONFIG_NETFILTER_INGRESS) || defined(CONFIG_NETFILTER_EGRESS)
 	struct net_device *netdev;
 #endif
 

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2021-09-30  7:20 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-30  6:39 [l1k:nft_egress_v5 4/5] net/netfilter/nfnetlink_hook.c:232:17: error: 'netdev' undeclared; did you mean 'net_eq'? kernel test robot
2021-09-30  6:39 ` kernel test robot
2021-09-30  7:13 ` Lukas Wunner
2021-09-30  7:13   ` Lukas Wunner

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.