lkml.org 
[lkml]   [2019]   [Mar]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH bpf-next v1 5/7] tools: bpftool: support loading map by fd from parent process
From
Date
2019-03-20 18:33 UTC+0100 ~ Alban Crequy <alban.crequy@gmail.com>
> From: Alban Crequy <alban@kinvolk.io>
>
> Using a file descriptor passed by the parent process enables
> applications to fork a bpftool command to inspect a map they know by
> file descriptor even when they don't support bpffs or map ids.
>
> Documentation and bash completion updated as well.
>
> Signed-off-by: Alban Crequy <alban@kinvolk.io>
> ---
> tools/bpf/bpftool/Documentation/bpftool-map.rst | 8 ++++++++
> tools/bpf/bpftool/bash-completion/bpftool | 10 +++++-----
> tools/bpf/bpftool/map.c | 13 +++++++++++++
> 3 files changed, 26 insertions(+), 5 deletions(-)
>
> diff --git a/tools/bpf/bpftool/Documentation/bpftool-map.rst b/tools/bpf/bpftool/Documentation/bpftool-map.rst
> index dfd8352fa453..658fe2fb8ecf 100644
> --- a/tools/bpf/bpftool/Documentation/bpftool-map.rst
> +++ b/tools/bpf/bpftool/Documentation/bpftool-map.rst
> @@ -265,6 +265,14 @@ would be lost as soon as bpftool exits).
>
> anon_inode:bpf-map
>
> +**# bpftool map exec pinned /sys/fs/bpf/foo fd 99 cmd -- bpftool map show fd 99**
> +
> +::
> +
> + 10: hash name some_map flags 0x0
> + key 4B value 8B max_entries 2048 memlock 167936B
> +
> +

Could you please also update the description of the command higher in
that page, and in the interactive help?

\
 
 \ /
  Last update: 2019-03-20 20:05    [W:1.940 / U:0.004 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site