<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/tools/bpf/bpftool/Documentation/bpftool-map.rst, branch linux-rolling-stable</title>
<subtitle>Hosts the 0x221E linux distro kernel.</subtitle>
<id>https://universe.0xinfinity.dev/distro/kernel/atom?h=linux-rolling-stable</id>
<link rel='self' href='https://universe.0xinfinity.dev/distro/kernel/atom?h=linux-rolling-stable'/>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/'/>
<updated>2025-11-06T01:31:25Z</updated>
<entry>
<title>bpftool: Recognize insn_array map type</title>
<updated>2025-11-06T01:31:25Z</updated>
<author>
<name>Anton Protopopov</name>
<email>a.s.protopopov@gmail.com</email>
</author>
<published>2025-11-05T09:04:00Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=18a187bf258421b3d7c0ba32b2e1fde2fdf0f112'/>
<id>urn:sha1:18a187bf258421b3d7c0ba32b2e1fde2fdf0f112</id>
<content type='text'>
Teach bpftool to recognize instruction array map type.

Signed-off-by: Anton Protopopov &lt;a.s.protopopov@gmail.com&gt;
Acked-by: Quentin Monnet &lt;qmo@kernel.org&gt;
Link: https://lore.kernel.org/r/20251105090410.1250500-3-a.s.protopopov@gmail.com
Signed-off-by: Alexei Starovoitov &lt;ast@kernel.org&gt;
</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>
<email>rameezrehman408@hotmail.com</email>
</author>
<published>2024-03-31T20:03:45Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/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>
<email>rameezrehman408@hotmail.com</email>
</author>
<published>2024-03-31T20:03:44Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/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>
<email>ast@kernel.org</email>
</author>
<published>2024-03-08T01:08:07Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/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: Specify XDP Hints ifname when loading program</title>
<updated>2023-05-23T14:55:06Z</updated>
<author>
<name>Larysa Zaremba</name>
<email>larysa.zaremba@intel.com</email>
</author>
<published>2023-05-17T16:01:04Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=f46392ee3dec24066e5fb260d9bd497b4cd4d191'/>
<id>urn:sha1:f46392ee3dec24066e5fb260d9bd497b4cd4d191</id>
<content type='text'>
Add ability to specify a network interface used to resolve XDP hints
kfuncs when loading program through bpftool.

Usage:

  bpftool prog load [...] xdpmeta_dev &lt;ifname&gt;

Writing just 'dev &lt;ifname&gt;' instead of 'xdpmeta_dev' is a very probable
mistake that results in not very descriptive errors,
so 'bpftool prog load [...] dev &lt;ifname&gt;' syntax becomes deprecated,
followed by 'bpftool map create [...] dev &lt;ifname&gt;' for consistency.

Now, to offload program, execute:

  bpftool prog load [...] offload_dev &lt;ifname&gt;

To offload map:

  bpftool map create [...] offload_dev &lt;ifname&gt;

'dev &lt;ifname&gt;' still performs offloading in the commands above, but now
triggers a warning and is excluded from bash completion.

'xdpmeta_dev' and 'offload_dev' are mutually exclusive options, because
'xdpmeta_dev' basically makes a program device-bound without loading it
onto the said device. For now, offloaded programs cannot use XDP hints [0],
but if this changes, using 'offload_dev &lt;ifname&gt;' should cover this case.

  [0] https://lore.kernel.org/bpf/a5a636cc-5b03-686f-4be0-000383b05cfc@linux.dev

