<feed xmlns='http://www.w3.org/2005/Atom'>
<title>user/sven/linux.git/tools/bpf/bpftool/bash-completion, branch v5.15.2</title>
<subtitle>Linux Kernel
</subtitle>
<id>https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=v5.15.2</id>
<link rel='self' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=v5.15.2'/>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/'/>
<updated>2021-07-30T22:40:28Z</updated>
<entry>
<title>tools: bpftool: Complete metrics list in "bpftool prog profile" doc</title>
<updated>2021-07-30T22:40:28Z</updated>
<author>
<name>Quentin Monnet</name>
<email>quentin@isovalent.com</email>
</author>
<published>2021-07-30T21:54:35Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=475a23c2c15fb2af76a27f89f632a48c03166f45'/>
<id>urn:sha1:475a23c2c15fb2af76a27f89f632a48c03166f45</id>
<content type='text'>
Profiling programs with bpftool was extended some time ago to support
two new metrics, namely itlb_misses and dtlb_misses (misses for the
instruction/data translation lookaside buffer). Update the manual page
and bash completion accordingly.

Fixes: 450d060e8f75 ("bpftool: Add {i,d}tlb_misses support for bpftool profile")
Signed-off-by: Quentin Monnet &lt;quentin@isovalent.com&gt;
Signed-off-by: Andrii Nakryiko &lt;andrii@kernel.org&gt;
Link: https://lore.kernel.org/bpf/20210730215435.7095-8-quentin@isovalent.com
</content>
</entry>
<entry>
<title>tools: bpftool: Document and add bash completion for -L, -B options</title>
<updated>2021-07-30T22:40:28Z</updated>
<author>
<name>Quentin Monnet</name>
<email>quentin@isovalent.com</email>
</author>
<published>2021-07-30T21:54:34Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=8cc8c6357c8fa763c650f1bddb69871a254f427c'/>
<id>urn:sha1:8cc8c6357c8fa763c650f1bddb69871a254f427c</id>
<content type='text'>
The -L|--use-loader option for using loader programs when loading, or
when generating a skeleton, did not have any documentation or bash
completion. Same thing goes for -B|--base-btf, used to pass a path to a
base BTF object for split BTF such as BTF for kernel modules.

This patch documents and adds bash completion for those options.

Fixes: 75fa1777694c ("tools/bpftool: Add bpftool support for split BTF")
Fixes: d510296d331a ("bpftool: Use syscall/loader program in "prog load" and "gen skeleton" command.")
Signed-off-by: Quentin Monnet &lt;quentin@isovalent.com&gt;
Signed-off-by: Andrii Nakryiko &lt;andrii@kernel.org&gt;
Link: https://lore.kernel.org/bpf/20210730215435.7095-7-quentin@isovalent.com
</content>
</entry>
<entry>
<title>tools: bpftool: Complete and synchronise attach or map types</title>
<updated>2021-07-30T22:40:27Z</updated>
<author>
<name>Quentin Monnet</name>
<email>quentin@isovalent.com</email>
</author>
<published>2021-07-30T21:54:31Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=b544342e52fc3dfcc1d430fff8d1a7a3be920ffd'/>
<id>urn:sha1:b544342e52fc3dfcc1d430fff8d1a7a3be920ffd</id>
<content type='text'>
Update bpftool's list of attach type names to tell it about the latest
attach types, or the "ringbuf" map. Also update the documentation, help
messages, and bash completion when relevant.

These missing items were reported by the newly added Python script used
to help maintain consistency in bpftool.

Signed-off-by: Quentin Monnet &lt;quentin@isovalent.com&gt;
Signed-off-by: Andrii Nakryiko &lt;andrii@kernel.org&gt;
Link: https://lore.kernel.org/bpf/20210730215435.7095-4-quentin@isovalent.com
</content>
</entry>
<entry>
<title>tools: bpftool: Slightly ease bash completion updates</title>
<updated>2021-07-30T22:40:27Z</updated>
<author>
<name>Quentin Monnet</name>
<email>quentin@isovalent.com</email>
</author>
<published>2021-07-30T21:54:29Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=510b4d4c5d4cbfdeaf35e4bc6483e8afa16b0e9e'/>
<id>urn:sha1:510b4d4c5d4cbfdeaf35e4bc6483e8afa16b0e9e</id>
<content type='text'>
Bash completion for bpftool gets two minor improvements in this patch.

