<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/tools/bpf/bpftool/Documentation, branch linux-6.4.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-6.4.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-6.4.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2023-04-21T18:10:10Z</updated>
<entry>
<title>bpftool: Update doc to explain struct_ops register subcommand.</title>
<updated>2023-04-21T18:10:10Z</updated>
<author>
<name>Kui-Feng Lee</name>
</author>
<published>2023-04-20T00:28:22Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=45cea721ea36d83969473d2abd29bcc2321cacdd'/>
<id>urn:sha1:45cea721ea36d83969473d2abd29bcc2321cacdd</id>
<content type='text'>
The "struct_ops register" subcommand now allows for an optional *LINK_DIR*
to be included. This specifies the directory path where bpftool will pin
struct_ops links with the same name as their corresponding map names.

Signed-off-by: Kui-Feng Lee &lt;kuifeng@meta.com&gt;
Reviewed-by: Quentin Monnet &lt;quentin@isovalent.com&gt;
Link: https://lore.kernel.org/r/20230420002822.345222-2-kuifeng@meta.com
Signed-off-by: Alexei Starovoitov &lt;ast@kernel.org&gt;
</content>
</entry>
<entry>
<title>bpftool: Support "opcodes", "linum", "visual" simultaneously</title>
<updated>2023-04-06T04:27:27Z</updated>
<author>
<name>Quentin Monnet</name>
</author>
<published>2023-04-05T13:21:18Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=9b79f02722bbf24f060b2ab79513ad6e22c8e2f0'/>
<id>urn:sha1:9b79f02722bbf24f060b2ab79513ad6e22c8e2f0</id>
<content type='text'>
When dumping a program, the keywords "opcodes" (for printing the raw
opcodes), "linum" (for displaying the filename, line number, column
number along with the source code), and "visual" (for generating the
control flow graph for translated programs) are mutually exclusive. But
there's no reason why they should be. Let's make it possible to pass
several of them at once. The "file FILE" option, which makes bpftool
output a binary image to a file, remains incompatible with the others.

Signed-off-by: Quentin Monnet &lt;quentin@isovalent.com&gt;
Link: https://lore.kernel.org/r/20230405132120.59886-6-quentin@isovalent.com
Signed-off-by: Alexei Starovoitov &lt;ast@kernel.org&gt;
</content>
</entry>
<entry>
<title>bpftool: Fix documentation about line info display for prog dumps</title>
<updated>2023-04-06T04:27:27Z</updated>
<author>
<name>Quentin Monnet</name>
</author>
<published>2023-04-05T13:21:14Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=e27f0f1620b693ecf312c21ff8a52affb8a5be08'/>
<id>urn:sha1:e27f0f1620b693ecf312c21ff8a52affb8a5be08</id>
<content type='text'>
The documentation states that when line_info is available when dumping a
program, the source line will be displayed "by default". There is no
notion of "default" here: the line is always displayed if available,
there is no way currently to turn it off.

In the next sentence, the documentation states that if "linum" is used
on the command line, the relevant filename, line, and column will be
displayed "on top of the source line". This is incorrect, as they are
currently displayed on the right side of the source line (or on top of
the eBPF instruction, not the source).

This commit fixes the documentation to address these points.

Signed-off-by: Quentin Monnet &lt;quentin@isovalent.com&gt;
Link: https://lore.kernel.org/r/20230405132120.59886-2-quentin@isovalent.com
Signed-off-by: Alexei Starovoitov &lt;ast@kernel.org&gt;
</content>
</entry>
<entry>
<title>bpftool: remove support of --legacy option for bpftool</title>
<updated>2022-11-21T00:17:46Z</updated>
<author>
<name>Sahid Orentino Ferdjaoui</name>
</author>
<published>2022-11-20T11:25:55Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=9b8107553424fd87955fed257a807672c2097297'/>
<id>urn:sha1:9b8107553424fd87955fed257a807672c2097297</id>
<content type='text'>
Following:
  commit bd054102a8c7 ("libbpf: enforce strict libbpf 1.0 behaviors")
  commit 93b8952d223a ("libbpf: deprecate legacy BPF map definitions")

The --legacy option is no longer relevant as libbpf no longer supports
it. libbpf_set_strict_mode() is a no-op operation.

