netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH bpf-next 1/2] libbpf: Add missing per-arch include path
@ 2024-09-27 13:13 Björn Töpel
  2024-09-27 13:13 ` [PATCH bpf-next 2/2] selftests: bpf: " Björn Töpel
                   ` (4 more replies)
  0 siblings, 5 replies; 12+ messages in thread
From: Björn Töpel @ 2024-09-27 13:13 UTC (permalink / raw)
  To: Andrii Nakryiko, Eduard Zingerman, Mykola Lysenko, bpf, netdev
  Cc: Björn Töpel, linux-kselftest, linux-kernel, linux-riscv,
	Charlie Jenkins

From: Björn Töpel <bjorn@rivosinc.com>

libbpf does not include the per-arch tools include path, e.g.
tools/arch/riscv/include. Some architectures depend those files to
build properly.

Include tools/arch/$(SUBARCH)/include in the libbpf build.

Fixes: 6d74d178fe6e ("tools: Add riscv barrier implementation")
Signed-off-by: Björn Töpel <bjorn@rivosinc.com>
---
 tools/lib/bpf/Makefile | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/tools/lib/bpf/Makefile b/tools/lib/bpf/Makefile
index 1b22f0f37288..857a5f7b413d 100644
--- a/tools/lib/bpf/Makefile
+++ b/tools/lib/bpf/Makefile
@@ -61,7 +61,8 @@ ifndef VERBOSE
 endif
 
 INCLUDES = -I$(or $(OUTPUT),.) \
-	   -I$(srctree)/tools/include -I$(srctree)/tools/include/uapi
+	   -I$(srctree)/tools/include -I$(srctree)/tools/include/uapi \
+	   -I$(srctree)/tools/arch/$(SRCARCH)/include
 
 export prefix libdir src obj
 

base-commit: db5ca265e3334b48c4e3fa07eef79e8bc578c430
-- 
2.43.0


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

* [PATCH bpf-next 2/2] selftests: bpf: Add missing per-arch include path
  2024-09-27 13:13 [PATCH bpf-next 1/2] libbpf: Add missing per-arch include path Björn Töpel
@ 2024-09-27 13:13 ` Björn Töpel
  2024-09-27 20:52   ` Andrii Nakryiko
  2024-09-27 20:50 ` [PATCH bpf-next 1/2] libbpf: " Andrii Nakryiko
                   ` (3 subsequent siblings)
  4 siblings, 1 reply; 12+ messages in thread
From: Björn Töpel @ 2024-09-27 13:13 UTC (permalink / raw)
  To: Andrii Nakryiko, Eduard Zingerman, Mykola Lysenko, bpf, netdev
  Cc: Björn Töpel, linux-kselftest, linux-kernel, linux-riscv,
	Charlie Jenkins

From: Björn Töpel <bjorn@rivosinc.com>

The prog_tests programs do not include the per-arch tools include
path, e.g. tools/arch/riscv/include. Some architectures depend those
files to build properly.

Include tools/arch/$(SUBARCH)/include in the selftests bpf build.

Fixes: 6d74d178fe6e ("tools: Add riscv barrier implementation")
Signed-off-by: Björn Töpel <bjorn@rivosinc.com>
---
 tools/testing/selftests/bpf/Makefile | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/tools/testing/selftests/bpf/Makefile b/tools/testing/selftests/bpf/Makefile
index 365740f24d2e..d6a53afa449f 100644
--- a/tools/testing/selftests/bpf/Makefile
+++ b/tools/testing/selftests/bpf/Makefile
@@ -10,6 +10,7 @@ TOOLSDIR := $(abspath ../../..)
 LIBDIR := $(TOOLSDIR)/lib
 BPFDIR := $(LIBDIR)/bpf
 TOOLSINCDIR := $(TOOLSDIR)/include
