<feed xmlns='http://www.w3.org/2005/Atom'>
<title>user/sven/linux.git/tools/bpf/Makefile, branch v5.7.7</title>
<subtitle>Linux Kernel
</subtitle>
<id>https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=v5.7.7</id>
<link rel='self' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=v5.7.7'/>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/'/>
<updated>2020-01-14T01:48:13Z</updated>
<entry>
<title>tools/bpf: Add runqslower tool to tools/bpf</title>
<updated>2020-01-14T01:48:13Z</updated>
<author>
<name>Andrii Nakryiko</name>
<email>andriin@fb.com</email>
</author>
<published>2020-01-13T07:31:42Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=9c01546d26d28cf57341d8380ba900bf68e26b18'/>
<id>urn:sha1:9c01546d26d28cf57341d8380ba900bf68e26b18</id>
<content type='text'>
Convert one of BCC tools (runqslower [0]) to BPF CO-RE + libbpf. It matches
its BCC-based counterpart 1-to-1, supporting all the same parameters and
functionality.

runqslower tool utilizes BPF skeleton, auto-generated from BPF object file,
as well as memory-mapped interface to global (read-only, in this case) data.
Its Makefile also ensures auto-generation of "relocatable" vmlinux.h, which is
necessary for BTF-typed raw tracepoints with direct memory access.

  [0] https://github.com/iovisor/bcc/blob/11bf5d02c895df9646c117c713082eb192825293/tools/runqslower.py

