* [PATCH] selftests net: fix bpf build error
@ 2022-05-30 6:21 Lina Wang
2022-05-31 22:27 ` Song Liu
2022-05-31 23:01 ` Daniel Borkmann
0 siblings, 2 replies; 4+ messages in thread
From: Lina Wang @ 2022-05-30 6:21 UTC (permalink / raw)
To: David S . Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni, Shuah Khan
Cc: Alexei Starovoitov, Daniel Borkmann, Andrii Nakryiko,
Maciej enczykowski, netdev, linux-kselftest, bpf, linux-kernel,
lkp, rong.a.chen, kernel test robot, Lina Wang
bpf_helpers.h has been moved to tools/lib/bpf since 5.10, so add more
incliding path.
Fixes: edae34a3ed92 ("selftests net: add UDP GRO fraglist + bpf self-tests")
Reported-by: kernel test robot <oliver.sang@intel.com>
Signed-off-by: Lina Wang <lina.wang@mediatek.com>
---
tools/testing/selftests/net/bpf/Makefile | 1 +
1 file changed, 1 insertion(+)
diff --git a/tools/testing/selftests/net/bpf/Makefile b/tools/testing/selftests/net/bpf/Makefile
index f91bf14bbee7..070251986dbe 100644
--- a/tools/testing/selftests/net/bpf/Makefile
+++ b/tools/testing/selftests/net/bpf/Makefile
@@ -2,6 +2,7 @@
CLANG ?= clang
CCINCLUDE += -I../../bpf
+CCINCLUDE += -I../../../../lib
CCINCLUDE += -I../../../../../usr/include/
TEST_CUSTOM_PROGS = $(OUTPUT)/bpf/nat6to4.o
--
2.18.0
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] selftests net: fix bpf build error
2022-05-30 6:21 [PATCH] selftests net: fix bpf build error Lina Wang
@ 2022-05-31 22:27 ` Song Liu
2022-05-31 23:01 ` Daniel Borkmann
1 sibling, 0 replies; 4+ messages in thread
From: Song Liu @ 2022-05-31 22:27 UTC (permalink / raw)
To: Lina Wang
Cc: David S . Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
Shuah Khan, Alexei Starovoitov, Daniel Borkmann, Andrii Nakryiko,
Maciej enczykowski, Networking, linux-kselftest, bpf, open list,
kbuild test robot, rong.a.chen, kernel test robot
On Sun, May 29, 2022 at 11:28 PM Lina Wang <lina.wang@mediatek.com> wrote:
>
> bpf_helpers.h has been moved to tools/lib/bpf since 5.10, so add more
> incliding path.
nit: including
>
> Fixes: edae34a3ed92 ("selftests net: add UDP GRO fraglist + bpf self-tests")
> Reported-by: kernel test robot <oliver.sang@intel.com>
> Signed-off-by: Lina Wang <lina.wang@mediatek.com>
Acked-by: Song Liu <songliubraving@fb.com>
> ---
> tools/testing/selftests/net/bpf/Makefile | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/tools/testing/selftests/net/bpf/Makefile b/tools/testing/selftests/net/bpf/Makefile
> index f91bf14bbee7..070251986dbe 100644
> --- a/tools/testing/selftests/net/bpf/Makefile
> +++ b/tools/testing/selftests/net/bpf/Makefile
> @@ -2,6 +2,7 @@
>
> CLANG ?= clang
> CCINCLUDE += -I../../bpf
> +CCINCLUDE += -I../../../../lib
> CCINCLUDE += -I../../../../../usr/include/
>
> TEST_CUSTOM_PROGS = $(OUTPUT)/bpf/nat6to4.o
> --
> 2.18.0
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] selftests net: fix bpf build error
2022-05-30 6:21 [PATCH] selftests net: fix bpf build error Lina Wang
2022-05-31 22:27 ` Song Liu
@ 2022-05-31 23:01 ` Daniel Borkmann
2022-06-01 7:08 ` Lina Wang
1 sibling, 1 reply; 4+ messages in thread
From: Daniel Borkmann @ 2022-05-31 23:01 UTC (permalink / raw)
To: Lina Wang, David S . Miller, Eric Dumazet, Jakub Kicinski,
Paolo Abeni, Shuah Khan
Cc: Alexei Starovoitov, Andrii Nakryiko, Maciej enczykowski, netdev,
linux-kselftest, bpf, linux-kernel, lkp, rong.a.chen,
kernel test robot
On 5/30/22 8:21 AM, Lina Wang wrote:
> bpf_helpers.h has been moved to tools/lib/bpf since 5.10, so add more
> incliding path.
>
> Fixes: edae34a3ed92 ("selftests net: add UDP GRO fraglist + bpf self-tests")
> Reported-by: kernel test robot <oliver.sang@intel.com>
> Signed-off-by: Lina Wang <lina.wang@mediatek.com>
> ---
> tools/testing/selftests/net/bpf/Makefile | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/tools/testing/selftests/net/bpf/Makefile b/tools/testing/selftests/net/bpf/Makefile
> index f91bf14bbee7..070251986dbe 100644
> --- a/tools/testing/selftests/net/bpf/Makefile
> +++ b/tools/testing/selftests/net/bpf/Makefile
> @@ -2,6 +2,7 @@
>
> CLANG ?= clang
> CCINCLUDE += -I../../bpf
> +CCINCLUDE += -I../../../../lib
> CCINCLUDE += -I../../../../../usr/include/
>
> TEST_CUSTOM_PROGS = $(OUTPUT)/bpf/nat6to4.o
>
From building the selftest in general, I'm getting:
clang -O2 -target bpf -c bpf/nat6to4.c -I../../bpf -I../../../../lib -I../../../../../usr/include/ -o /root/daniel/bpf/tools/testing/selftests/net/bpf/nat6to4.o
In file included from bpf/nat6to4.c:27:
In file included from /usr/include/linux/bpf.h:11:
/usr/include/linux/types.h:5:10: fatal error: 'asm/types.h' file not found
#include <asm/types.h>
^~~~~~~~~~~~~
1 error generated.
Could we reuse the build infra from tools/testing/selftests/bpf/ for nat6to4.c?
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] selftests net: fix bpf build error
2022-05-31 23:01 ` Daniel Borkmann
@ 2022-06-01 7:08 ` Lina Wang
0 siblings, 0 replies; 4+ messages in thread
From: Lina Wang @ 2022-06-01 7:08 UTC (permalink / raw)
To: David S . Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
Shuah Khan, Daniel Borkmann
Cc: Alexei Starovoitov, Andrii Nakryiko, Maciej enczykowski, netdev,
linux-kselftest, bpf, linux-kernel, lkp, rong.a.chen,
kernel test robot
On Wed, 2022-06-01 at 01:01 +0200, Daniel Borkmann wrote:
> On 5/30/22 8:21 AM, Lina Wang wrote:
> clang -O2 -target bpf -c bpf/nat6to4.c -I../../bpf -I../../../../lib
> -I../../../../../usr/include/ -o
> /root/daniel/bpf/tools/testing/selftests/net/bpf/nat6to4.o
> In file included from bpf/nat6to4.c:27:
> In file included from /usr/include/linux/bpf.h:11:
> /usr/include/linux/types.h:5:10: fatal error: 'asm/types.h' file not
> found
> #include <asm/types.h>
> ^~~~~~~~~~~~~
> 1 error generated.
maybe your pc is ubuntu or Debian, you should apt-get install gcc-multilib,
guys on the internet meets the same problem when build libbpf related, just
install gcc-multilib package
> Could we reuse the build infra from tools/testing/selftests/bpf/ for nat6to4.c?
We discussed it before, please refer to https://patchwork.kernel.org/project/netdevbpf/patch/20220407084727.10241-1-lina.wang@mediatek.com/
Thanks!
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2022-06-01 7:16 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-30 6:21 [PATCH] selftests net: fix bpf build error Lina Wang
2022-05-31 22:27 ` Song Liu
2022-05-31 23:01 ` Daniel Borkmann
2022-06-01 7:08 ` Lina Wang
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.