+TOOLSARCHINCDIR := $(TOOLSDIR)/arch/$(SRCARCH)/include
 BPFTOOLDIR := $(TOOLSDIR)/bpf/bpftool
 APIDIR := $(TOOLSINCDIR)/uapi
 ifneq ($(O),)
@@ -44,7 +45,7 @@ CFLAGS += -g $(OPT_FLAGS) -rdynamic					\
 	  -Wall -Werror -fno-omit-frame-pointer				\
 	  $(GENFLAGS) $(SAN_CFLAGS) $(LIBELF_CFLAGS)			\
 	  -I$(CURDIR) -I$(INCLUDE_DIR) -I$(GENDIR) -I$(LIBDIR)		\
-	  -I$(TOOLSINCDIR) -I$(APIDIR) -I$(OUTPUT)
+	  -I$(TOOLSINCDIR) -I$(TOOLSARCHINCDIR) -I$(APIDIR) -I$(OUTPUT)
 LDFLAGS += $(SAN_LDFLAGS)
 LDLIBS += $(LIBELF_LIBS) -lz -lrt -lpthread
 
-- 
2.43.0


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

* Re: [PATCH bpf-next 1/2] libbpf: Add missing per-arch include path
  2024-09-27 13:13 [PATCH bpf-next 1/2] libbpf: Add missing per-arch include path Björn Töpel
  2024-09-27 13:13 ` [PATCH bpf-next 2/2] selftests: bpf: " Björn Töpel
@ 2024-09-27 20:50 ` Andrii Nakryiko
  2024-09-28  9:11   ` Björn Töpel
  2024-10-08  3:30 ` patchwork-bot+netdevbpf
                   ` (2 subsequent siblings)
  4 siblings, 1 reply; 12+ messages in thread
From: Andrii Nakryiko @ 2024-09-27 20:50 UTC (permalink / raw)
  To: Björn Töpel
  Cc: Andrii Nakryiko, Eduard Zingerman, Mykola Lysenko, bpf, netdev,
	Björn Töpel, linux-kselftest, linux-kernel, linux-riscv,
	Charlie Jenkins

On Fri, Sep 27, 2024 at 6:14 AM Björn Töpel <bjorn@kernel.org> wrote:
>
> From: Björn Töpel <bjorn@rivosinc.com>
>
> libbpf does not include the per-arch tools include path, e.g.
> tools/arch/riscv/include. Some architectures depend those files to
> build properly.
>
> Include tools/arch/$(SUBARCH)/include in the libbpf build.
>
> Fixes: 6d74d178fe6e ("tools: Add riscv barrier implementation")
> Signed-off-by: Björn Töpel <bjorn@rivosinc.com>
> ---
>  tools/lib/bpf/Makefile | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/tools/lib/bpf/Makefile b/tools/lib/bpf/Makefile
> index 1b22f0f37288..857a5f7b413d 100644
> --- a/tools/lib/bpf/Makefile
> +++ b/tools/lib/bpf/Makefile
> @@ -61,7 +61,8 @@ ifndef VERBOSE
>  endif
>
>  INCLUDES = -I$(or $(OUTPUT),.) \
> -          -I$(srctree)/tools/include -I$(srctree)/tools/include/uapi
> +          -I$(srctree)/tools/include -I$(srctree)/tools/include/uapi \
> +          -I$(srctree)/tools/arch/$(SRCARCH)/include
>
>  export prefix libdir src obj
>

Do you know what exactly is used from tools/arch/$(SRCARCH)/include
for (I assume) RISC-V? I'm asking because we'd need to make sure that
Github version of libbpf Makefile and include directory has all the
necessary pieces as well (so I'd appreciate if you could take a look
at that as well, if you haven't already).

>
> base-commit: db5ca265e3334b48c4e3fa07eef79e8bc578c430
> --
> 2.43.0
>

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

* Re: [PATCH bpf-next 2/2] selftests: bpf: Add missing per-arch include path
  2024-09-27 13:13 ` [PATCH bpf-next 2/2] selftests: bpf: " Björn Töpel
