<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/tools/bpf/bpftool/Documentation, branch linux-6.11.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-6.11.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-6.11.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2024-05-18T17:46:16Z</updated>
<entry>
<title>bpftool: Introduce btf c dump sorting</title>
<updated>2024-05-18T17:46:16Z</updated>
<author>
<name>Mykyta Yatsenko</name>
</author>
<published>2024-05-14T13:12:21Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=94133cf24bb33889aac267a7f0e3e6a08b8a8e5a'/>
<id>urn:sha1:94133cf24bb33889aac267a7f0e3e6a08b8a8e5a</id>
<content type='text'>
Sort bpftool c dump output; aiming to simplify vmlinux.h diffing and
forcing more natural type definitions ordering.

Definitions are sorted first by their BTF kind ranks, then by their base
type name and by their own name.

Type ranks

Assign ranks to btf kinds (defined in function btf_type_rank) to set
next order:
1. Anonymous enums/enums64
2. Named enums/enums64
3. Trivial types typedefs (ints, then floats)
4. Structs/Unions
5. Function prototypes
6. Forward declarations

Type rank is set to maximum for unnamed reference types, structs and
unions to avoid emitting those types early. They will be emitted as
part of the type chain starting with named type.

Lexicographical ordering

Each type is assigned a sort_name and own_name.
sort_name is the resolved name of the final base type for reference
types (typedef, pointer, array etc). Sorting by sort_name allows to
group typedefs of the same base type. sort_name for non-reference type
is the same as own_name. own_name is a direct name of particular type,
is used as final sorting step.

Signed-off-by: Mykyta Yatsenko &lt;yatsenko@meta.com&gt;
Signed-off-by: Andrii Nakryiko &lt;andrii@kernel.org&gt;
Tested-by: Andrii Nakryiko &lt;andrii@kernel.org&gt;
Reviewed-by: Quentin Monnet &lt;qmo@kernel.org&gt;
Acked-by: Andrii Nakryiko &lt;andrii@kernel.org&gt;
Link: https://lore.kernel.org/bpf/20240514131221.20585-1-yatsenko@meta.com
Signed-off-by: Alexei Starovoitov &lt;ast@kernel.org&gt;
</content>
</entry>
<entry>
<title>bpftool: Update documentation where progs/maps can be passed by name</title>
<updated>2024-04-16T15:58:25Z</updated>
<author>
<name>Quentin Monnet</name>
</author>
<published>2024-04-13T01:14:26Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=986e7663f98ec7441d9d948263ec0dda71e7479f'/>
<id>urn:sha1:986e7663f98ec7441d9d948263ec0dda71e7479f</id>
<content type='text'>
When using references to BPF programs, bpftool supports passing programs
by name on the command line. The manual pages for "bpftool prog" and
"bpftool map" (for prog_array updates) mention it, but we have a few
additional subcommands that support referencing programs by name but do
not mention it in their documentation. Let's update the pages for
subcommands "btf", "cgroup", and "net".

Similarly, we can reference maps by name when passing them to "bpftool
prog load", so we update the page for "bpftool prog" as well.

