netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH bpf-next 0/2] tools: bpf: build cleanups
@ 2018-07-16 17:57 Jakub Kicinski
  2018-07-16 17:57 ` [PATCH bpf-next 1/2] tools: libbpf: remove libelf-getphdrnum feature detection Jakub Kicinski
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Jakub Kicinski @ 2018-07-16 17:57 UTC (permalink / raw)
  To: alexei.starovoitov, daniel; +Cc: oss-drivers, netdev, Jakub Kicinski

Hi!

While tracking down the perf vs libbpf vs reallocarray build issue
I noticed libbpf is checking for a feature it never uses and that
bpftool's makefile attempt to reuse feature dump doesn't really
make sense.

Jakub Kicinski (2):
  tools: libbpf: remove libelf-getphdrnum feature detection
  tools: bpftool: don't pass FEATURES_DUMP to libbpf

 tools/bpf/bpftool/Makefile | 2 +-
 tools/lib/bpf/Makefile     | 6 +-----
 2 files changed, 2 insertions(+), 6 deletions(-)

-- 
2.17.1

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

* [PATCH bpf-next 1/2] tools: libbpf: remove libelf-getphdrnum feature detection
  2018-07-16 17:57 [PATCH bpf-next 0/2] tools: bpf: build cleanups Jakub Kicinski
@ 2018-07-16 17:57 ` Jakub Kicinski
  2018-07-16 17:57 ` [PATCH bpf-next 2/2] tools: bpftool: don't pass FEATURES_DUMP to libbpf Jakub Kicinski
  2018-07-16 22:34 ` [PATCH bpf-next 0/2] tools: bpf: build cleanups Daniel Borkmann
  2 siblings, 0 replies; 5+ messages in thread
From: Jakub Kicinski @ 2018-07-16 17:57 UTC (permalink / raw)
  To: alexei.starovoitov, daniel; +Cc: oss-drivers, netdev, Jakub Kicinski

libbpf does not depend on libelf-getphdrnum feature, don't check it.

$ git grep HAVE_ELF_GETPHDRNUM_SUPPORT
tools/perf/Makefile.config:    CFLAGS += -DHAVE_ELF_GETPHDRNUM_SUPPORT
tools/perf/util/symbol-elf.c:#ifndef HAVE_ELF_GETPHDRNUM_SUPPORT

Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com>
Reviewed-by: Quentin Monnet <quentin.monnet@netronome.com>
---
 tools/lib/bpf/Makefile | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/tools/lib/bpf/Makefile b/tools/lib/bpf/Makefile
index 7a8e4c98ef1a..d49902e818b5 100644
--- a/tools/lib/bpf/Makefile
+++ b/tools/lib/bpf/Makefile
@@ -66,7 +66,7 @@ ifndef VERBOSE
 endif
 
 FEATURE_USER = .libbpf
-FEATURE_TESTS = libelf libelf-getphdrnum libelf-mmap bpf reallocarray
+FEATURE_TESTS = libelf libelf-mmap bpf reallocarray
 FEATURE_DISPLAY = libelf bpf
 
 INCLUDES = -I. -I$(srctree)/tools/include -I$(srctree)/tools/arch/$(ARCH)/include/uapi -I$(srctree)/tools/include/uapi -I$(srctree)/tools/perf
@@ -116,10 +116,6 @@ ifeq ($(feature-libelf-mmap), 1)
   override CFLAGS += -DHAVE_LIBELF_MMAP_SUPPORT
 endif
 
-ifeq ($(feature-libelf-getphdrnum), 1)
-  override CFLAGS += -DHAVE_ELF_GETPHDRNUM_SUPPORT
-endif
-
 ifeq ($(feature-reallocarray), 0)
   override CFLAGS += -DCOMPAT_NEED_REALLOCARRAY
 endif
-- 
2.17.1

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