Signed-off-by: Sahid Orentino Ferdjaoui &lt;sahid.ferdjaoui@industrialdiscipline.com&gt;
Acked-by: Yonghong Song &lt;yhs@fb.com&gt;
Reviewed-by: Quentin Monnet &lt;quentin@isovalent.com&gt;
Link: https://lore.kernel.org/r/20221120112515.38165-2-sahid.ferdjaoui@industrialdiscipline.com
Signed-off-by: Alexei Starovoitov &lt;ast@kernel.org&gt;
</content>
</entry>
<entry>
<title>bpftool: Support new cgroup local storage</title>
<updated>2022-10-26T06:19:19Z</updated>
<author>
<name>Yonghong Song</name>
</author>
<published>2022-10-26T04:29:01Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=f7f0f1657d9552e8667bc4758cbf41909bcdf7e2'/>
<id>urn:sha1:f7f0f1657d9552e8667bc4758cbf41909bcdf7e2</id>
<content type='text'>
Add support for new cgroup local storage

Acked-by: Quentin Monnet &lt;quentin@isovalent.com&gt;
Signed-off-by: Yonghong Song &lt;yhs@fb.com&gt;
Link: https://lore.kernel.org/r/20221026042901.674177-1-yhs@fb.com
Signed-off-by: Alexei Starovoitov &lt;ast@kernel.org&gt;
</content>
</entry>
<entry>
<title>bpftool: Add llvm feature to "bpftool version"</title>
<updated>2022-10-25T17:11:57Z</updated>
<author>
<name>Quentin Monnet</name>
</author>
<published>2022-10-25T15:03:29Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=08b8191ba7f99cd1444001e9f4800ff27607d054'/>
<id>urn:sha1:08b8191ba7f99cd1444001e9f4800ff27607d054</id>
<content type='text'>
Similarly to "libbfd", add a "llvm" feature to the output of command
"bpftool version" to indicate that LLVM is used for disassembling JIT-ed
programs. This feature is mutually exclusive (from Makefile definitions)
with "libbfd".

Signed-off-by: Quentin Monnet &lt;quentin@isovalent.com&gt;
Tested-by: Niklas Söderlund &lt;niklas.soderlund@corigine.com&gt;
Acked-by: Yonghong Song &lt;yhs@fb.com&gt;
Link: https://lore.kernel.org/r/20221025150329.97371-9-quentin@isovalent.com
Signed-off-by: Alexei Starovoitov &lt;ast@kernel.org&gt;
</content>
</entry>
<entry>
<title>bpftool: Update doc (add autoattach to prog load)</title>
<updated>2022-10-21T15:59:00Z</updated>
<author>
<name>Wang Yufen</name>
</author>
<published>2022-10-14T08:31:14Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=ff0e9a579ec9f12cb4fec9bd94b15e3d613a1a77'/>
<id>urn:sha1:ff0e9a579ec9f12cb4fec9bd94b15e3d613a1a77</id>
<content type='text'>
Add autoattach optional to prog load|loadall for supporting
one-step load-attach-pin_link.

Signed-off-by: Wang Yufen &lt;wangyufen@huawei.com&gt;
Link: https://lore.kernel.org/r/1665736275-28143-3-git-send-email-wangyufen@huawei.com
Signed-off-by: Alexei Starovoitov &lt;ast@kernel.org&gt;
</content>
</entry>
<entry>
<title>bpf: Define new BPF_MAP_TYPE_USER_RINGBUF map type</title>
<updated>2022-09-21T23:24:17Z</updated>
<author>
<name>David Vernet</name>
</author>
<published>2022-09-20T00:00:57Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=583c1f420173f7d84413a1a1fbf5109d798b4faa'/>
<id>urn:sha1:583c1f420173f7d84413a1a1fbf5109d798b4faa</id>
<content type='text'>
We want to support a ringbuf map type where samples are published from
user-space, to be consumed by BPF programs. BPF currently supports a
kernel -&gt; user-space circular ring buffer via the BPF_MAP_TYPE_RINGBUF
map type.  We'll need to define a new map type for user-space -&gt; kernel,
as none of the helpers exported for BPF_MAP_TYPE_RINGBUF will apply
to a user-space producer ring buffer, and we'll want to add one or
more helper functions that would not apply for a kernel-producer
ring buffer.