Signed-off-by: Quentin Monnet &lt;qmo@kernel.org&gt;
Signed-off-by: Daniel Borkmann &lt;daniel@iogearbox.net&gt;
Link: https://lore.kernel.org/bpf/20240413011427.14402-2-qmo@kernel.org
</content>
</entry>
<entry>
<title>bpftool: Clean-up typos, punctuation, list formatting in docs</title>
<updated>2024-04-02T13:50:23Z</updated>
<author>
<name>Rameez Rehman</name>
</author>
<published>2024-03-31T20:03:46Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=a70f5d840a56a82c576385ca79ee55c1598f1bc3'/>
<id>urn:sha1:a70f5d840a56a82c576385ca79ee55c1598f1bc3</id>
<content type='text'>
Improve the formatting of the attach flags for cgroup programs in the
relevant man page, and fix typos ("can be on of", "an userspace inet
socket") when introducing that list. Also fix a couple of other trivial
issues in docs.

[ Quentin: Fixed trival issues in bpftool-gen.rst and bpftool-iter.rst ]

Signed-off-by: Rameez Rehman &lt;rameezrehman408@hotmail.com&gt;
Signed-off-by: Quentin Monnet &lt;qmo@kernel.org&gt;
Signed-off-by: Daniel Borkmann &lt;daniel@iogearbox.net&gt;
Link: https://lore.kernel.org/bpf/20240331200346.29118-4-qmo@kernel.org
</content>
</entry>
<entry>
<title>bpftool: Remove useless emphasis on command description in man pages</title>
<updated>2024-04-02T13:50:23Z</updated>
<author>
<name>Rameez Rehman</name>
</author>
<published>2024-03-31T20:03:45Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=ea379b3ccc2e4dff9c3d616f0611b5312fe389ad'/>
<id>urn:sha1:ea379b3ccc2e4dff9c3d616f0611b5312fe389ad</id>
<content type='text'>
As it turns out, the terms in definition lists in the rST file are
already rendered with bold-ish formatting when generating the man pages;
all double-star sequences we have in the commands for the command
description are unnecessary, and can be removed to make the
documentation easier to read.

The rST files were automatically processed with:

    sed -i '/DESCRIPTION/,/OPTIONS/ { /^\*/ s/\*\*//g }' b*.rst

Signed-off-by: Rameez Rehman &lt;rameezrehman408@hotmail.com&gt;
Signed-off-by: Quentin Monnet &lt;qmo@kernel.org&gt;
Signed-off-by: Daniel Borkmann &lt;daniel@iogearbox.net&gt;
Link: https://lore.kernel.org/bpf/20240331200346.29118-3-qmo@kernel.org
</content>
</entry>
<entry>
<title>bpftool: Use simpler indentation in source rST for documentation</title>
<updated>2024-04-02T13:50:23Z</updated>
<author>
<name>Rameez Rehman</name>
</author>
<published>2024-03-31T20:03:44Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=f7b68543642136164ce7348945d3ada707c4e635'/>
<id>urn:sha1:f7b68543642136164ce7348945d3ada707c4e635</id>
<content type='text'>
The rST manual pages for bpftool would use a mix of tabs and spaces for
indentation. While this is the norm in C code, this is rather unusual
for rST documents, and over time we've seen many contributors use a
wrong level of indentation for documentation update.

Let's fix bpftool's indentation in docs once and for all:

- Let's use spaces, that are more common in rST files.
- Remove one level of indentation for the synopsis, the command
  description, and the "see also" section. As a result, all sections
  start with the same indentation level in the generated man page.
- Rewrap the paragraphs after the changes.

There is no content change in this patch, only indentation and
rewrapping changes. The wrapping in the generated source files for the
manual pages is changed, but the pages displayed with "man" remain the
same, apart from the adjusted indentation level on relevant sections.

[ Quentin: rebased on bpf-next, removed indent level for command
  description and options, updated synopsis, command summary, and "see
  also" sections. ]

Signed-off-by: Rameez Rehman &lt;rameezrehman408@hotmail.com&gt;
Signed-off-by: Quentin Monnet &lt;qmo@kernel.org&gt;
Signed-off-by: Daniel Borkmann &lt;daniel@iogearbox.net&gt;
Link: https://lore.kernel.org/bpf/20240331200346.29118-2-qmo@kernel.org
</content>
</entry>
<entry>
<title>bpftool: Recognize arena map type</title>
<updated>2024-03-11T22:37:24Z</updated>
<author>
<name>Alexei Starovoitov</name>
</author>
<published>2024-03-08T01:08:07Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=eed512e8ac64339cfc69da1a6a4b60982cb502ca'/>
<id>urn:sha1:eed512e8ac64339cfc69da1a6a4b60982cb502ca</id>
<content type='text'>
Teach bpftool to recognize arena map type.

Signed-off-by: Alexei Starovoitov &lt;ast@kernel.org&gt;
Signed-off-by: Andrii Nakryiko &lt;andrii@kernel.org&gt;
Acked-by: Quentin Monnet &lt;quentin@isovalent.com&gt;
Link: https://lore.kernel.org/bpf/20240308010812.89848-10-alexei.starovoitov@gmail.com
</content>
</entry>
<entry>
<title>bpftool: Add an example for struct_ops map and shadow type.</title>
<updated>2024-02-29T22:23:53Z</updated>
<author>
<name>Kui-Feng Lee</name>
</author>
<published>2024-02-29T06:45:22Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=f2e81192e07e87897ff1296c96775eceea8f582a'/>
<id>urn:sha1:f2e81192e07e87897ff1296c96775eceea8f582a</id>
<content type='text'>
The example in bpftool-gen.8 explains how to use the pointer of the shadow
type to change the value of a field of a struct_ops map.

Signed-off-by: Kui-Feng Lee &lt;thinker.li@gmail.com&gt;
Signed-off-by: Andrii Nakryiko &lt;andrii@kernel.org&gt;
Reviewed-by: Quentin Monnet &lt;quentin@isovalent.com&gt;
Link: https://lore.kernel.org/bpf/20240229064523.2091270-5-thinker.li@gmail.com
</content>
</entry>
<entry>
<title>bpftool: Fix prog object type in manpage</title>
<updated>2023-11-10T03:07:38Z</updated>
<author>
<name>Artem Savkov</name>
</author>
<published>2023-11-03T08:11:26Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=a46afaa03f6db8c65492302ffdafcb2e769e5667'/>
<id>urn:sha1:a46afaa03f6db8c65492302ffdafcb2e769e5667</id>
<content type='text'>
bpftool's man page lists "program" as one of possible values for OBJECT,
while in fact bpftool accepts "prog" instead.

Reported-by: Jerry Snitselaar &lt;jsnitsel@redhat.com&gt;
Signed-off-by: Artem Savkov &lt;asavkov@redhat.com&gt;
Signed-off-by: Andrii Nakryiko &lt;andrii@kernel.org&gt;
Acked-by: Yonghong Song &lt;yonghong.song@linux.dev&gt;
Acked-by: Quentin Monnet &lt;quentin@isovalent.com&gt;
Link: https://lore.kernel.org/bpf/20231103081126.170034-1-asavkov@redhat.com
Signed-off-by: Alexei Starovoitov &lt;ast@kernel.org&gt;
</content>
</entry>
<entry>
<title>bpftool: Extend net dump with netkit progs</title>
<updated>2023-10-24T23:07:32Z</updated>
<author>
<name>Daniel Borkmann</name>
</author>
<published>2023-10-24T21:49:02Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=bec981a4add6dd6a63065e54e2b2e67c2af6c3fa'/>
<id>urn:sha1:bec981a4add6dd6a63065e54e2b2e67c2af6c3fa</id>
<content type='text'>
Add support to dump BPF programs on netkit via bpftool. This includes both
the BPF link and attach ops programs. Dumped information contain the attach
location, function entry name, program ID and link ID when applicable.

Example with tc BPF link:

  # ./bpftool net
  xdp:

  tc:
  nk1(22) netkit/peer tc1 prog_id 43 link_id 12

  [...]

Example with json dump:

  # ./bpftool net --json | jq
  [
    {
      "xdp": [],
      "tc": [
        {
          "devname": "nk1",
          "ifindex": 18,
          "kind": "netkit/primary",
          "name": "tc1",
          "prog_id": 29,
          "prog_flags": [],
          "link_id": 8,
          "link_flags": []
        }
      ],
      "flow_dissector": [],
      "netfilter": []
    }
  ]

Signed-off-by: Daniel Borkmann &lt;daniel@iogearbox.net&gt;
Reviewed-by: Quentin Monnet &lt;quentin@isovalent.com&gt;
Acked-by: Martin KaFai Lau &lt;martin.lau@kernel.org&gt;
Link: https://lore.kernel.org/r/20231024214904.29825-6-daniel@iogearbox.net
Signed-off-by: Martin KaFai Lau &lt;martin.lau@kernel.org&gt;
</content>
</entry>
<entry>
<title>bpftool: Add support for cgroup unix socket address hooks</title>
<updated>2023-10-12T00:27:55Z</updated>
<author>
<name>Daan De Meyer</name>
</author>
<published>2023-10-11T18:51:08Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=8b3cba987e6d9464bb533d957de923f891b57bf8'/>
<id>urn:sha1:8b3cba987e6d9464bb533d957de923f891b57bf8</id>
<content type='text'>
Add the necessary plumbing to hook up the new cgroup unix sockaddr
hooks into bpftool.

Signed-off-by: Daan De Meyer &lt;daan.j.demeyer@gmail.com&gt;
Acked-by: Quentin Monnet &lt;quentin@isovalent.com&gt;
Link: https://lore.kernel.org/r/20231011185113.140426-7-daan.j.demeyer@gmail.com
Signed-off-by: Martin KaFai Lau &lt;martin.lau@kernel.org&gt;
</content>
</entry>
</feed>