@ 2024-09-27 20:52   ` Andrii Nakryiko
  2024-09-28  9:14     ` Björn Töpel
  0 siblings, 1 reply; 12+ messages in thread
From: Andrii Nakryiko @ 2024-09-27 20:52 UTC (permalink / raw)
  To: Björn Töpel
  Cc: Andrii Nakryiko, Eduard Zingerman, Mykola Lysenko, bpf, netdev,
	Björn Töpel, linux-kselftest, linux-kernel, linux-riscv,
	Charlie Jenkins

On Fri, Sep 27, 2024 at 6:14 AM Björn Töpel <bjorn@kernel.org> wrote:
>
> From: Björn Töpel <bjorn@rivosinc.com>
>
> The prog_tests programs do not include the per-arch tools include
> path, e.g. tools/arch/riscv/include. Some architectures depend those
> files to build properly.
>
> Include tools/arch/$(SUBARCH)/include in the selftests bpf build.
>
> Fixes: 6d74d178fe6e ("tools: Add riscv barrier implementation")
> Signed-off-by: Björn Töpel <bjorn@rivosinc.com>
> ---
>  tools/testing/selftests/bpf/Makefile | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/tools/testing/selftests/bpf/Makefile b/tools/testing/selftests/bpf/Makefile
> index 365740f24d2e..d6a53afa449f 100644
> --- a/tools/testing/selftests/bpf/Makefile
> +++ b/tools/testing/selftests/bpf/Makefile
> @@ -10,6 +10,7 @@ TOOLSDIR := $(abspath ../../..)
>  LIBDIR := $(TOOLSDIR)/lib
>  BPFDIR := $(LIBDIR)/bpf
>  TOOLSINCDIR := $(TOOLSDIR)/include
> +TOOLSARCHINCDIR := $(TOOLSDIR)/arch/$(SRCARCH)/include
>  BPFTOOLDIR := $(TOOLSDIR)/bpf/bpftool
>  APIDIR := $(TOOLSINCDIR)/uapi
>  ifneq ($(O),)
> @@ -44,7 +45,7 @@ CFLAGS += -g $(OPT_FLAGS) -rdynamic                                   \
>           -Wall -Werror -fno-omit-frame-pointer                         \
>           $(GENFLAGS) $(SAN_CFLAGS) $(LIBELF_CFLAGS)                    \
>           -I$(CURDIR) -I$(INCLUDE_DIR) -I$(GENDIR) -I$(LIBDIR)          \
> -         -I$(TOOLSINCDIR) -I$(APIDIR) -I$(OUTPUT)
> +         -I$(TOOLSINCDIR) -I$(TOOLSARCHINCDIR) -I$(APIDIR) -I$(OUTPUT)

Eduard was going to switch selftests to use kernel UAPI headers, I
wonder if we should do just that and then set up arch-specific
includes from kernel (not from tools/) as well?

>  LDFLAGS += $(SAN_LDFLAGS)
>  LDLIBS += $(LIBELF_LIBS) -lz -lrt -lpthread
>
> --
> 2.43.0
>

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

* Re: [PATCH bpf-next 1/2] libbpf: Add missing per-arch include path
  2024-09-27 20:50 ` [PATCH bpf-next 1/2] libbpf: " Andrii Nakryiko
@ 2024-09-28  9:11   ` Björn Töpel
  0 siblings, 0 replies; 12+ messages in thread
From: Björn Töpel @ 2024-09-28  9:11 UTC (permalink / raw)
  To: Andrii Nakryiko
  Cc: Andrii Nakryiko, Eduard Zingerman, Mykola Lysenko, bpf, netdev,
	Björn Töpel, linux-kselftest, linux-kernel, linux-riscv,
	Charlie Jenkins

Andrii,

