<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/tools/lib/bpf/libbpf.map, branch v6.7.3</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=v6.7.3</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=v6.7.3'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2023-10-24T23:06:58+00:00</updated>
<entry>
<title>libbpf: Add link-based API for netkit</title>
<updated>2023-10-24T23:06:58+00:00</updated>
<author>
<name>Daniel Borkmann</name>
<email>daniel@iogearbox.net</email>
</author>
<published>2023-10-24T21:49:00+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=05c31b4ab20527c4d1695130aaecc54ef59a0e54'/>
<id>urn:sha1:05c31b4ab20527c4d1695130aaecc54ef59a0e54</id>
<content type='text'>
This adds bpf_program__attach_netkit() API to libbpf. Overall it is very
similar to tcx. The API looks as following:

  LIBBPF_API struct bpf_link *
  bpf_program__attach_netkit(const struct bpf_program *prog, int ifindex,
                             const struct bpf_netkit_opts *opts);

The struct bpf_netkit_opts is done in similar way as struct bpf_tcx_opts
for supporting bpf_mprog control parameters. The attach location for the
primary and peer device is derived from the program section "netkit/primary"
and "netkit/peer", respectively.

Signed-off-by: Daniel Borkmann &lt;daniel@iogearbox.net&gt;
Acked-by: Martin KaFai Lau &lt;martin.lau@kernel.org&gt;
Link: https://lore.kernel.org/r/20231024214904.29825-4-daniel@iogearbox.net
Signed-off-by: Martin KaFai Lau &lt;martin.lau@kernel.org&gt;
</content>
</entry>
<entry>
<title>libbpf: Add ring__consume</title>
<updated>2023-09-25T23:22:43+00:00</updated>
<author>
<name>Martin Kelly</name>
<email>martin.kelly@crowdstrike.com</email>
</author>
<published>2023-09-25T21:50:44+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=16058ff28b7eedd62f1643beb841e3bd611674fe'/>
<id>urn:sha1:16058ff28b7eedd62f1643beb841e3bd611674fe</id>
<content type='text'>
Add ring__consume to consume a single ringbuffer, analogous to
ring_buffer__consume.

Signed-off-by: Martin Kelly &lt;martin.kelly@crowdstrike.com&gt;
Signed-off-by: Andrii Nakryiko &lt;andrii@kernel.org&gt;
Link: https://lore.kernel.org/bpf/20230925215045.2375758-14-martin.kelly@crowdstrike.com
</content>
</entry>
<entry>
<title>libbpf: Add ring__map_fd</title>
<updated>2023-09-25T23:22:43+00:00</updated>
<author>
<name>Martin Kelly</name>
<email>martin.kelly@crowdstrike.com</email>
</author>
<published>2023-09-25T21:50:42+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=ae769390377adaec2798bd1a69171f00d0a25be0'/>
<id>urn:sha1:ae769390377adaec2798bd1a69171f00d0a25be0</id>
<content type='text'>
Add ring__map_fd to get the file descriptor underlying a given
ringbuffer.

Signed-off-by: Martin Kelly &lt;martin.kelly@crowdstrike.com&gt;
Signed-off-by: Andrii Nakryiko &lt;andrii@kernel.org&gt;
Link: https://lore.kernel.org/bpf/20230925215045.2375758-12-martin.kelly@crowdstrike.com
</content>
</entry>
<entry>
<title>libbpf: Add ring__size</title>
<updated>2023-09-25T23:22:43+00:00</updated>
<author>
<name>Martin Kelly</name>
<email>martin.kelly@crowdstrike.com</email>
</author>
<published>2023-09-25T21:50:40+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=e79abf717fce6439022547124571dfe17f2ac15a'/>
<id>urn:sha1:e79abf717fce6439022547124571dfe17f2ac15a</id>
<content type='text'>
Add ring__size to get the total size of a given ringbuffer.

Signed-off-by: Martin Kelly &lt;martin.kelly@crowdstrike.com&gt;
Signed-off-by: Andrii Nakryiko &lt;andrii@kernel.org&gt;
Link: https://lore.kernel.org/bpf/20230925215045.2375758-10-martin.kelly@crowdstrike.com
</content>
</entry>
<entry>
<title>libbpf: Add ring__avail_data_size</title>
<updated>2023-09-25T23:22:42+00:00</updated>
<author>
<name>Martin Kelly</name>
<email>martin.kelly@crowdstrike.com</email>
</author>
<published>2023-09-25T21:50:38+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=3b34d2972612299fb38ad7f3c2bc62c2d03237f3'/>
<id>urn:sha1:3b34d2972612299fb38ad7f3c2bc62c2d03237f3</id>
<content type='text'>
Add ring__avail_data_size for querying the currently available data in
the ringbuffer, similar to the BPF_RB_AVAIL_DATA flag in
bpf_ringbuf_query. This is racy during ongoing operations but is still
useful for overall information on how a ringbuffer is behaving.

Signed-off-by: Martin Kelly &lt;martin.kelly@crowdstrike.com&gt;
Signed-off-by: Andrii Nakryiko &lt;andrii@kernel.org&gt;
Link: https://lore.kernel.org/bpf/20230925215045.2375758-8-martin.kelly@crowdstrike.com
</content>
</entry>
<entry>
<title>libbpf: Add ring__producer_pos, ring__consumer_pos</title>
<updated>2023-09-25T23:22:42+00:00</updated>
<author>
<name>Martin Kelly</name>
<email>martin.kelly@crowdstrike.com</email>
</author>
<published>2023-09-25T21:50:36+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=059a8c0c5acd37ecfa64f1832e8765d30f253ce8'/>
<id>urn:sha1:059a8c0c5acd37ecfa64f1832e8765d30f253ce8</id>
<content type='text'>
Add APIs to get the producer and consumer position for a given
ringbuffer.

