for now, so bpftool-prog.rst and bpftool.rst remain the only
pages updated in that regard.
Previous discussion available at:
https://lore.kernel.org/bpf/20190429095227.9745-1-quentin.mon...@netronome.com/
Quentin Monnet (3):
tools: bpftool: add -d option to get debug output from
d|--debug.
- Add option description to all bpftool manual pages (instead of
bpftool-prog.rst only), as all commands use libbpf.
Signed-off-by: Quentin Monnet
Reviewed-by: Jakub Kicinski
---
tools/bpf/bpftool/Documentation/bpftool-btf.rst| 4
tools/bpf/bpftool/Documentation/bpftool-c
;log_level1", "log_level2" and "stats").
- The macros from kernel header bpf_verifier.h are not used (and
therefore not moved to UAPI header).
- In v1 this was a distinct option, but is now merged in the only "-d"
switch to activate libbpf and verifier debu
, and so that so that applications relying on libbpf but not calling
bpf_prog_load_xattr() can also use that feature.
v2:
- We are in a new cycle, bump libbpf extraversion number.
Signed-off-by: Quentin Monnet
Reviewed-by: Jakub Kicinski
---
tools/lib/bpf/Makefile | 2 +-
tools/lib/bpf
2019-05-23 13:42 UTC-0700 ~ Andrii Nakryiko
> Document optional **c** option for btf dump subcommand.
>
> Cc: Quentin Monnet
> Signed-off-by: Andrii Nakryiko
> ---
> tools/bpf/bpftool/Documentation/bpftool-btf.rst | 7 ++-
> 1 file changed, 6 insertions(+), 1 deletion
Hi Andrii,
Some nits inline, nothing blocking though.
2019-05-23 13:42 UTC-0700 ~ Andrii Nakryiko
> Utilize new libbpf's btf_dump API to emit BTF as a C definitions.
>
> Signed-off-by: Andrii Nakryiko
> ---
> tools/bpf/bpftool/btf.c | 74 +++--
> 1 file cha
2019-05-23 13:42 UTC-0700 ~ Andrii Nakryiko
> Add bash completion for new C btf dump option.
>
> Cc: Quentin Monnet
> Signed-off-by: Andrii Nakryiko
> ---
> tools/bpf/bpftool/bash-completion/bpftool | 25 +++
> 1 file changed, 21 insertions(+), 4 d
2019-05-23 16:29 UTC+ ~ Yonghong Song
>
>
> On 5/23/19 9:19 AM, Yonghong Song wrote:
>>
>>
>> On 5/23/19 3:54 AM, Quentin Monnet wrote:
>>> libbpf was recently made aware of the log_level attribute for programs,
>>> used to specify the leve
2019-05-23 16:38 UTC+ ~ Yonghong Song
>
>
> On 5/23/19 3:54 AM, Quentin Monnet wrote:
>> The "-d" option is used to require all logs available for bpftool. So
>> far it meant telling libbpf to print even debug-level information. But
>> there is another
2019-05-23 13:57 UTC-0700 ~ Andrii Nakryiko
> On Thu, May 23, 2019 at 1:44 PM Jakub Kicinski
> wrote:
>>
>> On Thu, 23 May 2019 09:20:52 -0700, Andrii Nakryiko wrote:
>>> On Thu, May 23, 2019 at 3:54 AM Quentin Monnet wrote:
>>>>
>>>> libbpf has
d|--debug.
- Add option description to all bpftool manual pages (instead of
bpftool-prog.rst only), as all commands use libbpf.
Signed-off-by: Quentin Monnet
Reviewed-by: Jakub Kicinski
---
tools/bpf/bpftool/Documentation/bpftool-btf.rst| 4
tools/bpf/bpftool/Documentation/bpftool-c
he desired log level.
v3:
- Rewrite commit log.
v2:
- We are in a new cycle, bump libbpf extraversion number.
Signed-off-by: Quentin Monnet
Reviewed-by: Jakub Kicinski
---
tools/lib/bpf/Makefile | 2 +-
tools/lib/bpf/libbpf.c | 20 +---
tools/lib/bpf/libbpf.h | 6 ++
7.9745-1-quentin.mon...@netronome.com/
Quentin Monnet (3):
tools: bpftool: add -d option to get debug output from libbpf
libbpf: add bpf_object__load_xattr() API function to pass log_level
tools: bpftool: make -d option print debug output from verifier
.../bpf/bpftool/Documentation/bpftool-btf.rst |
verifier.h are not used (and
therefore not moved to UAPI header).
- In v1 this was a distinct option, but is now merged in the only "-d"
switch to activate libbpf and verifier debug-level logs all at the
same time.
Signed-off-by: Quentin Monnet
Reviewed-by: Jakub Kicinski
---
..
2019-05-24 13:22 UTC+0200 ~ Jesper Dangaard Brouer
> On Fri, 24 May 2019 11:36:47 +0100
> Quentin Monnet wrote:
>
>> libbpf was recently made aware of the log_level attribute for programs,
>> used to specify the level of information expected to be dumped by the
2019-05-24 14:49 UTC+0200 ~ Jesper Dangaard Brouer
> On Fri, 24 May 2019 12:51:14 +0100
> Quentin Monnet wrote:
>
>> 2019-05-24 13:22 UTC+0200 ~ Jesper Dangaard Brouer
>>> On Fri, 24 May 2019 11:36:47 +0100
>>> Quentin Monnet wrote:
>>>
>>&g
2019-05-24 10:14 UTC-0700 ~ Andrii Nakryiko
> On Fri, May 24, 2019 at 2:14 AM Quentin Monnet
> wrote:
>>
>> Hi Andrii,
>>
>> Some nits inline, nothing blocking though.
>>
>> 2019-05-23 13:42 UTC-0700 ~ Andrii Nakryiko
>>> Utilize new l
2019-05-24 11:10 UTC-0700 ~ Andrii Nakryiko
> On Fri, May 24, 2019 at 2:15 AM Quentin Monnet
> wrote:
>>
>> 2019-05-23 13:42 UTC-0700 ~ Andrii Nakryiko
>>> Add bash completion for new C btf dump option.
>>>
>>> Cc: Quentin Monnet
>>>
2019-05-24 10:25 UTC-0700 ~ Andrii Nakryiko
> On Fri, May 24, 2019 at 2:14 AM Quentin Monnet
> wrote:
>>
>> 2019-05-23 13:42 UTC-0700 ~ Andrii Nakryiko
>>> Document optional **c** option for btf dump subcommand.
>>>
>>> Cc: Quentin Monnet
>>&
2019-05-24 11:59 UTC-0700 ~ Andrii Nakryiko
> Document optional **c** option for btf dump subcommand.
>
> Cc: Quentin Monnet
> Signed-off-by: Andrii Nakryiko
Reviewed-by: Quentin Monnet
2019-05-24 11:59 UTC-0700 ~ Andrii Nakryiko
> Add bash completion for new C btf dump option.
>
> Cc: Quentin Monnet
> Signed-off-by: Andrii Nakryiko
Reviewed-by: Quentin Monnet
2019-05-24 11:59 UTC-0700 ~ Andrii Nakryiko
> Utilize new libbpf's btf_dump API to emit BTF as a C definitions.
>
> Acked-by: Jakub Kicinski
> Signed-off-by: Andrii Nakryiko
Reviewed-by: Quentin Monnet
Thanks for the changes!
> Suggested-by: Quentin Monnet
> Signed-off-by: Andrii Nakryiko
> ---
> tools/bpf/bpftool/bash-completion/bpftool | 10 ++
> 1 file changed, 10 insertions(+)
>
> diff --git a/tools/bpf/bpftool/bash-completion/bpftool
> b/tools/bpf/bpftool/bash-completion/bpftool
&g
> Suggested-by: Quentin Monnet
> Signed-off-by: Andrii Nakryiko
Reviewed-by: Quentin Monnet
Thanks!
2019-05-28 17:35 UTC-0700 ~ Alexei Starovoitov
> On Fri, May 24, 2019 at 3:36 AM Quentin Monnet
> wrote:
>>
>> libbpf was recently made aware of the log_level attribute for programs,
>> used to specify the level of information expected to be dumped by t
_level in bpf_object__load_progs(), instead of
overwriting it.
Fixes: 60276f984998 ("libbpf: add bpf_object__load_xattr() API function to pass
log_level")
Reported-by: Alexei Starovoitov
Signed-off-by: Quentin Monnet
---
tools/lib/bpf/libbpf.c | 2 +-
1 file changed, 1 insertion(+), 1 dele
2019-05-29 16:03 UTC+0200 ~ Daniel Borkmann
> On 05/29/2019 11:23 AM, Quentin Monnet wrote:
>> There are two functions in libbpf that support passing a log_level
>> parameter for the verifier for loading programs:
>> bpf_object__load_xattr() and bpf_load_program_xa
OR-ing the log_level in bpf_object__load_progs(), instead of
overwriting it.
v2: Fix commit log description (confusion on function names in v1).
Fixes: 60276f984998 ("libbpf: add bpf_object__load_xattr() API function to pass
log_level")
Reported-by: Alexei Starovoitov
Signed-off-by:
ekable. This also fixes a file handle leak on some error paths.
>
> Fixes: 4567b983f78c ("tools: bpftool: add probes for kernel configuration
> options")
> Cc: Quentin Monnet
> Signed-off-by: Peter Wu
> ---
> tools/bpf/bpftool/feature.c | 92
Hi Peter,
2019-08-06 00:54 UTC+0100 ~ Peter Wu
> Hi all,
>
> Thank you for your quick feedback, I will address them in the next
> revision.
>
> On Mon, Aug 05, 2019 at 11:41:09AM +0100, Quentin Monnet wrote:
>
>> As far as I understood (from examining Cilium [0]), /
ev", thanks! But it seems you missed one
place where it was used, for "bpftool feature probe" (We have "[[ $prev
== "dev" ]] && _sysfs_get_netdevs && return 0"). Could you also remove
that one please?
Other than this looks good, thanks:
Reviewed-by: Quentin Monnet
2019-08-07 11:25 UTC+0900 ~ Daniel T. Lee
> Since, new sub-command 'net attach/detach' has been added for
> attaching XDP program on interface,
> this commit documents usage and sample output of `net attach/detach`.
>
> Signed-off-by: Daniel T. Lee
> ---
> .../bpf/bpftool/Documentation/bpftool-
e operations since the latter transparently handles
> uncompressed and gzip-compressed files.
>
> Cc: Quentin Monnet
> Signed-off-by: Peter Wu
> ---
> v3: replace popen(gunzip) by linking directly to zlib. Reword commit
> message, remove "Fixes" line. (this patch
hen entries are
being added/removed in parallel from the BPF program, and having another
dedicated command accessible from the bpf() system call might help here as
well.
Quentin Monnet (3):
tools: bpftool: clean up dump_map_elem() return value
tools: bpftool: make comment more explicit for
-by: Quentin Monnet
Reviewed-by: Jakub Kicinski
---
tools/bpf/bpftool/map.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/bpf/bpftool/map.c b/tools/bpf/bpftool/map.c
index 206ee46189d9..cead639b3ab1 100644
--- a/tools/bpf/bpftool/map.c
+++ b/tools/bpf/bpftool/map.c
(beyond max_entries), as these types do not support cycling over the
keys.
This commit also adds relevant documentation and bash completion.
Signed-off-by: Quentin Monnet
Reviewed-by: Jakub Kicinski
---
.../bpf/bpftool/Documentation/bpftool-map.rst | 15 +++
tools/bpf/bpftool/bash-completion/bpft
his is more correct,
and more consistent with the rest of the code.
It is unclear if an error value should indeed be returned for maps of
maps or maps of progs, but this has no effect on the output either, so
we just leave the current behaviour unchanged.
Signed-off-by: Quentin Monnet
Reviewed-by:
2020-11-21 17:48 UTC+0800 ~ David Gow
> On Sat, Nov 21, 2020 at 3:38 PM Andrii Nakryiko
> wrote:
>>
>> On Thu, Nov 19, 2020 at 12:51 AM David Gow wrote:
>>>
>>> If BPF_PRELOAD is enabled, and an out-of-tree build is requested with
>>> make O=, compilation seems to fail with:
>>>
>>> tools/script
On 09/11/2020 07:04, Wang Hai wrote:
> progfd is created by prog_parse_fd(), before 'bpftool net attach' exit,
> it should be closed.
>
> Fixes: 04949ccc273e ("tools: bpftool: add net attach command to attach XDP on
> interface")
> Signed-off-by: Wang Hai
ALWAYS_ON", },
> + /* Kernel BTF debug information available */
> + { "CONFIG_DEBUG_INFO_BTF", },
>
> /* cgroups */
> { "CONFIG_CGROUPS", },
>
Thanks for the change!
Reviewed-by: Quentin Monnet
(Note: the dat
2021-02-24 10:59 UTC-0800 ~ Andrii Nakryiko
> On Wed, Feb 24, 2021 at 7:55 AM Daniel Borkmann wrote:
>>
>> On 2/23/21 3:43 PM, Jesper Dangaard Brouer wrote:
>>> On Tue, 23 Feb 2021 20:45:54 +0800
>>> Hangbin Liu wrote:
>>>
Commit 34b2021cc616 ("bpf: Add BPF-helper for MTU checking") lost a
2021-04-15 16:37 UTC+0200 ~ Daniel Borkmann
> On 4/15/21 11:32 AM, Jianlin Lv wrote:
>> For debugging JITs, dumping the JITed image to kernel log is discouraged,
>> "bpftool prog dump jited" is much better way to examine JITed dumps.
>> This patch get rid of the code related to bpf_jit_enable=2 mo
19085022.3606135-1-david...@google.com/t/#u
Cc: Andrii Nakryiko
Cc: Brendan Higgins
Cc: David Gow
Reported-by: David Gow
Signed-off-by: Quentin Monnet
---
kernel/bpf/preload/Makefile | 5 -
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/kernel/bpf/preload/Makefile b/kernel/b
2021-01-25 16:32 UTC-0800 ~ Andrii Nakryiko
> On Mon, Jan 25, 2021 at 7:49 AM Quentin Monnet wrote:
>>
>> Building the kernel with CONFIG_BPF_PRELOAD, and by providing a relative
>> path for the output directory, may fail with the following error:
>>
>
2021-01-26 11:24 UTC+ ~ Quentin Monnet
> 2021-01-25 16:32 UTC-0800 ~ Andrii Nakryiko
>> On Mon, Jan 25, 2021 at 7:49 AM Quentin Monnet wrote:
>>>
>>> Building the kernel with CONFIG_BPF_PRELOAD, and by providing a relative
>>> path for the output director
y that Makefile.
David Gow previously posted a slightly different version of this patch
as a RFC [0], two months ago or so.
[0]
https://lore.kernel.org/bpf/20201119085022.3606135-1-david...@google.com/t/#u
v2: Use $(LIBBPF_OUT) instead of $(abspath .), and improve commit log
Cc: Andrii Nakryiko
Cc:
2021-03-09 20:04 UTC-0800 ~ Andrii Nakryiko
> Add `bpftool gen bpfo ...` command to statically
> link multiple BPF object files into a single output BPF object file.
>
> Similarly to existing '*.o' convention, bpftool is establishing a '*.bpfo'
> convention for statically-linked BPF object files
2021-03-11 10:45 UTC-0800 ~ Andrii Nakryiko
> On Thu, Mar 11, 2021 at 3:31 AM Quentin Monnet wrote:
>>
>> 2021-03-09 20:04 UTC-0800 ~ Andrii Nakryiko
>>> Add `bpftool gen bpfo ...` command to statically
>>> link multiple BPF object files into a single output B
On Sat, 13 Mar 2021 at 18:37, Andrii Nakryiko wrote:
>
> On Fri, Mar 12, 2021 at 10:07 AM Quentin Monnet wrote:
> >
> > 2021-03-11 10:45 UTC-0800 ~ Andrii Nakryiko
> > > On Thu, Mar 11, 2021 at 3:31 AM Quentin Monnet
> > > wrote:
> > >>
&g
- "$cur" ) )
+COMPREPLY=( $( compgen -W 'object skeleton help' --
"$cur" ) )
;;
esac
;;
--
Looks good otherwise. Thanks for the documentation, it's great to
have the example in the man page.
Pending the two nits above are fixed:
Reviewed-by: Quentin Monnet
Quentin
> include/uapi/linux/bpf.h | 12 ++--
> tools/include/uapi/linux/bpf.h | 12 ++--
> 2 files changed, 12 insertions(+), 12 deletions(-)
Correct. Thanks a lot for the fix, Andrey!
Reviewed-by: Quentin Monnet
is fine, but
description and return value appear as empty).
There is no change to text contents in this set.
Quentin Monnet (3):
bpf: fix formatting for bpf_perf_event_read() helper doc
bpf: fix formatting for bpf_get_stack() helper documentation
bpf: update bpf.h uapi header for tools
Bring fixes for eBPF helper documentation formatting to bpf.h under
tools/ as well.
Signed-off-by: Quentin Monnet
---
tools/include/uapi/linux/bpf.h | 62 +-
1 file changed, 31 insertions(+), 31 deletions(-)
diff --git a/tools/include/uapi/linux/bpf.h b
.
Fixes: c6b5fb8690fa ("bpf: add documentation for eBPF helpers (42-50)")
Signed-off-by: Quentin Monnet
---
include/uapi/linux/bpf.h | 8
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/include/uapi/linux/bpf.h b/include/uapi/linux/bpf.h
index 23b334bba1a6..530ff6588
Fix formatting (indent) for bpf_get_stack() helper documentation, so
that the doc is rendered correctly with the Python script.
Fixes: c195651e565a ("bpf: add bpf_get_stack helper")
Cc: Yonghong Song
Signed-off-by: Quentin Monnet
---
Note: The error was a missing space between the &
2018-04-30 09:12 UTC-0600 ~ David Ahern
> On 4/30/18 9:08 AM, Alexei Starovoitov wrote:
>>> diff --git a/include/uapi/linux/bpf.h b/include/uapi/linux/bpf.h
>>> index 530ff6588d8f..8daef7326bb7 100644
>>> --- a/include/uapi/linux/bpf.h
>>> +++ b/include/uapi/linux/bpf.h
>>> @@ -1770,33 +1770,33 @@
on
*.>> Start of description...
*> > Another line of description
*..And yet another line of description
*> Return
*.>0 on success, or a negative error in case of failure
...
*/
Signed-off-by: Quentin Mo
2018-04-30 17:33 UTC+0100 ~ Edward Cree
> On 30/04/18 16:59, Quentin Monnet wrote:
>> The Python script used to parse and extract eBPF helpers documentation
>> from include/uapi/linux/bpf.h expects a very specific formatting for the
>> descriptions (single dots represent a sp
"ns_inode": 4026531993,
"ifname": "foo"
},
"loaded_at": 1524068387,
"uid": 0,
"bytes_xlated": 16,
"jited": false,
"bytes_meml
essary carets from each regex used with match()
in the script. They are redundant, as match() tries to match from the
beginning of the string by default.
v2: Remove unnecessary caret when a regex is used with match().
Signed-off-by: Quentin Monnet
---
scripts/bpf_helpers_doc.py | 14 +++---
2018-05-03 11:28:27 UTC-0700 ~ John Fastabend
> This runs existing SOCKMAP tests with SOCKHASH map type. To do this
> we push programs into include file and build two BPF programs. One
> for SOCKHASH and one for SOCKMAP.
>
> We then run the entire test suite with each type.
>
> Signed-off-by: Jo
2018-04-18 15:34 UTC+0200 ~ Jesper Dangaard Brouer
> On Tue, 17 Apr 2018 15:34:38 +0100
> Quentin Monnet wrote:
>
>> diff --git a/include/uapi/linux/bpf.h b/include/uapi/linux/bpf.h
>> index 350459c583de..3d329538498f 100644
>> --- a/include/uapi/linux/bpf.h
>&g
2018-04-18 17:43 UTC+0200 ~ Jesper Dangaard Brouer
> On Wed, 18 Apr 2018 15:09:41 +0100
> Quentin Monnet wrote:
>
>> 2018-04-18 15:34 UTC+0200 ~ Jesper Dangaard Brouer
>>> On Tue, 17 Apr 2018 15:34:38 +0100
>>> Quentin Monnet wrote:
>>>
>>&g
2018-04-19 13:16 UTC+0200 ~ Daniel Borkmann
> On 04/17/2018 04:34 PM, Quentin Monnet wrote:
>> Add documentation for eBPF helper functions to bpf.h user header file.
>> This documentation can be parsed with the Python script provided in
>> another commit of the patch series,
2018-04-24 10:27 UTC+0800 ~ shhuiw
>
>
> On 04/23/18 18:05, Daniel Borkmann wrote:
>> On 04/22/2018 09:51 AM, Wang Sheng-Hui wrote:
>>> Sorry to trouble you !
>>>
>>> I run debian and installed binutils-dev beforehand.
>>> Then I copied tools/build/feature/test-libbfd.c to t.c and run:
>>> -
mment on top of the description list to explain how this
documentation is supposed to be processed.
- Update Python script accordingly (remove the same sections, and remove
paragraphs on program types and GPL restrictions from man page
header).
- Split series into several patches.
Cc: linux-...@vge
page header text.
- Move and fix comment on helpers introducing no overhead.
- Remove "NOTES" section from man page footer.
- Add "LICENSE" section to man page footer.
- Edit description of file include/uapi/linux/bpf.h in man page footer.
Signed-off-by: Quentin Monn
g a task in net_cls controller disables cgroup-bpf.
- bpf_get_route_realm(): State that CONFIG_CGROUP_NET_CLASSID is
required to use this helper.
- bpf_skb_load_bytes(): Fix comment on current use cases for the helper.
Cc: Daniel Borkmann
Signed-off-by: Quentin Monnet
Acked-by: Alexei Starovoitov
sper Dangaard Brouer
Cc: John Fastabend
Signed-off-by: Quentin Monnet
---
include/uapi/linux/bpf.h | 147 +++
1 file changed, 147 insertions(+)
diff --git a/include/uapi/linux/bpf.h b/include/uapi/linux/bpf.h
index 9fe008dd51e7..335ac427d43b 100644
---
versions).
Cc: Nikita V. Shirokov
Cc: Eyal Birger
Signed-off-by: Quentin Monnet
---
include/uapi/linux/bpf.h | 30 ++
1 file changed, 30 insertions(+)
diff --git a/include/uapi/linux/bpf.h b/include/uapi/linux/bpf.h
index 335ac427d43b..3b91e22f68c1 100644
--- a
Martin KaFai Lau
Cc: Sargun Dhillon
Cc: Thomas Graf
Cc: Gianluca Borello
Cc: Chenbo Feng
Signed-off-by: Quentin Monnet
Acked-by: Alexei Starovoitov
Acked-by: Martin KaFai Lau
[for bpf_skb_under_cgroup(), bpf_xdp_adjust_head()]
---
include/uapi/linux/bpf.h | 172 ++
e that the helper is not restricted to
programs attached to sockets.
- bpf_skb_adjust_room(): Clarify comment about invalidated verifier
checks.
- bpf_xdp_adjust_meta(): Clarify comment about invalidated verifier
checks.
Cc: Daniel Borkmann
Signed-off-by: Quentin Monnet
Acked-by
Update tools/include/uapi/linux/bpf.h file in order to reflect the
changes for BPF helper functions documentation introduced in previous
commits.
Signed-off-by: Quentin Monnet
---
tools/include/uapi/linux/bpf.h | 1776 +++-
1 file changed, 1380 insertions
description. Remove occurences of "cores" to avoid confusion with
"CPU".
- bpf_bind(): Remove last paragraph of description, which was off topic.
Cc: Lawrence Brakmo
Cc: Yonghong Song
Cc: Josef Bacik
Cc: Andrey Ignatov
Signed-off-by: Quentin Monnet
Acked-by:
e description of BPF_F_INGRESS flag.
Cc: Alexei Starovoitov
Signed-off-by: Quentin Monnet
Acked-by: Alexei Starovoitov
---
include/uapi/linux/bpf.h | 230 +++
1 file changed, 230 insertions(+)
diff --git a/include/uapi/linux/bpf.h b/include/uapi/
t_stackid(): Add a note about PERF_MAX_STACK_DEPTH being
configurable.
Cc: Alexei Starovoitov
Signed-off-by: Quentin Monnet
Acked-by: Alexei Starovoitov
---
include/uapi/linux/bpf.h | 254 +++
1 file changed, 254 insertions(+)
diff --git a/include
2018-03-21 16:02 UTC+0100 ~ Jiri Olsa
> Change bpftool to skip the removed struct bpf_verifier_env
> argument in print_bpf_insn. It was passed as NULL anyway.
>
> No functional change intended.
>
> Signed-off-by: Jiri Olsa
> ---
> tools/bpf/bpftool/prog.c | 8
> 1 file changed, 4 inse
2018-03-21 16:02 UTC+0100 ~ Jiri Olsa
> We use print_bpf_insn in user space (bpftool and soon perf),
> so it'd be nice to keep it generic and strip it off the kernel
> struct bpf_verifier_env argument.
>
> This argument can be safely removed, because its users can
> use the struct bpf_insn_cbs::p
> jirka
>
>
> ---
> Change bpftool to skip the removed struct bpf_verifier_env
> argument in print_bpf_insn. It was passed as NULL anyway.
>
> No functional change intended.
>
> Signed-off-by: Jiri Olsa
> ---
> tools/bpf/bpftool/xlated_dumper.c | 12 ++--
> 1 file changed, 6 insertions(+), 6 deletions(-)
>
Thank you!
Reviewed-by: Quentin Monnet
2018-03-22 14:32 UTC+0100 ~ Jiri Olsa
> On Thu, Mar 22, 2018 at 10:34:18AM +0100, Daniel Borkmann wrote:
>> On 03/21/2018 07:37 PM, Jiri Olsa wrote:
>>> On Wed, Mar 21, 2018 at 05:25:33PM +0000, Quentin Monnet wrote:
>>>> 2018-03-21 16:02 UTC+0100 ~ Jiri Olsa
>&
ubmitting new versions of your patch sets :)
For the series:
Reviewed-by: Quentin Monnet
260ns
When one of data_in or ctx_in is "-", bpftool reads from standard input,
in binary format. Other formats (JSON, hexdump) might be supported (via
an optional command line keyword like "data_fmt_in") in the future if
relevant, but this would require doing more parsing in
at, which is not always
> true at least for powerpc. Fixing this by dumping the whole string
> into buffer based on its format.
>
> Please note that libopcodes code does not check return values from
> fprintf callback, so there's no point to return error in case of
> allocation failure.
>
> Reported-by: Michael Petlan
> Signed-off-by: Jiri Olsa
Looks good to me, thank you for the fix!
Reviewed-by: Quentin Monnet
2019-07-04 22:49 UTC-0700 ~ Y Song
> On Thu, Jul 4, 2019 at 1:58 AM Quentin Monnet
> wrote:
>>
>> Add a new "bpftool prog run" subcommand to run a loaded program on input
>> data (and possibly with input context) passed by the user.
>>
>> Print outpu
2019-07-05 08:42 UTC-0700 ~ Y Song
> On Fri, Jul 5, 2019 at 1:21 AM Quentin Monnet
> wrote:
>>
>> 2019-07-04 22:49 UTC-0700 ~ Y Song
>>> On Thu, Jul 4, 2019 at 1:58 AM Quentin Monnet
>>> wrote:
>>>>
>>>> Add a new "bpftool pro
lease note that libopcodes code does not check return values from
>> fprintf callback, but as per Jakub suggestion returning -1 on allocation
>> failure so we do the best effort to propagate the error.
>>
>> Reported-by: Michael Petlan
>> Signed-off-by: Jiri Olsa
>
> Thanks, let me repost all the tags (Quentin, please shout if you're
> not ok with this :)):
I confirm it's all good for me, thanks :)
>
> Fixes: 107f041212c1 ("tools: bpftool: add JSON output for `bpftool prog dump
> jited *` command")
> Reviewed-by: Quentin Monnet
> Reviewed-by: Jakub Kicinski
>
2019-07-05 10:08 UTC-0700 ~ Y Song
> On Fri, Jul 5, 2019 at 9:03 AM Quentin Monnet
> wrote:
>>
>> 2019-07-05 08:42 UTC-0700 ~ Y Song
>>> On Fri, Jul 5, 2019 at 1:21 AM Quentin Monnet
>>> wrote:
>>>>
>>>> 2019-07-04 22:49 UTC-0700 ~
e parsing in bpftool.
v2:
- Fix argument names for function check_single_stdin(). (Yonghong)
Signed-off-by: Quentin Monnet
Reviewed-by: Jakub Kicinski
---
.../bpftool/Documentation/bpftool-prog.rst| 34 ++
tools/bpf/bpftool/bash-completion/bpftool | 28 +-
tools/bpf/bpftool/ma
2019-07-06 10:47 UTC+0200 ~ Toke Høiland-Jørgensen
> From: Toke Høiland-Jørgensen
>
> This adds a selftest, syncs the tools/ uapi header and adds the
> devmap_hash name to bpftool for the new devmap_hash map type.
>
> Signed-off-by: Toke Høiland-Jørgensen
> ---
> tools/bpf/bpftool/map.c
considers that $command is in load|loadall and
starts making related completions (file or directory names, as the
number of words on the command line is below 6), when the only suggested
keywords should be "load" and "loadall" until one has been picked and a
space entered after
2019-08-13 18:51 UTC-0700 ~ Alexei Starovoitov
> On Tue, Aug 13, 2019 at 02:09:18PM +0100, Quentin Monnet wrote:
>> This series adds a "bpftool map count" subcommand to count the number of
>> entries present in a BPF map. This results from a customer request for a
>&
warnings we manually add to CFLAGS, as it is
handled in $(EXTRA_WARNINGS).
Signed-off-by: Quentin Monnet
Reviewed-by: Jakub Kicinski
---
tools/bpf/bpftool/Makefile | 3 ++-
tools/bpf/bpftool/cgroup.c | 2 +-
tools/bpf/bpftool/perf.c | 4
3 files changed, 7 insertions(+), 2 deletions
2019-08-14 17:45 UTC+0100 ~ Edward Cree
> On 14/08/2019 10:42, Quentin Monnet wrote:
>> 2019-08-13 18:51 UTC-0700 ~ Alexei Starovoitov
>>
>>> The same can be achieved by 'bpftool map dump|grep key|wc -l', no?
>> To some extent (with subtleties for some o
2019-08-14 09:58 UTC-0700 ~ Alexei Starovoitov
> On Wed, Aug 14, 2019 at 9:45 AM Edward Cree wrote:
>>
>> On 14/08/2019 10:42, Quentin Monnet wrote:
>>> 2019-08-13 18:51 UTC-0700 ~ Alexei Starovoitov
>>>
>>>> The same can be achieved by 'bpftoo
2019-08-14 13:18 UTC-0700 ~ Andrii Nakryiko
> On Wed, Aug 14, 2019 at 10:12 AM Quentin Monnet
> wrote:
>>
>> 2019-08-14 09:58 UTC-0700 ~ Alexei Starovoitov
>>
>>> On Wed, Aug 14, 2019 at 9:45 AM Edward Cree wrote:
>>>>
>>>> On 14/08/201
2019-08-14 18:14 UTC+0100 ~ Edward Cree
> On 14/08/2019 17:58, Quentin Monnet wrote:
>> 2019-08-14 17:45 UTC+0100 ~ Edward Cree
>>> This might be a really dumb suggestion, but: you're wanting to collect a
>>> summary statistic over an in-kernel data structure i
When showing metadata about a single program by invoking
"bpftool prog show PROG", the file descriptor referring to the program
is not closed before returning from the function. Let's close it.
Fixes: 71bb428fe2c1 ("tools: bpf: add bpftool")
Signed-off-by: Quentin M
then moves the "__printf()" attributes
to header files, so that the checks are performed at all locations.
Quentin Monnet (6):
tools: bpftool: fix arguments for p_err() in do_event_pipe()
tools: bpftool: fix format strings and arguments for jsonw_printf()
tools: bpftool: fix argumen
dump BTF types")
Signed-off-by: Quentin Monnet
Reviewed-by: Jakub Kicinski
---
tools/bpf/bpftool/btf.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/bpf/bpftool/btf.c b/tools/bpf/bpftool/btf.c
index 1b8ec91899e6..8805637f1a7e 100644
--- a/tools/bpf/bpftool/btf.c
+++
CC_VERSION from headers pulled via libbfd.
Fixes: c101189bc968 ("tools: bpftool: fix -Wmissing declaration warnings")
Reported-by: Jakub Kicinski
Signed-off-by: Quentin Monnet
Reviewed-by: Jakub Kicinski
---
tools/bpf/bpftool/common.c | 4 ++--
tools/bpf/bpftool/json_writer.c| 6
1 - 100 of 573 matches
Mail list logo