Move the detection of attach types for "bpftool cgroup attach" outside
of the "case/esac" bloc, where we cannot reuse our variable holding the
list of supported attach types as a pattern list. After the change, we
have only one list of cgroup attach types to update when new types are
added, instead of the former two lists.

Also rename the variables holding lists of names for program types, map
types, and attach types, to make them more unique. This can make it
slightly easier to point people to the relevant variables to update, but
the main objective here is to help run a script to check that bash
completion is up-to-date with bpftool's source code.

Signed-off-by: Quentin Monnet &lt;quentin@isovalent.com&gt;
Signed-off-by: Andrii Nakryiko &lt;andrii@kernel.org&gt;
Link: https://lore.kernel.org/bpf/20210730215435.7095-2-quentin@isovalent.com
</content>
</entry>
<entry>
<title>bpftool: Add sock_release help info for cgroup attach/prog load command</title>
<updated>2021-05-25T14:18:32Z</updated>
<author>
<name>Liu Jian</name>
<email>liujian56@huawei.com</email>
</author>
<published>2021-05-25T01:41:39Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=a8deba8547e39f26440101164a3bbc2899c5b305'/>
<id>urn:sha1:a8deba8547e39f26440101164a3bbc2899c5b305</id>
<content type='text'>
The help information was not added at the time when the function got added.
Fix this and add the missing information to its cli, documentation and bash
completion.

Fixes: db94cc0b4805 ("bpftool: Add support for BPF_CGROUP_INET_SOCK_RELEASE")
Signed-off-by: Liu Jian &lt;liujian56@huawei.com&gt;
Signed-off-by: Daniel Borkmann &lt;daniel@iogearbox.net&gt;
Reviewed-by: Quentin Monnet &lt;quentin@isovalent.com&gt;
Link: https://lore.kernel.org/bpf/20210525014139.323859-1-liujian56@huawei.com
</content>
</entry>
<entry>
<title>bpftool: Add `gen object` command to perform BPF static linking</title>
<updated>2021-03-18T23:14:23Z</updated>
<author>
<name>Andrii Nakryiko</name>
<email>andrii@kernel.org</email>
</author>
<published>2021-03-18T19:40:33Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=d80b2fcbe0a023619e0fc73112f2a02c2662f6ab'/>
<id>urn:sha1:d80b2fcbe0a023619e0fc73112f2a02c2662f6ab</id>
<content type='text'>
Add `bpftool gen object &lt;output-file&gt; &lt;input_file&gt;...` command to statically
link multiple BPF ELF object files into a single output BPF ELF object file.

This patch also updates bash completions and man page. Man page gets a short
section on `gen object` command, but also updates the skeleton example to show
off workflow for BPF application with two .bpf.c files, compiled individually
with Clang, then resulting object files are linked together with `gen object`,
and then final object file is used to generate usable BPF skeleton. This
should help new users understand realistic workflow w.r.t. compiling
mutli-file BPF application.

Signed-off-by: Andrii Nakryiko &lt;andrii@kernel.org&gt;
Signed-off-by: Alexei Starovoitov &lt;ast@kernel.org&gt;
Reviewed-by: Quentin Monnet &lt;quentin@isovalent.com&gt;
Link: https://lore.kernel.org/bpf/20210318194036.3521577-10-andrii@kernel.org
</content>
</entry>
<entry>
<title>bpftool: Add ability to specify custom skeleton object name</title>
<updated>2021-03-18T23:14:23Z</updated>
<author>
<name>Andrii Nakryiko</name>
<email>andrii@kernel.org</email>
</author>
<published>2021-03-18T19:40:32Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=c41226654550b0a8aa75e91ce0a1cdb6ce2316ee'/>
<id>urn:sha1:c41226654550b0a8aa75e91ce0a1cdb6ce2316ee</id>
<content type='text'>
Add optional name OBJECT_NAME parameter to `gen skeleton` command to override
default object name, normally derived from input file name. This allows much
more flexibility during build time.