Signed-off-by: Martin Kelly &lt;martin.kelly@crowdstrike.com&gt;
Signed-off-by: Andrii Nakryiko &lt;andrii@kernel.org&gt;
Link: https://lore.kernel.org/bpf/20230925215045.2375758-6-martin.kelly@crowdstrike.com
</content>
</entry>
<entry>
<title>libbpf: Add ring_buffer__ring</title>
<updated>2023-09-25T23:22:42+00:00</updated>
<author>
<name>Martin Kelly</name>
<email>martin.kelly@crowdstrike.com</email>
</author>
<published>2023-09-25T21:50:34+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=1c97f6afd73934881ae8514c51efc8e162b4b406'/>
<id>urn:sha1:1c97f6afd73934881ae8514c51efc8e162b4b406</id>
<content type='text'>
Add a new function ring_buffer__ring, which exposes struct ring * to the
user, representing a single ringbuffer.

Signed-off-by: Martin Kelly &lt;martin.kelly@crowdstrike.com&gt;
Signed-off-by: Andrii Nakryiko &lt;andrii@kernel.org&gt;
Link: https://lore.kernel.org/bpf/20230925215045.2375758-4-martin.kelly@crowdstrike.com
</content>
</entry>
<entry>
<title>libbpf: Add bpf_object__unpin()</title>
<updated>2023-08-24T00:10:09+00:00</updated>
<author>
<name>Daniel Xu</name>
<email>dxu@dxuuu.xyz</email>
</author>
<published>2023-08-23T23:15:02+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=068ca522d5a563ac4ecc48c2c7c390102537fefd'/>
<id>urn:sha1:068ca522d5a563ac4ecc48c2c7c390102537fefd</id>
<content type='text'>
For bpf_object__pin_programs() there is bpf_object__unpin_programs().
Likewise bpf_object__unpin_maps() for bpf_object__pin_maps().

But no bpf_object__unpin() for bpf_object__pin(). Adding the former adds
symmetry to the API.

It's also convenient for cleanup in application code. It's an API I
would've used if it was available for a repro I was writing earlier.

Signed-off-by: Daniel Xu &lt;dxu@dxuuu.xyz&gt;
Signed-off-by: Andrii Nakryiko &lt;andrii@kernel.org&gt;
Reviewed-by: Song Liu &lt;song@kernel.org&gt;
Link: https://lore.kernel.org/bpf/b2f9d41da4a350281a0b53a804d11b68327e14e5.1692832478.git.dxu@dxuuu.xyz
</content>
</entry>
<entry>
<title>libbpf: Add bpf_program__attach_uprobe_multi function</title>
<updated>2023-08-21T22:51:26+00:00</updated>
<author>
<name>Jiri Olsa</name>
<email>jolsa@kernel.org</email>
</author>
<published>2023-08-09T08:34:26+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=3140cf121c255686084bb31dd86ba3bdd4a8a540'/>
<id>urn:sha1:3140cf121c255686084bb31dd86ba3bdd4a8a540</id>
<content type='text'>
Adding bpf_program__attach_uprobe_multi function that
allows to attach multiple uprobes with uprobe_multi link.

The user can specify uprobes with direct arguments:

  binary_path/func_pattern/pid

or with struct bpf_uprobe_multi_opts opts argument fields:

  const char **syms;
  const unsigned long *offsets;
  const unsigned long *ref_ctr_offsets;
  const __u64 *cookies;

User can specify 2 mutually exclusive set of inputs:

 1) use only path/func_pattern/pid arguments

 2) use path/pid with allowed combinations of:
    syms/offsets/ref_ctr_offsets/cookies/cnt

    - syms and offsets are mutually exclusive
    - ref_ctr_offsets and cookies are optional

Any other usage results in error.

Signed-off-by: Jiri Olsa &lt;jolsa@kernel.org&gt;
Link: https://lore.kernel.org/r/20230809083440.3209381-15-jolsa@kernel.org
Signed-off-by: Alexei Starovoitov &lt;ast@kernel.org&gt;
</content>
</entry>
<entry>
<title>libbpf: Add link-based API for tcx</title>
<updated>2023-07-19T17:07:28+00:00</updated>
<author>
<name>Daniel Borkmann</name>
<email>daniel@iogearbox.net</email>
</author>
<published>2023-07-19T14:08:54+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=55cc3768473e139483be8f17796b50d21788953f'/>
<id>urn:sha1:55cc3768473e139483be8f17796b50d21788953f</id>
<content type='text'>
Implement tcx BPF link support for libbpf.

The bpf_program__attach_fd() API has been refactored slightly in order to pass
bpf_link_create_opts pointer as input.

A new bpf_program__attach_tcx() has been added on top of this which allows for
passing all relevant data via extensible struct bpf_tcx_opts.

The program sections tcx/ingress and tcx/egress correspond to the hook locations
for tc ingress and egress, respectively.

For concrete usage examples, see the extensive selftests that have been
developed as part of this series.

Signed-off-by: Daniel Borkmann &lt;daniel@iogearbox.net&gt;
Acked-by: Andrii Nakryiko &lt;andrii@kernel.org&gt;
Link: https://lore.kernel.org/r/20230719140858.13224-5-daniel@iogearbox.net
Signed-off-by: Alexei Starovoitov &lt;ast@kernel.org&gt;
</content>
</entry>
</feed>
