* [PATCH v2] selftests net: fix bpf build error
@ 2022-06-01 8:48 Lina Wang
2022-06-01 15:54 ` Song Liu
2022-06-02 10:29 ` Paolo Abeni
0 siblings, 2 replies; 4+ messages in thread
From: Lina Wang @ 2022-06-01 8:48 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, Lina Wang
bpf_helpers.h has been moved to tools/lib/bpf since 5.10, so add more
including 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 v2] selftests net: fix bpf build error
2022-06-01 8:48 [PATCH v2] selftests net: fix bpf build error Lina Wang
@ 2022-06-01 15:54 ` Song Liu
2022-06-02 10:29 ` Paolo Abeni
1 sibling, 0 replies; 4+ messages in thread
From: Song Liu @ 2022-06-01 15:54 UTC (permalink / raw)
To: Lina Wang
Cc: David S . Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
Shuah Khan, Daniel Borkmann, Alexei Starovoitov, Andrii Nakryiko,
Maciej enczykowski, Networking, linux-kselftest, bpf, open list,
kbuild test robot, rong.a.chen, kernel test robot
On Wed, Jun 1, 2022 at 1:55 AM Lina Wang <lina.wang@mediatek.com> wrote:
>
> bpf_helpers.h has been moved to tools/lib/bpf since 5.10, so add more
> including 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>
Acked-by: Song Liu <songliubraving@fb.com>
PS: When sending v2, you can include Acked-by/Reviewed-by received for v1.
[...]
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH v2] selftests net: fix bpf build error
2022-06-01 8:48 [PATCH v2] selftests net: fix bpf build error Lina Wang
2022-06-01 15:54 ` Song Liu
@ 2022-06-02 10:29 ` Paolo Abeni
2022-06-06 7:32 ` Lina Wang
1 sibling, 1 reply; 4+ messages in thread
From: Paolo Abeni @ 2022-06-02 10:29 UTC (permalink / raw)
To: Lina Wang, David S . Miller, Eric Dumazet, Jakub Kicinski,
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 16:48 +0800, Lina Wang wrote:
> bpf_helpers.h has been moved to tools/lib/bpf since 5.10, so add more
> including 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
With this patch applied, I still get an error while building the self-
tests:
---
cd tools/testing/selftests/
make
#...
make[1]: Entering directory '/home/pabeni/net/tools/testing/selftests/net'
bpf/Makefile:15: warning: overriding recipe for target 'clean'
../lib.mk:136: warning: ignoring old recipe for target 'clean'
clang -O2 -target bpf -c bpf/nat6to4.c -I../../bpf -I../../../../lib -I../../../../../usr/include/ -o /home/pabeni/net/tools/testing/selftests/net/bpf/nat6to4.o
bpf/nat6to4.c:43:10: fatal error: 'bpf/bpf_helpers.h' file not found
#include <bpf/bpf_helpers.h>
^~~~~~~~~~~~~~~~~~~
1 error generated.
make[1]: *** [bpf/Makefile:12: /home/pabeni/net/tools/testing/selftests/net/bpf/nat6to4.o] Error 1
---
the following fix the issue here:
---
diff --git a/tools/testing/selftests/net/bpf/Makefile b/tools/testing/selftests/net/bpf/Makefile
index 070251986dbe..cff99d571408 100644
--- a/tools/testing/selftests/net/bpf/Makefile
+++ b/tools/testing/selftests/net/bpf/Makefile
@@ -2,7 +2,7 @@
CLANG ?= clang
CCINCLUDE += -I../../bpf
-CCINCLUDE += -I../../../../lib
+CCINCLUDE += -I../../../lib
CCINCLUDE += -I../../../../../usr/include/
---
(But I still hit the "overriding recipe for target 'clean'" warnings)
Cheers,
Paolo
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH v2] selftests net: fix bpf build error
2022-06-02 10:29 ` Paolo Abeni
@ 2022-06-06 7:32 ` Lina Wang
0 siblings, 0 replies; 4+ messages in thread
From: Lina Wang @ 2022-06-06 7:32 UTC (permalink / raw)
To: David S . Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni, Shuah Khan
Cc: Alexei Starovoitov, Daniel Borkmann, Andrii Nakryiko,
Martin KaFai Lau, Song Liu, Yonghong Song, John Fastabend,
KP Singh, Matthias Brugger, Maciej enczykowski, netdev,
linux-kselftest, bpf, linux-kernel, linux-arm-kernel,
linux-mediatek
On Thu, 2022-06-02 at 12:29 +0200, Paolo Abeni wrote:
> On Wed, 2022-06-01 at 16:48 +0800, Lina Wang wrote:
> > bpf_helpers.h has been moved to tools/lib/bpf since 5.10, so add
> > more
> > including path.
> >
> > Fixes: edae34a3ed92 ("selftests net: add UDP GRO fraglist + bpf
> CLANG ?= clang
> CCINCLUDE += -I../../bpf
> -CCINCLUDE += -I../../../../lib
> +CCINCLUDE += -I../../../lib
> CCINCLUDE += -I../../../../../usr/include/
> ---
Your solution is right,
> (But I still hit the "overriding recipe for target 'clean'" warnings)
I have fixed in v3, the warning is that tools/testing/selftests/net/bpf/Makefile has redefined "clean"
Thanks!
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2022-06-06 8:25 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-06-01 8:48 [PATCH v2] selftests net: fix bpf build error Lina Wang
2022-06-01 15:54 ` Song Liu
2022-06-02 10:29 ` Paolo Abeni
2022-06-06 7:32 ` Lina Wang
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).