* [PATCH bpf-next 0/2] lighten uapi/bpf.h rebuilds @ 2021-12-29 22:31 Jakub Kicinski 2021-12-29 22:31 ` Jakub Kicinski 2021-12-29 22:31 ` [PATCH bpf-next 2/2] bpf: invert the dependency between bpf-netns.h and netns/bpf.h Jakub Kicinski 0 siblings, 2 replies; 8+ messages in thread From: Jakub Kicinski @ 2021-12-29 22:31 UTC (permalink / raw) To: ast, daniel; +Cc: bpf, netdev, Jakub Kicinski Last change in the bpf headers - disentangling BPF uapi from netdevice.h. Both linux/bpf.h and uapi/bpf.h changes should now rebuild ~1k objects down from the original ~18k. There's probably more that can be done but it's diminishing returns. Split into two patches for ease of review. Jakub Kicinski (2): net: add includes masked by netdevice.h including uapi/bpf.h bpf: invert the dependency between bpf-netns.h and netns/bpf.h drivers/net/ethernet/amazon/ena/ena_netdev.h | 1 + drivers/net/ethernet/cavium/thunder/nicvf_queues.c | 1 + drivers/net/ethernet/microsoft/mana/mana_en.c | 2 ++ drivers/net/ethernet/stmicro/stmmac/stmmac.h | 1 + drivers/net/ethernet/ti/cpsw_priv.h | 2 ++ include/linux/bpf-netns.h | 8 +------- include/net/netns/bpf.h | 9 ++++++++- kernel/bpf/net_namespace.c | 1 + 8 files changed, 17 insertions(+), 8 deletions(-) -- 2.31.1 ^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH bpf-next 1/2] net: add includes masked by netdevice.h including uapi/bpf.h 2021-12-29 22:31 [PATCH bpf-next 0/2] lighten uapi/bpf.h rebuilds Jakub Kicinski @ 2021-12-29 22:31 ` Jakub Kicinski 2021-12-29 22:31 ` [PATCH bpf-next 2/2] bpf: invert the dependency between bpf-netns.h and netns/bpf.h Jakub Kicinski 1 sibling, 0 replies; 8+ messages in thread From: Jakub Kicinski @ 2021-12-29 22:31 UTC (permalink / raw) To: ast, daniel Cc: bpf, netdev, Jakub Kicinski, shayagr, akiyano, darinzon, ndagan, saeedb, sgoutham, kys, haiyangz, sthemmin, wei.liu, decui, peppe.cavallaro, alexandre.torgue, joabreu, mcoquelin.stm32, grygorii.strashko, sameehj, chenhao288, moyufeng, linux-arm-kernel, linux-hyperv, linux-stm32, linux-omap Add missing includes unmasked by the subsequent change. Mostly network drivers missing an include for XDP_PACKET_HEADROOM. Signed-off-by: Jakub Kicinski <kuba@kernel.org> --- CC: shayagr@amazon.com CC: akiyano@amazon.com CC: darinzon@amazon.com CC: ndagan@amazon.com CC: saeedb@amazon.com CC: sgoutham@marvell.com CC: kys@microsoft.com CC: haiyangz@microsoft.com CC: sthemmin@microsoft.com CC: wei.liu@kernel.org CC: decui@microsoft.com CC: peppe.cavallaro@st.com CC: alexandre.torgue@foss.st.com CC: joabreu@synopsys.com CC: mcoquelin.stm32@gmail.com CC: grygorii.strashko@ti.com CC: sameehj@amazon.com CC: chenhao288@hisilicon.com CC: moyufeng@huawei.com CC: linux-arm-kernel@lists.infradead.org CC: linux-hyperv@vger.kernel.org CC: linux-stm32@st-md-mailman.stormreply.com CC: linux-omap@vger.kernel.org --- drivers/net/ethernet/amazon/ena/ena_netdev.h | 1 + drivers/net/ethernet/cavium/thunder/nicvf_queues.c | 1 + drivers/net/ethernet/microsoft/mana/mana_en.c | 2 ++ drivers/net/ethernet/stmicro/stmmac/stmmac.h | 1 + drivers/net/ethernet/ti/cpsw_priv.h | 2 ++ kernel/bpf/net_namespace.c | 1 + 6 files changed, 8 insertions(+) diff --git a/drivers/net/ethernet/amazon/ena/ena_netdev.h b/drivers/net/ethernet/amazon/ena/ena_netdev.h index 0c39fc2fa345..9391c7101fba 100644 --- a/drivers/net/ethernet/amazon/ena/ena_netdev.h +++ b/drivers/net/ethernet/amazon/ena/ena_netdev.h @@ -14,6 +14,7 @@ #include <linux/interrupt.h> #include <linux/netdevice.h> #include <linux/skbuff.h> +#include <uapi/linux/bpf.h> #include "ena_com.h" #include "ena_eth_com.h" diff --git a/drivers/net/ethernet/cavium/thunder/nicvf_queues.c b/drivers/net/ethernet/cavium/thunder/nicvf_queues.c index 50bbe79fb93d..4367edbdd579 100644 --- a/drivers/net/ethernet/cavium/thunder/nicvf_queues.c +++ b/drivers/net/ethernet/cavium/thunder/nicvf_queues.c @@ -10,6 +10,7 @@ #include <linux/iommu.h> #include <net/ip.h> #include <net/tso.h> +#include <uapi/linux/bpf.h> #include "nic_reg.h" #include "nic.h" diff --git a/drivers/net/ethernet/microsoft/mana/mana_en.c b/drivers/net/ethernet/microsoft/mana/mana_en.c index c1d5a374b967..2ece9e90dc50 100644 --- a/drivers/net/ethernet/microsoft/mana/mana_en.c +++ b/drivers/net/ethernet/microsoft/mana/mana_en.c @@ -1,6 +1,8 @@ // SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause /* Copyright (c) 2021, Microsoft Corporation. */ +#include <uapi/linux/bpf.h> + #include <linux/inetdevice.h> #include <linux/etherdevice.h> #include <linux/ethtool.h> diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac.h b/drivers/net/ethernet/stmicro/stmmac/stmmac.h index 4f5292cadf54..d42b6af32d6e 100644 --- a/drivers/net/ethernet/stmicro/stmmac/stmmac.h +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac.h @@ -22,6 +22,7 @@ #include <linux/net_tstamp.h> #include <linux/reset.h> #include <net/page_pool.h> +#include <uapi/linux/bpf.h> struct stmmac_resources { void __iomem *addr; diff --git a/drivers/net/ethernet/ti/cpsw_priv.h b/drivers/net/ethernet/ti/cpsw_priv.h index f33c882eb70e..74555970730c 100644 --- a/drivers/net/ethernet/ti/cpsw_priv.h +++ b/drivers/net/ethernet/ti/cpsw_priv.h @@ -6,6 +6,8 @@ #ifndef DRIVERS_NET_ETHERNET_TI_CPSW_PRIV_H_ #define DRIVERS_NET_ETHERNET_TI_CPSW_PRIV_H_ +#include <uapi/linux/bpf.h> + #include "davinci_cpdma.h" #define CPSW_DEBUG (NETIF_MSG_HW | NETIF_MSG_WOL | \ diff --git a/kernel/bpf/net_namespace.c b/kernel/bpf/net_namespace.c index 542f275bf252..868cc2c43899 100644 --- a/kernel/bpf/net_namespace.c +++ b/kernel/bpf/net_namespace.c @@ -1,6 +1,7 @@ // SPDX-License-Identifier: GPL-2.0 #include <linux/bpf.h> +#include <linux/bpf-netns.h> #include <linux/filter.h> #include <net/net_namespace.h> -- 2.31.1 ^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH bpf-next 1/2] net: add includes masked by netdevice.h including uapi/bpf.h @ 2021-12-29 22:31 ` Jakub Kicinski 0 siblings, 0 replies; 8+ messages in thread From: Jakub Kicinski @ 2021-12-29 22:31 UTC (permalink / raw) To: ast, daniel Cc: bpf, netdev, Jakub Kicinski, shayagr, akiyano, darinzon, ndagan, saeedb, sgoutham, kys, haiyangz, sthemmin, wei.liu, decui, peppe.cavallaro, alexandre.torgue, joabreu, mcoquelin.stm32, grygorii.strashko, sameehj, chenhao288, moyufeng, linux-arm-kernel, linux-hyperv, linux-stm32, linux-omap Add missing includes unmasked by the subsequent change. Mostly network drivers missing an include for XDP_PACKET_HEADROOM. Signed-off-by: Jakub Kicinski <kuba@kernel.org> --- CC: shayagr@amazon.com CC: akiyano@amazon.com CC: darinzon@amazon.com CC: ndagan@amazon.com CC: saeedb@amazon.com CC: sgoutham@marvell.com CC: kys@microsoft.com CC: haiyangz@microsoft.com CC: sthemmin@microsoft.com CC: wei.liu@kernel.org CC: decui@microsoft.com CC: peppe.cavallaro@st.com CC: alexandre.torgue@foss.st.com CC: joabreu@synopsys.com CC: mcoquelin.stm32@gmail.com CC: grygorii.strashko@ti.com CC: sameehj@amazon.com CC: chenhao288@hisilicon.com CC: moyufeng@huawei.com CC: linux-arm-kernel@lists.infradead.org CC: linux-hyperv@vger.kernel.org CC: linux-stm32@st-md-mailman.stormreply.com CC: linux-omap@vger.kernel.org --- drivers/net/ethernet/amazon/ena/ena_netdev.h | 1 + drivers/net/ethernet/cavium/thunder/nicvf_queues.c | 1 + drivers/net/ethernet/microsoft/mana/mana_en.c | 2 ++ drivers/net/ethernet/stmicro/stmmac/stmmac.h | 1 + drivers/net/ethernet/ti/cpsw_priv.h | 2 ++ kernel/bpf/net_namespace.c | 1 + 6 files changed, 8 insertions(+) diff --git a/drivers/net/ethernet/amazon/ena/ena_netdev.h b/drivers/net/ethernet/amazon/ena/ena_netdev.h index 0c39fc2fa345..9391c7101fba 100644 --- a/drivers/net/ethernet/amazon/ena/ena_netdev.h +++ b/drivers/net/ethernet/amazon/ena/ena_netdev.h @@ -14,6 +14,7 @@ #include <linux/interrupt.h> #include <linux/netdevice.h> #include <linux/skbuff.h> +#include <uapi/linux/bpf.h> #include "ena_com.h" #include "ena_eth_com.h" diff --git a/drivers/net/ethernet/cavium/thunder/nicvf_queues.c b/drivers/net/ethernet/cavium/thunder/nicvf_queues.c index 50bbe79fb93d..4367edbdd579 100644 --- a/drivers/net/ethernet/cavium/thunder/nicvf_queues.c +++ b/drivers/net/ethernet/cavium/thunder/nicvf_queues.c @@ -10,6 +10,7 @@ #include <linux/iommu.h> #include <net/ip.h> #include <net/tso.h> +#include <uapi/linux/bpf.h> #include "nic_reg.h" #include "nic.h" diff --git a/drivers/net/ethernet/microsoft/mana/mana_en.c b/drivers/net/ethernet/microsoft/mana/mana_en.c index c1d5a374b967..2ece9e90dc50 100644 --- a/drivers/net/ethernet/microsoft/mana/mana_en.c +++ b/drivers/net/ethernet/microsoft/mana/mana_en.c @@ -1,6 +1,8 @@ // SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause /* Copyright (c) 2021, Microsoft Corporation. */ +#include <uapi/linux/bpf.h> + #include <linux/inetdevice.h> #include <linux/etherdevice.h> #include <linux/ethtool.h> diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac.h b/drivers/net/ethernet/stmicro/stmmac/stmmac.h index 4f5292cadf54..d42b6af32d6e 100644 --- a/drivers/net/ethernet/stmicro/stmmac/stmmac.h +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac.h @@ -22,6 +22,7 @@ #include <linux/net_tstamp.h> #include <linux/reset.h> #include <net/page_pool.h> +#include <uapi/linux/bpf.h> struct stmmac_resources { void __iomem *addr; diff --git a/drivers/net/ethernet/ti/cpsw_priv.h b/drivers/net/ethernet/ti/cpsw_priv.h index f33c882eb70e..74555970730c 100644 --- a/drivers/net/ethernet/ti/cpsw_priv.h +++ b/drivers/net/ethernet/ti/cpsw_priv.h @@ -6,6 +6,8 @@ #ifndef DRIVERS_NET_ETHERNET_TI_CPSW_PRIV_H_ #define DRIVERS_NET_ETHERNET_TI_CPSW_PRIV_H_ +#include <uapi/linux/bpf.h> + #include "davinci_cpdma.h" #define CPSW_DEBUG (NETIF_MSG_HW | NETIF_MSG_WOL | \ diff --git a/kernel/bpf/net_namespace.c b/kernel/bpf/net_namespace.c index 542f275bf252..868cc2c43899 100644 --- a/kernel/bpf/net_namespace.c +++ b/kernel/bpf/net_namespace.c @@ -1,6 +1,7 @@ // SPDX-License-Identifier: GPL-2.0 #include <linux/bpf.h> +#include <linux/bpf-netns.h> #include <linux/filter.h> #include <net/net_namespace.h> -- 2.31.1 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel ^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH bpf-next 2/2] bpf: invert the dependency between bpf-netns.h and netns/bpf.h 2021-12-29 22:31 [PATCH bpf-next 0/2] lighten uapi/bpf.h rebuilds Jakub Kicinski 2021-12-29 22:31 ` Jakub Kicinski @ 2021-12-29 22:31 ` Jakub Kicinski 2021-12-30 0:46 ` kernel test robot 2021-12-30 0:57 ` kernel test robot 1 sibling, 2 replies; 8+ messages in thread From: Jakub Kicinski @ 2021-12-29 22:31 UTC (permalink / raw) To: ast, daniel; +Cc: bpf, netdev, Jakub Kicinski netns/bpf.h gets included by netdevice.h (thru net_namespace.h) which in turn gets included in a lot of places. We should keep netns/bpf.h as light-weight as possible. bpf-netns.h seems to contain more implementation details than deserves to be included in a netns header. It needs to pull in uapi/bpf.h to get various enum types. Move enum netns_bpf_attach_type to netns/bpf.h and invert the dependency. This makes netns/bpf.h fit the mold of a struct definition header more clearly, and drops the number of objects rebuilt when uapi/bpf.h is touched from 7.7k to 1.1k. Signed-off-by: Jakub Kicinski <kuba@kernel.org> --- include/linux/bpf-netns.h | 8 +------- include/net/netns/bpf.h | 9 ++++++++- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/include/linux/bpf-netns.h b/include/linux/bpf-netns.h index 722f799c1a2e..413cfa5e4b07 100644 --- a/include/linux/bpf-netns.h +++ b/include/linux/bpf-netns.h @@ -3,15 +3,9 @@ #define _BPF_NETNS_H #include <linux/mutex.h> +#include <net/netns/bpf.h> #include <uapi/linux/bpf.h> -enum netns_bpf_attach_type { - NETNS_BPF_INVALID = -1, - NETNS_BPF_FLOW_DISSECTOR = 0, - NETNS_BPF_SK_LOOKUP, - MAX_NETNS_BPF_ATTACH_TYPE -}; - static inline enum netns_bpf_attach_type to_netns_bpf_attach_type(enum bpf_attach_type attach_type) { diff --git a/include/net/netns/bpf.h b/include/net/netns/bpf.h index 0ca6a1b87185..2c01a278d1eb 100644 --- a/include/net/netns/bpf.h +++ b/include/net/netns/bpf.h @@ -6,11 +6,18 @@ #ifndef __NETNS_BPF_H__ #define __NETNS_BPF_H__ -#include <linux/bpf-netns.h> +#include <linux/list.h> struct bpf_prog; struct bpf_prog_array; +enum netns_bpf_attach_type { + NETNS_BPF_INVALID = -1, + NETNS_BPF_FLOW_DISSECTOR = 0, + NETNS_BPF_SK_LOOKUP, + MAX_NETNS_BPF_ATTACH_TYPE +}; + struct netns_bpf { /* Array of programs to run compiled from progs or links */ struct bpf_prog_array __rcu *run_array[MAX_NETNS_BPF_ATTACH_TYPE]; -- 2.31.1 ^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH bpf-next 2/2] bpf: invert the dependency between bpf-netns.h and netns/bpf.h 2021-12-29 22:31 ` [PATCH bpf-next 2/2] bpf: invert the dependency between bpf-netns.h and netns/bpf.h Jakub Kicinski @ 2021-12-30 0:46 ` kernel test robot 2021-12-30 0:57 ` kernel test robot 1 sibling, 0 replies; 8+ messages in thread From: kernel test robot @ 2021-12-30 0:46 UTC (permalink / raw) To: Jakub Kicinski, ast, daniel; +Cc: llvm, kbuild-all, bpf, netdev, Jakub Kicinski Hi Jakub, I love your patch! Yet something to improve: [auto build test ERROR on bpf-next/master] url: https://github.com/0day-ci/linux/commits/Jakub-Kicinski/lighten-uapi-bpf-h-rebuilds/20211230-063309 base: https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next.git master config: arm-randconfig-r025-20211230 (https://download.01.org/0day-ci/archive/20211230/202112300831.1tdh6vYJ-lkp@intel.com/config) compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project cd284b7ac0615afc6e0f1a30da2777e361de27a3) 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 arm cross compiling tool for clang build # apt-get install binutils-arm-linux-gnueabi # https://github.com/0day-ci/linux/commit/df4183ffb29b84cb3cfb6ac82457f151e6fa2a28 git remote add linux-review https://github.com/0day-ci/linux git fetch --no-tags linux-review Jakub-Kicinski/lighten-uapi-bpf-h-rebuilds/20211230-063309 git checkout df4183ffb29b84cb3cfb6ac82457f151e6fa2a28 # save the config file to linux build tree mkdir build_dir COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=arm SHELL=/bin/bash net/ipv6/netfilter/ If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot <lkp@intel.com> All error/warnings (new ones prefixed by >>): In file included from net/ipv6/netfilter/nf_reject_ipv6.c:8: In file included from include/net/ip6_route.h:24: >> include/net/ip6_fib.h:548:2: error: type name requires a specifier or qualifier __bpf_md_ptr(struct bpf_iter_meta *, meta); ^ >> include/net/ip6_fib.h:548:22: warning: declaration of 'struct bpf_iter_meta' will not be visible outside of this function [-Wvisibility] __bpf_md_ptr(struct bpf_iter_meta *, meta); ^ >> include/net/ip6_fib.h:548:39: warning: declaration specifier missing, defaulting to 'int' __bpf_md_ptr(struct bpf_iter_meta *, meta); ^ int include/net/ip6_fib.h:549:2: error: type name requires a specifier or qualifier __bpf_md_ptr(struct fib6_info *, rt); ^ include/net/ip6_fib.h:549:35: warning: declaration specifier missing, defaulting to 'int' __bpf_md_ptr(struct fib6_info *, rt); ^ int >> include/net/ip6_fib.h:549:2: error: duplicate member '__bpf_md_ptr' __bpf_md_ptr(struct fib6_info *, rt); ^ include/net/ip6_fib.h:548:2: note: previous declaration is here __bpf_md_ptr(struct bpf_iter_meta *, meta); ^ net/ipv6/netfilter/nf_reject_ipv6.c:287:18: warning: variable 'ip6h' set but not used [-Wunused-but-set-variable] struct ipv6hdr *ip6h; ^ 4 warnings and 3 errors generated. -- In file included from net/ipv6/netfilter/nf_dup_ipv6.c:13: In file included from include/net/ip6_route.h:24: >> include/net/ip6_fib.h:548:2: error: type name requires a specifier or qualifier __bpf_md_ptr(struct bpf_iter_meta *, meta); ^ >> include/net/ip6_fib.h:548:22: warning: declaration of 'struct bpf_iter_meta' will not be visible outside of this function [-Wvisibility] __bpf_md_ptr(struct bpf_iter_meta *, meta); ^ >> include/net/ip6_fib.h:548:39: warning: declaration specifier missing, defaulting to 'int' __bpf_md_ptr(struct bpf_iter_meta *, meta); ^ int include/net/ip6_fib.h:549:2: error: type name requires a specifier or qualifier __bpf_md_ptr(struct fib6_info *, rt); ^ include/net/ip6_fib.h:549:35: warning: declaration specifier missing, defaulting to 'int' __bpf_md_ptr(struct fib6_info *, rt); ^ int >> include/net/ip6_fib.h:549:2: error: duplicate member '__bpf_md_ptr' __bpf_md_ptr(struct fib6_info *, rt); ^ include/net/ip6_fib.h:548:2: note: previous declaration is here __bpf_md_ptr(struct bpf_iter_meta *, meta); ^ 3 warnings and 3 errors generated. vim +548 include/net/ip6_fib.h 180ca444b985c4 Wei Wang 2017-10-06 537 8d1c802b2815ed David Ahern 2018-04-17 538 void fib6_metric_set(struct fib6_info *f6i, int metric, u32 val); 8d1c802b2815ed David Ahern 2018-04-17 539 static inline bool fib6_metric_locked(struct fib6_info *f6i, int metric) d4ead6b34b67fd David Ahern 2018-04-17 540 { d4ead6b34b67fd David Ahern 2018-04-17 541 return !!(f6i->fib6_metrics->metrics[RTAX_LOCK - 1] & (1 << metric)); d4ead6b34b67fd David Ahern 2018-04-17 542 } 907eea486888cf Amit Cohen 2021-02-01 543 void fib6_info_hw_flags_set(struct net *net, struct fib6_info *f6i, 0c5fcf9e249ee1 Amit Cohen 2021-02-07 544 bool offload, bool trap, bool offload_failed); 180ca444b985c4 Wei Wang 2017-10-06 545 3c32cc1bceba8a Yonghong Song 2020-05-13 546 #if IS_BUILTIN(CONFIG_IPV6) && defined(CONFIG_BPF_SYSCALL) 3c32cc1bceba8a Yonghong Song 2020-05-13 547 struct bpf_iter__ipv6_route { 3c32cc1bceba8a Yonghong Song 2020-05-13 @548 __bpf_md_ptr(struct bpf_iter_meta *, meta); 3c32cc1bceba8a Yonghong Song 2020-05-13 @549 __bpf_md_ptr(struct fib6_info *, rt); 3c32cc1bceba8a Yonghong Song 2020-05-13 550 }; 3c32cc1bceba8a Yonghong Song 2020-05-13 551 #endif 3c32cc1bceba8a Yonghong Song 2020-05-13 552 --- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH bpf-next 2/2] bpf: invert the dependency between bpf-netns.h and netns/bpf.h @ 2021-12-30 0:46 ` kernel test robot 0 siblings, 0 replies; 8+ messages in thread From: kernel test robot @ 2021-12-30 0:46 UTC (permalink / raw) To: kbuild-all [-- Attachment #1: Type: text/plain, Size: 6059 bytes --] Hi Jakub, I love your patch! Yet something to improve: [auto build test ERROR on bpf-next/master] url: https://github.com/0day-ci/linux/commits/Jakub-Kicinski/lighten-uapi-bpf-h-rebuilds/20211230-063309 base: https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next.git master config: arm-randconfig-r025-20211230 (https://download.01.org/0day-ci/archive/20211230/202112300831.1tdh6vYJ-lkp(a)intel.com/config) compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project cd284b7ac0615afc6e0f1a30da2777e361de27a3) 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 arm cross compiling tool for clang build # apt-get install binutils-arm-linux-gnueabi # https://github.com/0day-ci/linux/commit/df4183ffb29b84cb3cfb6ac82457f151e6fa2a28 git remote add linux-review https://github.com/0day-ci/linux git fetch --no-tags linux-review Jakub-Kicinski/lighten-uapi-bpf-h-rebuilds/20211230-063309 git checkout df4183ffb29b84cb3cfb6ac82457f151e6fa2a28 # save the config file to linux build tree mkdir build_dir COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=arm SHELL=/bin/bash net/ipv6/netfilter/ If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot <lkp@intel.com> All error/warnings (new ones prefixed by >>): In file included from net/ipv6/netfilter/nf_reject_ipv6.c:8: In file included from include/net/ip6_route.h:24: >> include/net/ip6_fib.h:548:2: error: type name requires a specifier or qualifier __bpf_md_ptr(struct bpf_iter_meta *, meta); ^ >> include/net/ip6_fib.h:548:22: warning: declaration of 'struct bpf_iter_meta' will not be visible outside of this function [-Wvisibility] __bpf_md_ptr(struct bpf_iter_meta *, meta); ^ >> include/net/ip6_fib.h:548:39: warning: declaration specifier missing, defaulting to 'int' __bpf_md_ptr(struct bpf_iter_meta *, meta); ^ int include/net/ip6_fib.h:549:2: error: type name requires a specifier or qualifier __bpf_md_ptr(struct fib6_info *, rt); ^ include/net/ip6_fib.h:549:35: warning: declaration specifier missing, defaulting to 'int' __bpf_md_ptr(struct fib6_info *, rt); ^ int >> include/net/ip6_fib.h:549:2: error: duplicate member '__bpf_md_ptr' __bpf_md_ptr(struct fib6_info *, rt); ^ include/net/ip6_fib.h:548:2: note: previous declaration is here __bpf_md_ptr(struct bpf_iter_meta *, meta); ^ net/ipv6/netfilter/nf_reject_ipv6.c:287:18: warning: variable 'ip6h' set but not used [-Wunused-but-set-variable] struct ipv6hdr *ip6h; ^ 4 warnings and 3 errors generated. -- In file included from net/ipv6/netfilter/nf_dup_ipv6.c:13: In file included from include/net/ip6_route.h:24: >> include/net/ip6_fib.h:548:2: error: type name requires a specifier or qualifier __bpf_md_ptr(struct bpf_iter_meta *, meta); ^ >> include/net/ip6_fib.h:548:22: warning: declaration of 'struct bpf_iter_meta' will not be visible outside of this function [-Wvisibility] __bpf_md_ptr(struct bpf_iter_meta *, meta); ^ >> include/net/ip6_fib.h:548:39: warning: declaration specifier missing, defaulting to 'int' __bpf_md_ptr(struct bpf_iter_meta *, meta); ^ int include/net/ip6_fib.h:549:2: error: type name requires a specifier or qualifier __bpf_md_ptr(struct fib6_info *, rt); ^ include/net/ip6_fib.h:549:35: warning: declaration specifier missing, defaulting to 'int' __bpf_md_ptr(struct fib6_info *, rt); ^ int >> include/net/ip6_fib.h:549:2: error: duplicate member '__bpf_md_ptr' __bpf_md_ptr(struct fib6_info *, rt); ^ include/net/ip6_fib.h:548:2: note: previous declaration is here __bpf_md_ptr(struct bpf_iter_meta *, meta); ^ 3 warnings and 3 errors generated. vim +548 include/net/ip6_fib.h 180ca444b985c4 Wei Wang 2017-10-06 537 8d1c802b2815ed David Ahern 2018-04-17 538 void fib6_metric_set(struct fib6_info *f6i, int metric, u32 val); 8d1c802b2815ed David Ahern 2018-04-17 539 static inline bool fib6_metric_locked(struct fib6_info *f6i, int metric) d4ead6b34b67fd David Ahern 2018-04-17 540 { d4ead6b34b67fd David Ahern 2018-04-17 541 return !!(f6i->fib6_metrics->metrics[RTAX_LOCK - 1] & (1 << metric)); d4ead6b34b67fd David Ahern 2018-04-17 542 } 907eea486888cf Amit Cohen 2021-02-01 543 void fib6_info_hw_flags_set(struct net *net, struct fib6_info *f6i, 0c5fcf9e249ee1 Amit Cohen 2021-02-07 544 bool offload, bool trap, bool offload_failed); 180ca444b985c4 Wei Wang 2017-10-06 545 3c32cc1bceba8a Yonghong Song 2020-05-13 546 #if IS_BUILTIN(CONFIG_IPV6) && defined(CONFIG_BPF_SYSCALL) 3c32cc1bceba8a Yonghong Song 2020-05-13 547 struct bpf_iter__ipv6_route { 3c32cc1bceba8a Yonghong Song 2020-05-13 @548 __bpf_md_ptr(struct bpf_iter_meta *, meta); 3c32cc1bceba8a Yonghong Song 2020-05-13 @549 __bpf_md_ptr(struct fib6_info *, rt); 3c32cc1bceba8a Yonghong Song 2020-05-13 550 }; 3c32cc1bceba8a Yonghong Song 2020-05-13 551 #endif 3c32cc1bceba8a Yonghong Song 2020-05-13 552 --- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH bpf-next 2/2] bpf: invert the dependency between bpf-netns.h and netns/bpf.h 2021-12-29 22:31 ` [PATCH bpf-next 2/2] bpf: invert the dependency between bpf-netns.h and netns/bpf.h Jakub Kicinski @ 2021-12-30 0:57 ` kernel test robot 2021-12-30 0:57 ` kernel test robot 1 sibling, 0 replies; 8+ messages in thread From: kernel test robot @ 2021-12-30 0:57 UTC (permalink / raw) To: Jakub Kicinski, ast, daniel; +Cc: llvm, kbuild-all, bpf, netdev, Jakub Kicinski Hi Jakub, I love your patch! Yet something to improve: [auto build test ERROR on bpf-next/master] url: https://github.com/0day-ci/linux/commits/Jakub-Kicinski/lighten-uapi-bpf-h-rebuilds/20211230-063309 base: https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next.git master config: x86_64-randconfig-a002-20211230 (https://download.01.org/0day-ci/archive/20211230/202112300828.wqqaIPJ3-lkp@intel.com/config) compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project cd284b7ac0615afc6e0f1a30da2777e361de27a3) 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/0day-ci/linux/commit/df4183ffb29b84cb3cfb6ac82457f151e6fa2a28 git remote add linux-review https://github.com/0day-ci/linux git fetch --no-tags linux-review Jakub-Kicinski/lighten-uapi-bpf-h-rebuilds/20211230-063309 git checkout df4183ffb29b84cb3cfb6ac82457f151e6fa2a28 # save the config file to linux build tree mkdir build_dir COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=x86_64 SHELL=/bin/bash net/ipv6/ If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot <lkp@intel.com> All error/warnings (new ones prefixed by >>): In file included from net/ipv6/anycast.c:39: In file included from include/net/ip6_route.h:24: >> include/net/ip6_fib.h:548:2: error: type name requires a specifier or qualifier __bpf_md_ptr(struct bpf_iter_meta *, meta); ^ >> include/net/ip6_fib.h:548:22: warning: declaration of 'struct bpf_iter_meta' will not be visible outside of this function [-Wvisibility] __bpf_md_ptr(struct bpf_iter_meta *, meta); ^ >> include/net/ip6_fib.h:548:39: warning: declaration specifier missing, defaulting to 'int' __bpf_md_ptr(struct bpf_iter_meta *, meta); ^ int include/net/ip6_fib.h:549:2: error: type name requires a specifier or qualifier __bpf_md_ptr(struct fib6_info *, rt); ^ include/net/ip6_fib.h:549:35: warning: declaration specifier missing, defaulting to 'int' __bpf_md_ptr(struct fib6_info *, rt); ^ int >> include/net/ip6_fib.h:549:2: error: duplicate member '__bpf_md_ptr' __bpf_md_ptr(struct fib6_info *, rt); ^ include/net/ip6_fib.h:548:2: note: previous declaration is here __bpf_md_ptr(struct bpf_iter_meta *, meta); ^ 3 warnings and 3 errors generated. -- In file included from net/ipv6/route.c:48: >> include/net/ip6_fib.h:548:2: error: type name requires a specifier or qualifier __bpf_md_ptr(struct bpf_iter_meta *, meta); ^ >> include/net/ip6_fib.h:548:22: warning: declaration of 'struct bpf_iter_meta' will not be visible outside of this function [-Wvisibility] __bpf_md_ptr(struct bpf_iter_meta *, meta); ^ >> include/net/ip6_fib.h:548:39: warning: declaration specifier missing, defaulting to 'int' __bpf_md_ptr(struct bpf_iter_meta *, meta); ^ int include/net/ip6_fib.h:549:2: error: type name requires a specifier or qualifier __bpf_md_ptr(struct fib6_info *, rt); ^ include/net/ip6_fib.h:549:35: warning: declaration specifier missing, defaulting to 'int' __bpf_md_ptr(struct fib6_info *, rt); ^ int >> include/net/ip6_fib.h:549:2: error: duplicate member '__bpf_md_ptr' __bpf_md_ptr(struct fib6_info *, rt); ^ include/net/ip6_fib.h:548:2: note: previous declaration is here __bpf_md_ptr(struct bpf_iter_meta *, meta); ^ >> net/ipv6/route.c:6612:5: error: no member named 'rt' in 'bpf_iter__ipv6_route' { offsetof(struct bpf_iter__ipv6_route, rt), ^ ~~ include/linux/stddef.h:17:32: note: expanded from macro 'offsetof' #define offsetof(TYPE, MEMBER) __compiler_offsetof(TYPE, MEMBER) ^ ~~~~~~ include/linux/compiler_types.h:140:35: note: expanded from macro '__compiler_offsetof' #define __compiler_offsetof(a, b) __builtin_offsetof(a, b) ^ ~ 3 warnings and 4 errors generated. -- In file included from net/ipv6/netfilter/nf_reject_ipv6.c:8: In file included from include/net/ip6_route.h:24: >> include/net/ip6_fib.h:548:2: error: type name requires a specifier or qualifier __bpf_md_ptr(struct bpf_iter_meta *, meta); ^ >> include/net/ip6_fib.h:548:22: warning: declaration of 'struct bpf_iter_meta' will not be visible outside of this function [-Wvisibility] __bpf_md_ptr(struct bpf_iter_meta *, meta); ^ >> include/net/ip6_fib.h:548:39: warning: declaration specifier missing, defaulting to 'int' __bpf_md_ptr(struct bpf_iter_meta *, meta); ^ int include/net/ip6_fib.h:549:2: error: type name requires a specifier or qualifier __bpf_md_ptr(struct fib6_info *, rt); ^ include/net/ip6_fib.h:549:35: warning: declaration specifier missing, defaulting to 'int' __bpf_md_ptr(struct fib6_info *, rt); ^ int >> include/net/ip6_fib.h:549:2: error: duplicate member '__bpf_md_ptr' __bpf_md_ptr(struct fib6_info *, rt); ^ include/net/ip6_fib.h:548:2: note: previous declaration is here __bpf_md_ptr(struct bpf_iter_meta *, meta); ^ net/ipv6/netfilter/nf_reject_ipv6.c:287:18: warning: variable 'ip6h' set but not used [-Wunused-but-set-variable] struct ipv6hdr *ip6h; ^ 4 warnings and 3 errors generated. vim +548 include/net/ip6_fib.h 180ca444b985c4 Wei Wang 2017-10-06 537 8d1c802b2815ed David Ahern 2018-04-17 538 void fib6_metric_set(struct fib6_info *f6i, int metric, u32 val); 8d1c802b2815ed David Ahern 2018-04-17 539 static inline bool fib6_metric_locked(struct fib6_info *f6i, int metric) d4ead6b34b67fd David Ahern 2018-04-17 540 { d4ead6b34b67fd David Ahern 2018-04-17 541 return !!(f6i->fib6_metrics->metrics[RTAX_LOCK - 1] & (1 << metric)); d4ead6b34b67fd David Ahern 2018-04-17 542 } 907eea486888cf Amit Cohen 2021-02-01 543 void fib6_info_hw_flags_set(struct net *net, struct fib6_info *f6i, 0c5fcf9e249ee1 Amit Cohen 2021-02-07 544 bool offload, bool trap, bool offload_failed); 180ca444b985c4 Wei Wang 2017-10-06 545 3c32cc1bceba8a Yonghong Song 2020-05-13 546 #if IS_BUILTIN(CONFIG_IPV6) && defined(CONFIG_BPF_SYSCALL) 3c32cc1bceba8a Yonghong Song 2020-05-13 547 struct bpf_iter__ipv6_route { 3c32cc1bceba8a Yonghong Song 2020-05-13 @548 __bpf_md_ptr(struct bpf_iter_meta *, meta); 3c32cc1bceba8a Yonghong Song 2020-05-13 @549 __bpf_md_ptr(struct fib6_info *, rt); 3c32cc1bceba8a Yonghong Song 2020-05-13 550 }; 3c32cc1bceba8a Yonghong Song 2020-05-13 551 #endif 3c32cc1bceba8a Yonghong Song 2020-05-13 552 --- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH bpf-next 2/2] bpf: invert the dependency between bpf-netns.h and netns/bpf.h @ 2021-12-30 0:57 ` kernel test robot 0 siblings, 0 replies; 8+ messages in thread From: kernel test robot @ 2021-12-30 0:57 UTC (permalink / raw) To: kbuild-all [-- Attachment #1: Type: text/plain, Size: 7967 bytes --] Hi Jakub, I love your patch! Yet something to improve: [auto build test ERROR on bpf-next/master] url: https://github.com/0day-ci/linux/commits/Jakub-Kicinski/lighten-uapi-bpf-h-rebuilds/20211230-063309 base: https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next.git master config: x86_64-randconfig-a002-20211230 (https://download.01.org/0day-ci/archive/20211230/202112300828.wqqaIPJ3-lkp(a)intel.com/config) compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project cd284b7ac0615afc6e0f1a30da2777e361de27a3) 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/0day-ci/linux/commit/df4183ffb29b84cb3cfb6ac82457f151e6fa2a28 git remote add linux-review https://github.com/0day-ci/linux git fetch --no-tags linux-review Jakub-Kicinski/lighten-uapi-bpf-h-rebuilds/20211230-063309 git checkout df4183ffb29b84cb3cfb6ac82457f151e6fa2a28 # save the config file to linux build tree mkdir build_dir COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=x86_64 SHELL=/bin/bash net/ipv6/ If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot <lkp@intel.com> All error/warnings (new ones prefixed by >>): In file included from net/ipv6/anycast.c:39: In file included from include/net/ip6_route.h:24: >> include/net/ip6_fib.h:548:2: error: type name requires a specifier or qualifier __bpf_md_ptr(struct bpf_iter_meta *, meta); ^ >> include/net/ip6_fib.h:548:22: warning: declaration of 'struct bpf_iter_meta' will not be visible outside of this function [-Wvisibility] __bpf_md_ptr(struct bpf_iter_meta *, meta); ^ >> include/net/ip6_fib.h:548:39: warning: declaration specifier missing, defaulting to 'int' __bpf_md_ptr(struct bpf_iter_meta *, meta); ^ int include/net/ip6_fib.h:549:2: error: type name requires a specifier or qualifier __bpf_md_ptr(struct fib6_info *, rt); ^ include/net/ip6_fib.h:549:35: warning: declaration specifier missing, defaulting to 'int' __bpf_md_ptr(struct fib6_info *, rt); ^ int >> include/net/ip6_fib.h:549:2: error: duplicate member '__bpf_md_ptr' __bpf_md_ptr(struct fib6_info *, rt); ^ include/net/ip6_fib.h:548:2: note: previous declaration is here __bpf_md_ptr(struct bpf_iter_meta *, meta); ^ 3 warnings and 3 errors generated. -- In file included from net/ipv6/route.c:48: >> include/net/ip6_fib.h:548:2: error: type name requires a specifier or qualifier __bpf_md_ptr(struct bpf_iter_meta *, meta); ^ >> include/net/ip6_fib.h:548:22: warning: declaration of 'struct bpf_iter_meta' will not be visible outside of this function [-Wvisibility] __bpf_md_ptr(struct bpf_iter_meta *, meta); ^ >> include/net/ip6_fib.h:548:39: warning: declaration specifier missing, defaulting to 'int' __bpf_md_ptr(struct bpf_iter_meta *, meta); ^ int include/net/ip6_fib.h:549:2: error: type name requires a specifier or qualifier __bpf_md_ptr(struct fib6_info *, rt); ^ include/net/ip6_fib.h:549:35: warning: declaration specifier missing, defaulting to 'int' __bpf_md_ptr(struct fib6_info *, rt); ^ int >> include/net/ip6_fib.h:549:2: error: duplicate member '__bpf_md_ptr' __bpf_md_ptr(struct fib6_info *, rt); ^ include/net/ip6_fib.h:548:2: note: previous declaration is here __bpf_md_ptr(struct bpf_iter_meta *, meta); ^ >> net/ipv6/route.c:6612:5: error: no member named 'rt' in 'bpf_iter__ipv6_route' { offsetof(struct bpf_iter__ipv6_route, rt), ^ ~~ include/linux/stddef.h:17:32: note: expanded from macro 'offsetof' #define offsetof(TYPE, MEMBER) __compiler_offsetof(TYPE, MEMBER) ^ ~~~~~~ include/linux/compiler_types.h:140:35: note: expanded from macro '__compiler_offsetof' #define __compiler_offsetof(a, b) __builtin_offsetof(a, b) ^ ~ 3 warnings and 4 errors generated. -- In file included from net/ipv6/netfilter/nf_reject_ipv6.c:8: In file included from include/net/ip6_route.h:24: >> include/net/ip6_fib.h:548:2: error: type name requires a specifier or qualifier __bpf_md_ptr(struct bpf_iter_meta *, meta); ^ >> include/net/ip6_fib.h:548:22: warning: declaration of 'struct bpf_iter_meta' will not be visible outside of this function [-Wvisibility] __bpf_md_ptr(struct bpf_iter_meta *, meta); ^ >> include/net/ip6_fib.h:548:39: warning: declaration specifier missing, defaulting to 'int' __bpf_md_ptr(struct bpf_iter_meta *, meta); ^ int include/net/ip6_fib.h:549:2: error: type name requires a specifier or qualifier __bpf_md_ptr(struct fib6_info *, rt); ^ include/net/ip6_fib.h:549:35: warning: declaration specifier missing, defaulting to 'int' __bpf_md_ptr(struct fib6_info *, rt); ^ int >> include/net/ip6_fib.h:549:2: error: duplicate member '__bpf_md_ptr' __bpf_md_ptr(struct fib6_info *, rt); ^ include/net/ip6_fib.h:548:2: note: previous declaration is here __bpf_md_ptr(struct bpf_iter_meta *, meta); ^ net/ipv6/netfilter/nf_reject_ipv6.c:287:18: warning: variable 'ip6h' set but not used [-Wunused-but-set-variable] struct ipv6hdr *ip6h; ^ 4 warnings and 3 errors generated. vim +548 include/net/ip6_fib.h 180ca444b985c4 Wei Wang 2017-10-06 537 8d1c802b2815ed David Ahern 2018-04-17 538 void fib6_metric_set(struct fib6_info *f6i, int metric, u32 val); 8d1c802b2815ed David Ahern 2018-04-17 539 static inline bool fib6_metric_locked(struct fib6_info *f6i, int metric) d4ead6b34b67fd David Ahern 2018-04-17 540 { d4ead6b34b67fd David Ahern 2018-04-17 541 return !!(f6i->fib6_metrics->metrics[RTAX_LOCK - 1] & (1 << metric)); d4ead6b34b67fd David Ahern 2018-04-17 542 } 907eea486888cf Amit Cohen 2021-02-01 543 void fib6_info_hw_flags_set(struct net *net, struct fib6_info *f6i, 0c5fcf9e249ee1 Amit Cohen 2021-02-07 544 bool offload, bool trap, bool offload_failed); 180ca444b985c4 Wei Wang 2017-10-06 545 3c32cc1bceba8a Yonghong Song 2020-05-13 546 #if IS_BUILTIN(CONFIG_IPV6) && defined(CONFIG_BPF_SYSCALL) 3c32cc1bceba8a Yonghong Song 2020-05-13 547 struct bpf_iter__ipv6_route { 3c32cc1bceba8a Yonghong Song 2020-05-13 @548 __bpf_md_ptr(struct bpf_iter_meta *, meta); 3c32cc1bceba8a Yonghong Song 2020-05-13 @549 __bpf_md_ptr(struct fib6_info *, rt); 3c32cc1bceba8a Yonghong Song 2020-05-13 550 }; 3c32cc1bceba8a Yonghong Song 2020-05-13 551 #endif 3c32cc1bceba8a Yonghong Song 2020-05-13 552 --- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org ^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2021-12-30 0:57 UTC | newest] Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2021-12-29 22:31 [PATCH bpf-next 0/2] lighten uapi/bpf.h rebuilds Jakub Kicinski 2021-12-29 22:31 ` [PATCH bpf-next 1/2] net: add includes masked by netdevice.h including uapi/bpf.h Jakub Kicinski 2021-12-29 22:31 ` Jakub Kicinski 2021-12-29 22:31 ` [PATCH bpf-next 2/2] bpf: invert the dependency between bpf-netns.h and netns/bpf.h Jakub Kicinski 2021-12-30 0:46 ` kernel test robot 2021-12-30 0:46 ` kernel test robot 2021-12-30 0:57 ` kernel test robot 2021-12-30 0:57 ` kernel test robot
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.