* [PATCH bpf-next 2/2] tools: bpftool: don't pass FEATURES_DUMP to libbpf
  2018-07-16 17:57 [PATCH bpf-next 0/2] tools: bpf: build cleanups Jakub Kicinski
  2018-07-16 17:57 ` [PATCH bpf-next 1/2] tools: libbpf: remove libelf-getphdrnum feature detection Jakub Kicinski
@ 2018-07-16 17:57 ` Jakub Kicinski
  2018-07-16 22:34 ` [PATCH bpf-next 0/2] tools: bpf: build cleanups Daniel Borkmann
  2 siblings, 0 replies; 5+ messages in thread
From: Jakub Kicinski @ 2018-07-16 17:57 UTC (permalink / raw)
  To: alexei.starovoitov, daniel; +Cc: oss-drivers, netdev, Jakub Kicinski

bpftool does not export features it probed for, i.e.
FEATURE_DUMP_EXPORT is always empty, so don't try to communicate
the features to libbpf.  It has no effect.

Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com>
Reviewed-by: Quentin Monnet <quentin.monnet@netronome.com>
---
 tools/bpf/bpftool/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/bpf/bpftool/Makefile b/tools/bpf/bpftool/Makefile
index 6c4830e18879..74288a2197ab 100644
--- a/tools/bpf/bpftool/Makefile
+++ b/tools/bpf/bpftool/Makefile
@@ -26,7 +26,7 @@ LIBBPF = $(BPF_PATH)libbpf.a
 BPFTOOL_VERSION := $(shell make --no-print-directory -sC ../../.. kernelversion)
 
 $(LIBBPF): FORCE
-	$(Q)$(MAKE) -C $(BPF_DIR) OUTPUT=$(OUTPUT) $(OUTPUT)libbpf.a FEATURES_DUMP=$(FEATURE_DUMP_EXPORT)
+	$(Q)$(MAKE) -C $(BPF_DIR) OUTPUT=$(OUTPUT) $(OUTPUT)libbpf.a
 
 $(LIBBPF)-clean:
 	$(call QUIET_CLEAN, libbpf)
-- 
2.17.1

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

* Re: [PATCH bpf-next 0/2] tools: bpf: build cleanups
  2018-07-16 17:57 [PATCH bpf-next 0/2] tools: bpf: build cleanups Jakub Kicinski
  2018-07-16 17:57 ` [PATCH bpf-next 1/2] tools: libbpf: remove libelf-getphdrnum feature detection Jakub Kicinski
  2018-07-16 17:57 ` [PATCH bpf-next 2/2] tools: bpftool: don't pass FEATURES_DUMP to libbpf Jakub Kicinski
@ 2018-07-16 22:34 ` Daniel Borkmann
  2018-07-16 23:39   ` Alexei Starovoitov
  2 siblings, 1 reply; 5+ messages in thread
From: Daniel Borkmann @ 2018-07-16 22:34 UTC (permalink / raw)
  To: Jakub Kicinski, alexei.starovoitov; +Cc: oss-drivers, netdev

On 07/16/2018 07:57 PM, Jakub Kicinski wrote:
> Hi!
> 
> While tracking down the perf vs libbpf vs reallocarray build issue
> I noticed libbpf is checking for a feature it never uses and that
> bpftool's makefile attempt to reuse feature dump doesn't really
> make sense.
> 
> Jakub Kicinski (2):
>   tools: libbpf: remove libelf-getphdrnum feature detection
>   tools: bpftool: don't pass FEATURES_DUMP to libbpf
> 
>  tools/bpf/bpftool/Makefile | 2 +-
>  tools/lib/bpf/Makefile     | 6 +-----
>  2 files changed, 2 insertions(+), 6 deletions(-)
> 

Acked-by: Daniel Borkmann <daniel@iogearbox.net>

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

* Re: [PATCH bpf-next 0/2] tools: bpf: build cleanups
  2018-07-16 22:34 ` [PATCH bpf-next 0/2] tools: bpf: build cleanups Daniel Borkmann
@ 2018-07-16 23:39   ` Alexei Starovoitov
  0 siblings, 0 replies; 5+ messages in thread
From: Alexei Starovoitov @ 2018-07-16 23:39 UTC (permalink / raw)
  To: Daniel Borkmann; +Cc: Jakub Kicinski, oss-drivers, netdev

On Tue, Jul 17, 2018 at 12:34:03AM +0200, Daniel Borkmann wrote:
> On 07/16/2018 07:57 PM, Jakub Kicinski wrote:
> > Hi!
> > 
> > While tracking down the perf vs libbpf vs reallocarray build issue
> > I noticed libbpf is checking for a feature it never uses and that
> > bpftool's makefile attempt to reuse feature dump doesn't really
> > make sense.
> > 
> > Jakub Kicinski (2):
> >   tools: libbpf: remove libelf-getphdrnum feature detection
> >   tools: bpftool: don't pass FEATURES_DUMP to libbpf
> > 
> >  tools/bpf/bpftool/Makefile | 2 +-
> >  tools/lib/bpf/Makefile     | 6 +-----
> >  2 files changed, 2 insertions(+), 6 deletions(-)
> > 
> 
> Acked-by: Daniel Borkmann <daniel@iogearbox.net>

somehow cover letter didn't make it into patchworks,
so I applied both patches manually to bpf-next and propagated Daniel's Ack.
Thanks!

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

end of thread, other threads:[~2018-07-17  0:09 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-07-16 17:57 [PATCH bpf-next 0/2] tools: bpf: build cleanups Jakub Kicinski
2018-07-16 17:57 ` [PATCH bpf-next 1/2] tools: libbpf: remove libelf-getphdrnum feature detection Jakub Kicinski
2018-07-16 17:57 ` [PATCH bpf-next 2/2] tools: bpftool: don't pass FEATURES_DUMP to libbpf Jakub Kicinski
2018-07-16 22:34 ` [PATCH bpf-next 0/2] tools: bpf: build cleanups Daniel Borkmann
2018-07-16 23:39   ` Alexei Starovoitov

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