Signed-off-by: Larysa Zaremba &lt;larysa.zaremba@intel.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/20230517160103.1088185-1-larysa.zaremba@intel.com
</content>
</entry>
<entry>
<title>bpftool: Support new cgroup local storage</title>
<updated>2022-10-26T06:19:19Z</updated>
<author>
<name>Yonghong Song</name>
<email>yhs@fb.com</email>
</author>
<published>2022-10-26T04:29:01Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/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>bpf: Define new BPF_MAP_TYPE_USER_RINGBUF map type</title>
<updated>2022-09-21T23:24:17Z</updated>
<author>
<name>David Vernet</name>
<email>void@manifault.com</email>
</author>
<published>2022-09-20T00:00:57Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/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: Update doc (use susbtitutions) and test_bpftool_synctypes.py</title>
<updated>2021-11-16T12:56:22Z</updated>
<author>
<name>Quentin Monnet</name>
<email>quentin@isovalent.com</email>
</author>
<published>2021-11-15T22:58:43Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=b623181520404ef48f7421333561bd294c6c6b11'/>
<id>urn:sha1:b623181520404ef48f7421333561bd294c6c6b11</id>
<content type='text'>
test_bpftool_synctypes.py helps detecting inconsistencies in bpftool
between the different list of types and options scattered in the
sources, the documentation, and the bash completion. For options that
apply to all bpftool commands, the script had a hardcoded list of
values, and would use them to check whether the man pages are
up-to-date. When writing the script, it felt acceptable to have this
list in order to avoid to open and parse bpftool's main.h every time,
and because the list of global options in bpftool doesn't change so
often.

However, this is prone to omissions, and we recently added a new
-l|--legacy option which was described in common_options.rst, but not
listed in the options summary of each manual page. The script did not
complain, because it keeps comparing the hardcoded list to the (now)
outdated list in the header file.

To address the issue, this commit brings the following changes:

- Options that are common to all bpftool commands (--json, --pretty, and
  --debug) are moved to a dedicated file, and used in the definition of
  a RST substitution. This substitution is used in the sources of all
  the man pages.

- This list of common options is updated, with the addition of the new
  -l|--legacy option.

- The script test_bpftool_synctypes.py is updated to compare:
    - Options specific to a command, found in C files, for the
      interactive help messages, with the same specific options from the
      relevant man page for that command.
    - Common options, checked just once: the list in main.h is
      compared with the new list in substitutions.rst.

Signed-off-by: Quentin Monnet &lt;quentin@isovalent.com&gt;
Signed-off-by: Daniel Borkmann &lt;daniel@iogearbox.net&gt;
Link: https://lore.kernel.org/bpf/20211115225844.33943-3-quentin@isovalent.com
</content>
</entry>
<entry>
<title>bpftool: Add SPDX tags to RST documentation files</title>
<updated>2021-11-16T12:56:22Z</updated>
<author>
<name>Quentin Monnet</name>
<email>quentin@isovalent.com</email>
</author>
<published>2021-11-15T22:58:42Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=4344842836e9b9a7b695dc84956cdecd83ac02e9'/>
<id>urn:sha1:4344842836e9b9a7b695dc84956cdecd83ac02e9</id>
<content type='text'>
Most files in the kernel repository have a SPDX tags. The files that
don't have such a tag (or another license boilerplate) tend to fall
under the GPL-2.0 license. In the past, bpftool's Makefile (for example)
has been marked as GPL-2.0 for that reason, when in fact all bpftool is
dual-licensed.

To prevent a similar confusion from happening with the RST documentation
files for bpftool, let's explicitly mark all files as dual-licensed.

Signed-off-by: Quentin Monnet &lt;quentin@isovalent.com&gt;
Signed-off-by: Daniel Borkmann &lt;daniel@iogearbox.net&gt;
Link: https://lore.kernel.org/bpf/20211115225844.33943-2-quentin@isovalent.com
</content>
</entry>
<entry>
<title>bpftool: Update the lists of names for maps and prog-attach types</title>
<updated>2021-11-15T02:35:02Z</updated>
<author>
<name>Quentin Monnet</name>
<email>quentin@isovalent.com</email>
</author>
<published>2021-11-10T11:46:31Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=3811e2753a39efb8aa5b8c133dc24f6d26f6cd96'/>
<id>urn:sha1:3811e2753a39efb8aa5b8c133dc24f6d26f6cd96</id>
<content type='text'>
To support the different BPF map or attach types, bpftool must remain
up-to-date with the types supported by the kernel. Let's update the
lists, by adding the missing Bloom filter map type and the perf_event
attach type.

Both missing items were found with test_bpftool_synctypes.py.

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/20211110114632.24537-6-quentin@isovalent.com
</content>
</entry>
</feed>