On Fri, 27 Sept 2024 at 22:51, Andrii Nakryiko
<andrii.nakryiko@gmail.com> wrote:
>
> On Fri, Sep 27, 2024 at 6:14 AM Björn Töpel <bjorn@kernel.org> wrote:
> >
> > From: Björn Töpel <bjorn@rivosinc.com>
> >
> > libbpf does not include the per-arch tools include path, e.g.
> > tools/arch/riscv/include. Some architectures depend those files to
> > build properly.
> >
> > Include tools/arch/$(SUBARCH)/include in the libbpf build.
> >
> > Fixes: 6d74d178fe6e ("tools: Add riscv barrier implementation")
> > Signed-off-by: Björn Töpel <bjorn@rivosinc.com>
> > ---
> >  tools/lib/bpf/Makefile | 3 ++-
> >  1 file changed, 2 insertions(+), 1 deletion(-)
> >
> > diff --git a/tools/lib/bpf/Makefile b/tools/lib/bpf/Makefile
> > index 1b22f0f37288..857a5f7b413d 100644
> > --- a/tools/lib/bpf/Makefile
> > +++ b/tools/lib/bpf/Makefile
> > @@ -61,7 +61,8 @@ ifndef VERBOSE
> >  endif
> >
> >  INCLUDES = -I$(or $(OUTPUT),.) \
> > -          -I$(srctree)/tools/include -I$(srctree)/tools/include/uapi
> > +          -I$(srctree)/tools/include -I$(srctree)/tools/include/uapi \
> > +          -I$(srctree)/tools/arch/$(SRCARCH)/include
> >
> >  export prefix libdir src obj
> >
>
> Do you know what exactly is used from tools/arch/$(SRCARCH)/include
> for (I assume) RISC-V? I'm asking because we'd need to make sure that
> Github version of libbpf Makefile and include directory has all the
> necessary pieces as well (so I'd appreciate if you could take a look
> at that as well, if you haven't already).

Ah, apologies for not stating that explicitly. It's
tools/arch/riscv/include/asm/{barrier.h,fence.h}

Cheers,
Björn

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

* Re: [PATCH bpf-next 2/2] selftests: bpf: Add missing per-arch include path
  2024-09-27 20:52   ` Andrii Nakryiko
@ 2024-09-28  9:14     ` Björn Töpel
  0 siblings, 0 replies; 12+ messages in thread
From: Björn Töpel @ 2024-09-28  9:14 UTC (permalink / raw)
  To: Andrii Nakryiko
  Cc: Andrii Nakryiko, Eduard Zingerman, Mykola Lysenko, bpf, netdev,
	Björn Töpel, linux-kselftest, linux-kernel, linux-riscv,
	Charlie Jenkins

On Fri, 27 Sept 2024 at 22:52, Andrii Nakryiko
<andrii.nakryiko@gmail.com> wrote:
>
> On Fri, Sep 27, 2024 at 6:14 AM Björn Töpel <bjorn@kernel.org> wrote:
> >
> > From: Björn Töpel <bjorn@rivosinc.com>
> >
> > The prog_tests programs do not include the per-arch tools include
> > path, e.g. tools/arch/riscv/include. Some architectures depend those
> > files to build properly.
> >
> > Include tools/arch/$(SUBARCH)/include in the selftests bpf build.
> >
> > Fixes: 6d74d178fe6e ("tools: Add riscv barrier implementation")
> > Signed-off-by: Björn Töpel <bjorn@rivosinc.com>
> > ---
> >  tools/testing/selftests/bpf/Makefile | 3 ++-
> >  1 file changed, 2 insertions(+), 1 deletion(-)
> >
> > diff --git a/tools/testing/selftests/bpf/Makefile b/tools/testing/selftests/bpf/Makefile
> > index 365740f24d2e..d6a53afa449f 100644
> > --- a/tools/testing/selftests/bpf/Makefile
> > +++ b/tools/testing/selftests/bpf/Makefile
> > @@ -10,6 +10,7 @@ TOOLSDIR := $(abspath ../../..)
> >  LIBDIR := $(TOOLSDIR)/lib
> >  BPFDIR := $(LIBDIR)/bpf
> >  TOOLSINCDIR := $(TOOLSDIR)/include
> > +TOOLSARCHINCDIR := $(TOOLSDIR)/arch/$(SRCARCH)/include
> >  BPFTOOLDIR := $(TOOLSDIR)/bpf/bpftool
> >  APIDIR := $(TOOLSINCDIR)/uapi
> >  ifneq ($(O),)
> > @@ -44,7 +45,7 @@ CFLAGS += -g $(OPT_FLAGS) -rdynamic                                   \
> >           -Wall -Werror -fno-omit-frame-pointer                         \
> >           $(GENFLAGS) $(SAN_CFLAGS) $(LIBELF_CFLAGS)                    \
> >           -I$(CURDIR) -I$(INCLUDE_DIR) -I$(GENDIR) -I$(LIBDIR)          \
> > -         -I$(TOOLSINCDIR) -I$(APIDIR) -I$(OUTPUT)
> > +         -I$(TOOLSINCDIR) -I$(TOOLSARCHINCDIR) -I$(APIDIR) -I$(OUTPUT)
>
> Eduard was going to switch selftests to use kernel UAPI headers, I
> wonder if we should do just that and then set up arch-specific
> includes from kernel (not from tools/) as well?

In the end it's up to you guys! This is broken on Linus' master for
RISC-V now, so from my (RISC-V) perspective having a workaround sooner
than later would be nice!

@Eduard Do you have any patches around? If so, I can take them for a spin on RV.


Björn

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

* Re: [PATCH bpf-next 1/2] libbpf: Add missing per-arch include path
  2024-09-27 13:13 [PATCH bpf-next 1/2] libbpf: Add missing per-arch include path Björn Töpel
  2024-09-27 13:13 ` [PATCH bpf-next 2/2] selftests: bpf: " Björn Töpel
  2024-09-27 20:50 ` [PATCH bpf-next 1/2] libbpf: " Andrii Nakryiko
@ 2024-10-08  3:30 ` patchwork-bot+netdevbpf
  2024-11-04 10:25   ` Björn Töpel
  2024-11-04 10:04 ` Alexandre Ghiti
  2024-11-05 11:46 ` Kexy Biscuit
  4 siblings, 1 reply; 12+ messages in thread
From: patchwork-bot+netdevbpf @ 2024-10-08  3:30 UTC (permalink / raw)
  To: =?utf-8?b?QmrDtnJuIFTDtnBlbCA8Ympvcm5Aa2VybmVsLm9yZz4=?=
  Cc: andrii, eddyz87, mykolal, bpf, netdev, bjorn, linux-kselftest,
	linux-kernel, linux-riscv, charlie

Hello:

This series was applied to bpf/bpf-next.git (master)
by Andrii Nakryiko <andrii@kernel.org>:

On Fri, 27 Sep 2024 15:13:52 +0200 you wrote:
> From: Björn Töpel <bjorn@rivosinc.com>
> 
> libbpf does not include the per-arch tools include path, e.g.
> tools/arch/riscv/include. Some architectures depend those files to
> build properly.
> 
> Include tools/arch/$(SUBARCH)/include in the libbpf build.
> 
> [...]

Here is the summary with links:
  - [bpf-next,1/2] libbpf: Add missing per-arch include path
    https://git.kernel.org/bpf/bpf-next/c/710fbca820c7
  - [bpf-next,2/2] selftests: bpf: Add missing per-arch include path
    https://git.kernel.org/bpf/bpf-next/c/19090f0306f1

You are awesome, thank you!
-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html



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

* Re: [PATCH bpf-next 1/2] libbpf: Add missing per-arch include path
  2024-09-27 13:13 [PATCH bpf-next 1/2] libbpf: Add missing per-arch include path Björn Töpel
                   ` (2 preceding siblings ...)
  2024-10-08  3:30 ` patchwork-bot+netdevbpf
@ 2024-11-04 10:04 ` Alexandre Ghiti
  2024-11-05 11:46 ` Kexy Biscuit
  4 siblings, 0 replies; 12+ messages in thread
From: Alexandre Ghiti @ 2024-11-04 10:04 UTC (permalink / raw)
  To: Björn Töpel, Andrii Nakryiko, Eduard Zingerman,
	Mykola Lysenko, bpf, netdev
  Cc: Björn Töpel, linux-kselftest, linux-kernel, linux-riscv,
	Charlie Jenkins

Hi Bjorn,

On 27/09/2024 15:13, Björn Töpel wrote:
> From: Björn Töpel <bjorn@rivosinc.com>
>
> libbpf does not include the per-arch tools include path, e.g.
> tools/arch/riscv/include. Some architectures depend those files to
> build properly.
>
> Include tools/arch/$(SUBARCH)/include in the libbpf build.
>
> Fixes: 6d74d178fe6e ("tools: Add riscv barrier implementation")
> Signed-off-by: Björn Töpel <bjorn@rivosinc.com>
> ---
>   tools/lib/bpf/Makefile | 3 ++-
>   1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/tools/lib/bpf/Makefile b/tools/lib/bpf/Makefile
> index 1b22f0f37288..857a5f7b413d 100644
> --- a/tools/lib/bpf/Makefile
> +++ b/tools/lib/bpf/Makefile
> @@ -61,7 +61,8 @@ ifndef VERBOSE
>   endif
>   
>   INCLUDES = -I$(or $(OUTPUT),.) \
> -	   -I$(srctree)/tools/include -I$(srctree)/tools/include/uapi
> +	   -I$(srctree)/tools/include -I$(srctree)/tools/include/uapi \
> +	   -I$(srctree)/tools/arch/$(SRCARCH)/include
>   
>   export prefix libdir src obj
>   
>
> base-commit: db5ca265e3334b48c4e3fa07eef79e8bc578c430


You can add:

Tested-by: Alexandre Ghiti <alexghiti@rivosinc.com>

Thanks,

Alex


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

* Re: [PATCH bpf-next 1/2] libbpf: Add missing per-arch include path
  2024-10-08  3:30 ` patchwork-bot+netdevbpf
@ 2024-11-04 10:25   ` Björn Töpel
  2024-11-06 22:04     ` Andrii Nakryiko
  0 siblings, 1 reply; 12+ messages in thread
From: Björn Töpel @ 2024-11-04 10:25 UTC (permalink / raw)
  To: patchwork-bot+netdevbpf,
	=?utf-8?b?QmrDtnJuIFTDtnBlbCA8Ympvcm5Aa2VybmVsLm9yZz4=?=
  Cc: andrii, eddyz87, mykolal, bpf, netdev, bjorn, linux-kselftest,
	linux-kernel, linux-riscv, charlie, Andreas Schwab, Anand Moon,
	Palmer Dabbelt

patchwork-bot+netdevbpf@kernel.org writes:

> Hello:
>
> This series was applied to bpf/bpf-next.git (master)
> by Andrii Nakryiko <andrii@kernel.org>:
>
> On Fri, 27 Sep 2024 15:13:52 +0200 you wrote:
>> From: Björn Töpel <bjorn@rivosinc.com>
>> 
>> libbpf does not include the per-arch tools include path, e.g.
>> tools/arch/riscv/include. Some architectures depend those files to
>> build properly.
>> 
>> Include tools/arch/$(SUBARCH)/include in the libbpf build.
>> 
>> [...]
>
> Here is the summary with links:
>   - [bpf-next,1/2] libbpf: Add missing per-arch include path
>     https://git.kernel.org/bpf/bpf-next/c/710fbca820c7
>   - [bpf-next,2/2] selftests: bpf: Add missing per-arch include path
>     https://git.kernel.org/bpf/bpf-next/c/19090f0306f1

Andrii, I just noted that this landed into bpf-next, and not bpf
(fixes).

RISC-V libbpf/perf needs this fix in 6.12 to properly build. Would it be
possible to have it in the bpf tree, and have it land in 6.12-rc7?

Andreas that has a similar fix [1].


Björn

[1] https://lore.kernel.org/linux-riscv/mvm5xq44bqh.fsf@suse.de/

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

* Re: [PATCH bpf-next 1/2] libbpf: Add missing per-arch include path
  2024-09-27 13:13 [PATCH bpf-next 1/2] libbpf: Add missing per-arch include path Björn Töpel
                   ` (3 preceding siblings ...)
  2024-11-04 10:04 ` Alexandre Ghiti
@ 2024-11-05 11:46 ` Kexy Biscuit
  4 siblings, 0 replies; 12+ messages in thread
From: Kexy Biscuit @ 2024-11-05 11:46 UTC (permalink / raw)
  To: Björn Töpel, Andrii Nakryiko, Eduard Zingerman,
	Mykola Lysenko, bpf, netdev
  Cc: Björn Töpel, linux-kselftest, linux-kernel, linux-riscv,
	Charlie Jenkins

On 9/27/2024 9:13 PM, Björn Töpel wrote:
> From: Björn Töpel <bjorn@rivosinc.com>
> 
> libbpf does not include the per-arch tools include path, e.g.
> tools/arch/riscv/include. Some architectures depend those files to
> build properly.
> 
> Include tools/arch/$(SUBARCH)/include in the libbpf build.
> 
> Fixes: 6d74d178fe6e ("tools: Add riscv barrier implementation")
> Signed-off-by: Björn Töpel <bjorn@rivosinc.com>
> ---
>   tools/lib/bpf/Makefile | 3 ++-
>   1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/tools/lib/bpf/Makefile b/tools/lib/bpf/Makefile
> index 1b22f0f37288..857a5f7b413d 100644
> --- a/tools/lib/bpf/Makefile
> +++ b/tools/lib/bpf/Makefile
> @@ -61,7 +61,8 @@ ifndef VERBOSE
>   endif
>   
>   INCLUDES = -I$(or $(OUTPUT),.) \
> -	   -I$(srctree)/tools/include -I$(srctree)/tools/include/uapi
> +	   -I$(srctree)/tools/include -I$(srctree)/tools/include/uapi \
> +	   -I$(srctree)/tools/arch/$(SRCARCH)/include
>   
>   export prefix libdir src obj
>   
> 
> base-commit: db5ca265e3334b48c4e3fa07eef79e8bc578c430

This fixes building of bpf tools, thanks! You can add the following tags...

Reported-by: Andreas Schwab <schwab@suse.de>
Closes: https://lore.kernel.org/all/mvmo74441tr.fsf@suse.de/
Tested-by: Kexy Biscuit <kexybiscuit@aosc.io>
-- 
Best Regards,
Kexy Biscuit

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

* Re: [PATCH bpf-next 1/2] libbpf: Add missing per-arch include path
  2024-11-04 10:25   ` Björn Töpel
@ 2024-11-06 22:04     ` Andrii Nakryiko
  2024-11-07 14:32       ` Björn Töpel
  0 siblings, 1 reply; 12+ messages in thread
From: Andrii Nakryiko @ 2024-11-06 22:04 UTC (permalink / raw)
  To: Björn Töpel
  Cc: patchwork-bot+netdevbpf, andrii, eddyz87, mykolal, bpf, netdev,
	bjorn, linux-kselftest, linux-kernel, linux-riscv, charlie,
	Andreas Schwab, Anand Moon, Palmer Dabbelt

On Mon, Nov 4, 2024 at 2:26 AM Björn Töpel <bjorn@kernel.org> wrote:
>
> patchwork-bot+netdevbpf@kernel.org writes:
>
> > Hello:
> >
> > This series was applied to bpf/bpf-next.git (master)
> > by Andrii Nakryiko <andrii@kernel.org>:
> >
> > On Fri, 27 Sep 2024 15:13:52 +0200 you wrote:
> >> From: Björn Töpel <bjorn@rivosinc.com>
> >>
> >> libbpf does not include the per-arch tools include path, e.g.
> >> tools/arch/riscv/include. Some architectures depend those files to
> >> build properly.
> >>
> >> Include tools/arch/$(SUBARCH)/include in the libbpf build.
> >>
> >> [...]
> >
> > Here is the summary with links:
> >   - [bpf-next,1/2] libbpf: Add missing per-arch include path
> >     https://git.kernel.org/bpf/bpf-next/c/710fbca820c7
> >   - [bpf-next,2/2] selftests: bpf: Add missing per-arch include path
> >     https://git.kernel.org/bpf/bpf-next/c/19090f0306f1
>
> Andrii, I just noted that this landed into bpf-next, and not bpf
> (fixes).

Hi Bjorn,

Yes, libbpf and selftests fixes are generally applied through
bpf-next, unless the issue is pretty bad and immediate.

I'm sorry, but unfortunately it's too late now to move those patches
as it's now been more than a month since they landed. For the future,
please let us know ASAP if you think patches were misrouted. I think
we are stuck with the need to do a stable backport for these, sorry.

>
> RISC-V libbpf/perf needs this fix in 6.12 to properly build. Would it be
> possible to have it in the bpf tree, and have it land in 6.12-rc7?
>
> Andreas that has a similar fix [1].
>
>
> Björn
>
> [1] https://lore.kernel.org/linux-riscv/mvm5xq44bqh.fsf@suse.de/

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

* Re: [PATCH bpf-next 1/2] libbpf: Add missing per-arch include path
  2024-11-06 22:04     ` Andrii Nakryiko
@ 2024-11-07 14:32       ` Björn Töpel
  0 siblings, 0 replies; 12+ messages in thread
From: Björn Töpel @ 2024-11-07 14:32 UTC (permalink / raw)
  To: Andrii Nakryiko
  Cc: patchwork-bot+netdevbpf, andrii, eddyz87, mykolal, bpf, netdev,
	bjorn, linux-kselftest, linux-kernel, linux-riscv, charlie,
	Andreas Schwab, Anand Moon, Palmer Dabbelt

On Wed, 6 Nov 2024 at 23:04, Andrii Nakryiko <andrii.nakryiko@gmail.com> wrote:
> I'm sorry, but unfortunately it's too late now to move those patches
> as it's now been more than a month since they landed. For the future,
> please let us know ASAP if you think patches were misrouted. I think
> we are stuck with the need to do a stable backport for these, sorry.

Yeah, realize that it's really late. Thanks for getting back, and
noted for the future.

Cheers,
Björn

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

end of thread, other threads:[~2024-11-07 14:32 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-09-27 13:13 [PATCH bpf-next 1/2] libbpf: Add missing per-arch include path Björn Töpel
2024-09-27 13:13 ` [PATCH bpf-next 2/2] selftests: bpf: " Björn Töpel
2024-09-27 20:52   ` Andrii Nakryiko
2024-09-28  9:14     ` Björn Töpel
2024-09-27 20:50 ` [PATCH bpf-next 1/2] libbpf: " Andrii Nakryiko
2024-09-28  9:11   ` Björn Töpel
2024-10-08  3:30 ` patchwork-bot+netdevbpf
2024-11-04 10:25   ` Björn Töpel
2024-11-06 22:04     ` Andrii Nakryiko
2024-11-07 14:32       ` Björn Töpel
2024-11-04 10:04 ` Alexandre Ghiti
2024-11-05 11:46 ` Kexy Biscuit

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).