This patch therefore adds a new BPF_MAP_TYPE_USER_RINGBUF map type
definition. The map type is useless in its current form, as there is no
way to access or use it for anything until we one or more BPF helpers. A
follow-on patch will therefore add a new helper function that allows BPF
programs to run callbacks on samples that are published to the ring
buffer.

Signed-off-by: David Vernet &lt;void@manifault.com&gt;
Signed-off-by: Andrii Nakryiko &lt;andrii@kernel.org&gt;
Acked-by: Andrii Nakryiko &lt;andrii@kernel.org&gt;
Link: https://lore.kernel.org/bpf/20220920000100.477320-2-void@manifault.com
</content>
</entry>
<entry>
<title>bpftool: Rename "bpftool feature list" into "... feature list_builtins"</title>
<updated>2022-07-05T09:53:54Z</updated>
<author>
<name>Quentin Monnet</name>
</author>
<published>2022-07-01T09:38:05Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=990a6194f7e16cc23334892287f32899e241b1a9'/>
<id>urn:sha1:990a6194f7e16cc23334892287f32899e241b1a9</id>
<content type='text'>
To make it more explicit that the features listed with "bpftool feature
list" are known to bpftool, but not necessary available on the system
(as opposed to the probed features), rename the "feature list" command
into "feature list_builtins".

Note that "bpftool feature list" still works as before given that we
recognise arguments from their prefixes; but the real name of the
subcommand, in particular as displayed in the man page or the
interactive help, will now include "_builtins".

Since we update the bash completion accordingly, let's also take this
chance to redirect error output to /dev/null in the completion script,
to avoid displaying unexpected error messages when users attempt to
tab-complete.

Suggested-by: Daniel Borkmann &lt;daniel@iogearbox.net&gt;
Signed-off-by: Quentin Monnet &lt;quentin@isovalent.com&gt;
Signed-off-by: Daniel Borkmann &lt;daniel@iogearbox.net&gt;
Acked-by: Yonghong Song &lt;yhs@fb.com&gt;
Link: https://lore.kernel.org/bpf/20220701093805.16920-1-quentin@isovalent.com
</content>
</entry>
<entry>
<title>bpftool: Add feature list (prog/map/link/attach types, helpers)</title>
<updated>2022-06-30T14:17:03Z</updated>
<author>
<name>Quentin Monnet</name>
</author>
<published>2022-06-29T20:36:36Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=27b3f70553432114b3d26f4d9c72cf02f38b84ee'/>
<id>urn:sha1:27b3f70553432114b3d26f4d9c72cf02f38b84ee</id>
<content type='text'>
Add a "bpftool feature list" subcommand to list BPF "features".
Contrarily to "bpftool feature probe", this is not about the features
available on the system. Instead, it lists all features known to bpftool
from compilation time; in other words, all program, map, attach, link
types known to the libbpf version in use, and all helpers found in the
UAPI BPF header.

The first use case for this feature is bash completion: running the
command provides a list of types that can be used to produce the list of
candidate map types, for example.

Now that bpftool uses "standard" names provided by libbpf for the
program, map, link, and attach types, having the ability to list these
types and helpers could also be useful in scripts to loop over existing
items.

Sample output:

    # bpftool feature list prog_types | grep -vw unspec | head -n 6
    socket_filter
    kprobe
    sched_cls
    sched_act
    tracepoint
    xdp

    # bpftool -p feature list map_types | jq '.[1]'
    "hash"

    # bpftool feature list attach_types | grep '^cgroup_'
    cgroup_inet_ingress
    cgroup_inet_egress
    [...]
    cgroup_inet_sock_release

    # bpftool feature list helpers | grep -vw bpf_unspec | wc -l
    207

The "unspec" types and helpers are not filtered out by bpftool, so as to
remain closer to the enums, and to preserve the indices in the JSON
arrays (e.g. "hash" at index 1 == BPF_MAP_TYPE_HASH in map types list).

Signed-off-by: Quentin Monnet &lt;quentin@isovalent.com&gt;
Signed-off-by: Daniel Borkmann &lt;daniel@iogearbox.net&gt;
Acked-by: Daniel Müller &lt;deso@posteo.net&gt;
Link: https://lore.kernel.org/bpf/20220629203637.138944-2-quentin@isovalent.com
</content>
</entry>
</feed>