Signed-off-by: Andrii Nakryiko &lt;andrii@kernel.org&gt;
Signed-off-by: Alexei Starovoitov &lt;ast@kernel.org&gt;
Link: https://lore.kernel.org/bpf/20210318194036.3521577-9-andrii@kernel.org
</content>
</entry>
<entry>
<title>bpftool: Add support for task local storage</title>
<updated>2020-11-06T16:08:37Z</updated>
<author>
<name>KP Singh</name>
<email>kpsingh@google.com</email>
</author>
<published>2020-11-06T10:37:42Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=864ab0616dccf14e51618a24acc7cf23ddd2b98a'/>
<id>urn:sha1:864ab0616dccf14e51618a24acc7cf23ddd2b98a</id>
<content type='text'>
Updates the binary to handle the BPF_MAP_TYPE_TASK_STORAGE as
"task_storage" for printing and parsing. Also updates the documentation
and bash completion

Signed-off-by: KP Singh &lt;kpsingh@google.com&gt;
Signed-off-by: Alexei Starovoitov &lt;ast@kernel.org&gt;
Acked-by: Song Liu &lt;songliubraving@fb.com&gt;
Acked-by: Martin KaFai Lau &lt;kafai@fb.com&gt;
Link: https://lore.kernel.org/bpf/20201106103747.2780972-5-kpsingh@chromium.org
</content>
</entry>
<entry>
<title>tools: bpftool: Add "inner_map" to "bpftool map create" outer maps</title>
<updated>2020-09-11T00:29:21Z</updated>
<author>
<name>Quentin Monnet</name>
<email>quentin@isovalent.com</email>
</author>
<published>2020-09-10T10:26:52Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=e3b9626f09d429788d929c9b9000a069fcfc056e'/>
<id>urn:sha1:e3b9626f09d429788d929c9b9000a069fcfc056e</id>
<content type='text'>
There is no support for creating maps of types array-of-map or
hash-of-map in bpftool. This is because the kernel needs an inner_map_fd
to collect metadata on the inner maps to be supported by the new map,
but bpftool does not provide a way to pass this file descriptor.

Add a new optional "inner_map" keyword that can be used to pass a
reference to a map, retrieve a fd to that map, and pass it as the
inner_map_fd.

Add related documentation and bash completion. Note that we can
reference the inner map by its name, meaning we can have several times
the keyword "name" with different meanings (mandatory outer map name,
and possibly a name to use to find the inner_map_fd). The bash
completion will offer it just once, and will not suggest "name" on the
following command:

    # bpftool map create /sys/fs/bpf/my_outer_map type hash_of_maps \
        inner_map name my_inner_map [TAB]

Fixing that specific case seems too convoluted. Completion will work as
expected, however, if the outer map name comes first and the "inner_map
name ..." is passed second.

Signed-off-by: Quentin Monnet &lt;quentin@isovalent.com&gt;
Signed-off-by: Alexei Starovoitov &lt;ast@kernel.org&gt;
Acked-by: Andrii Nakryiko &lt;andriin@fb.com&gt;
Link: https://lore.kernel.org/bpf/20200910102652.10509-4-quentin@isovalent.com
</content>
</entry>
<entry>
<title>bpf: Implement bpf_local_storage for inodes</title>
<updated>2020-08-25T22:00:04Z</updated>
<author>
<name>KP Singh</name>
<email>kpsingh@google.com</email>
</author>
<published>2020-08-25T18:29:17Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=8ea636848aca35b9f97c5b5dee30225cf2dd0fe6'/>
<id>urn:sha1:8ea636848aca35b9f97c5b5dee30225cf2dd0fe6</id>
<content type='text'>
Similar to bpf_local_storage for sockets, add local storage for inodes.
The life-cycle of storage is managed with the life-cycle of the inode.
i.e. the storage is destroyed along with the owning inode.

The BPF LSM allocates an __rcu pointer to the bpf_local_storage in the
security blob which are now stackable and can co-exist with other LSMs.

Signed-off-by: KP Singh &lt;kpsingh@google.com&gt;
Signed-off-by: Alexei Starovoitov &lt;ast@kernel.org&gt;
Link: https://lore.kernel.org/bpf/20200825182919.1118197-6-kpsingh@chromium.org
</content>
</entry>
</feed>