Signed-off-by: Andrii Nakryiko &lt;andriin@fb.com&gt;
Signed-off-by: Alexei Starovoitov &lt;ast@kernel.org&gt;
Link: https://lore.kernel.org/bpf/20200113073143.1779940-6-andriin@fb.com
</content>
</entry>
<entry>
<title>tools, bpf: Fix build for 'make -s tools/bpf O=&lt;dir&gt;'</title>
<updated>2019-11-25T00:58:45Z</updated>
<author>
<name>Quentin Monnet</name>
<email>quentin.monnet@netronome.com</email>
</author>
<published>2019-11-19T10:56:26Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=a89b2cbf71d64b61e79bbe5cb7ff4664797eeaaf'/>
<id>urn:sha1:a89b2cbf71d64b61e79bbe5cb7ff4664797eeaaf</id>
<content type='text'>
Building selftests with 'make TARGETS=bpf kselftest' was fixed in commit
55d554f5d140 ("tools: bpf: Use !building_out_of_srctree to determine
srctree"). However, by updating $(srctree) in tools/bpf/Makefile for
in-tree builds only, we leave out the case where we pass an output
directory to build BPF tools, but $(srctree) is not set. This
typically happens for:

    $ make -s tools/bpf O=/tmp/foo
    Makefile:40: /tools/build/Makefile.feature: No such file or directory

Fix it by updating $(srctree) in the Makefile not only for out-of-tree
builds, but also if $(srctree) is empty.

Detected with test_bpftool_build.sh.

Fixes: 55d554f5d140 ("tools: bpf: Use !building_out_of_srctree to determine srctree")
Signed-off-by: Quentin Monnet &lt;quentin.monnet@netronome.com&gt;
Signed-off-by: Daniel Borkmann &lt;daniel@iogearbox.net&gt;
Acked-by: Jakub Kicinski &lt;jakub.kicinski@netronome.com&gt;
Link: https://lore.kernel.org/bpf/20191119105626.21453-1-quentin.monnet@netronome.com
</content>
</entry>
<entry>
<title>tools: bpf: Use !building_out_of_srctree to determine srctree</title>
<updated>2019-09-30T08:53:34Z</updated>
<author>
<name>Shuah Khan</name>
<email>skhan@linuxfoundation.org</email>
</author>
<published>2019-09-27T01:13:44Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=55d554f5d14071f7c2c5dbd88d0a2eb695c97d16'/>
<id>urn:sha1:55d554f5d14071f7c2c5dbd88d0a2eb695c97d16</id>
<content type='text'>
make TARGETS=bpf kselftest fails with:

Makefile:127: tools/build/Makefile.include: No such file or directory

When the bpf tool make is invoked from tools Makefile, srctree is
cleared and the current logic check for srctree equals to empty
string to determine srctree location from CURDIR.

When the build in invoked from selftests/bpf Makefile, the srctree
is set to "." and the same logic used for srctree equals to empty is
needed to determine srctree.

Check building_out_of_srctree undefined as the condition for both
cases to fix "make TARGETS=bpf kselftest" build failure.

Signed-off-by: Shuah Khan &lt;skhan@linuxfoundation.org&gt;
Signed-off-by: Daniel Borkmann &lt;daniel@iogearbox.net&gt;
Acked-by: Song Liu &lt;songliubraving@fb.com&gt;
Link: https://lore.kernel.org/bpf/20190927011344.4695-1-skhan@linuxfoundation.org
</content>
</entry>
<entry>
<title>tools: bpf: account for generated feature/ and libbpf/ directories</title>
<updated>2019-08-30T22:38:16Z</updated>
<author>
<name>Quentin Monnet</name>
<email>quentin.monnet@netronome.com</email>
</author>
<published>2019-08-30T11:00:39Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=fbdb620b7c674928a5713dbad9b07252ff929d0a'/>
<id>urn:sha1:fbdb620b7c674928a5713dbad9b07252ff929d0a</id>
<content type='text'>
When building "tools/bpf" from the top of the Linux repository, the
build system passes a value for the $(OUTPUT) Makefile variable to
tools/bpf/Makefile and tools/bpf/bpftool/Makefile, which results in
generating "libbpf/" (for bpftool) and "feature/" (bpf and bpftool)
directories inside the tree.

This commit adds such directories to the relevant .gitignore files, and
edits the Makefiles to ensure they are removed on "make clean". The use
of "rm" is also made consistent throughout those Makefiles (relies on
the $(RM) variable, use "--" to prevent interpreting
$(OUTPUT)/$(DESTDIR) as options.

v2:
- New patch.

Signed-off-by: Quentin Monnet &lt;quentin.monnet@netronome.com&gt;
Signed-off-by: Daniel Borkmann &lt;daniel@iogearbox.net&gt;
</content>
</entry>
<entry>
<title>bpf: fix for lex/yacc build error with gcc-5</title>
<updated>2018-04-25T21:27:46Z</updated>
<author>
<name>John Fastabend</name>
<email>john.fastabend@gmail.com</email>
</author>
<published>2018-04-25T21:22:45Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=9c299a32ede98dc9faafb267034ed830a15304db'/>
<id>urn:sha1:9c299a32ede98dc9faafb267034ed830a15304db</id>
<content type='text'>
Fix build error found with Ubuntu shipped gcc-5

~/git/bpf/tools/bpf$ make all

Auto-detecting system features:
...                        libbfd: [ OFF ]
...        disassembler-four-args: [ OFF ]

  CC       bpf_jit_disasm.o
  LINK     bpf_jit_disasm
  CC       bpf_dbg.o
/home/john/git/bpf/tools/bpf/bpf_dbg.c: In function ‘cmd_load’:
/home/john/git/bpf/tools/bpf/bpf_dbg.c:1077:13: warning: ‘cont’ may be used uninitialized in this function [-Wmaybe-uninitialized]
  } else if (matches(subcmd, "pcap") == 0) {
             ^
  LINK     bpf_dbg
  CC       bpf_asm.o
make: *** No rule to make target `bpf_exp.yacc.o', needed by `bpf_asm'.  Stop.

Fixes: 5a8997f20715 ("tools: bpf: respect output directory during build")
Signed-off-by: John Fastabend &lt;john.fastabend@gmail.com&gt;
Signed-off-by: Daniel Borkmann &lt;daniel@iogearbox.net&gt;
</content>
</entry>
<entry>
<title>tools: bpf: remove feature detection output</title>
<updated>2018-03-16T08:23:46Z</updated>
<author>
<name>Jakub Kicinski</name>
<email>jakub.kicinski@netronome.com</email>
</author>
<published>2018-03-16T06:26:17Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=cc5b3403f0248ca5f40539d33f0e127ccca25dd2'/>
<id>urn:sha1:cc5b3403f0248ca5f40539d33f0e127ccca25dd2</id>
<content type='text'>
bpf tools use feature detection for libbfd dependency, clean up
the output files on make clean.

Signed-off-by: Jakub Kicinski &lt;jakub.kicinski@netronome.com&gt;
Signed-off-by: Daniel Borkmann &lt;daniel@iogearbox.net&gt;
</content>
</entry>
<entry>
<title>tools: bpf: cleanup PHONY target</title>
<updated>2018-03-16T08:23:31Z</updated>
<author>
<name>Jakub Kicinski</name>
<email>jakub.kicinski@netronome.com</email>
</author>
<published>2018-03-16T06:26:16Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=8050ea4653c21e14681d9e00390c6886556a2640'/>
<id>urn:sha1:8050ea4653c21e14681d9e00390c6886556a2640</id>
<content type='text'>
There is no FORCE target in the Makefile and some of the PHONY
targets are missing, update the list.

Signed-off-by: Jakub Kicinski &lt;jakub.kicinski@netronome.com&gt;
Signed-off-by: Daniel Borkmann &lt;daniel@iogearbox.net&gt;
</content>
</entry>
<entry>
<title>tools: bpf: silence make by not deleting intermediate file</title>
<updated>2018-03-09T09:22:59Z</updated>
<author>
<name>Jiri Benc</name>
<email>jbenc@redhat.com</email>
</author>
<published>2018-03-08T22:00:41Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=ef8ba83b7cf6c530fbb2c83cf87f9755b8424a84'/>
<id>urn:sha1:ef8ba83b7cf6c530fbb2c83cf87f9755b8424a84</id>
<content type='text'>
Even in quiet mode, make finishes with

rm tools/bpf/bpf_exp.lex.c

That's because it considers the file to be intermediate. Silence that by
mentioning the lex.c file instead of the lex.o file; the dependency still
stays.

Signed-off-by: Jiri Benc &lt;jbenc@redhat.com&gt;
Signed-off-by: Daniel Borkmann &lt;daniel@iogearbox.net&gt;
</content>
</entry>
<entry>
<title>tools: bpf: respect quiet/verbose build</title>
<updated>2018-03-09T09:22:59Z</updated>
<author>
<name>Jiri Benc</name>
<email>jbenc@redhat.com</email>
</author>
<published>2018-03-08T22:00:40Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=a50b7f8c618a7953cd0bef407b390b6db60d0fc3'/>
<id>urn:sha1:a50b7f8c618a7953cd0bef407b390b6db60d0fc3</id>
<content type='text'>
Default to quiet build, with V=1 enabling verbose build as is usual.

Signed-off-by: Jiri Benc &lt;jbenc@redhat.com&gt;
Signed-off-by: Daniel Borkmann &lt;daniel@iogearbox.net&gt;
</content>
</entry>
<entry>
<title>tools: bpf: call descend in Makefile</title>
<updated>2018-03-09T09:22:59Z</updated>
<author>
<name>Jiri Benc</name>
<email>jbenc@redhat.com</email>
</author>
<published>2018-03-08T22:00:39Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=58416c37d0fe1c46aecb293283f2d558526cac19'/>
<id>urn:sha1:58416c37d0fe1c46aecb293283f2d558526cac19</id>
<content type='text'>
Use the descend macro to properly propagate $(subdir) to bpftool.

Signed-off-by: Jiri Benc &lt;jbenc@redhat.com&gt;
Signed-off-by: Daniel Borkmann &lt;daniel@iogearbox.net&gt;
</content>
</entry>
</feed>
