Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

libbpf 1.0: deprecate bpf_load_btf() and add extensible bpf_btf_load() #419

Closed
anakryiko opened this issue Dec 3, 2021 · 0 comments
Closed
Assignees
Labels
libbpf-1.0 Tasks related to libbpf-1.0 release
Milestone

Comments

@anakryiko
Copy link
Member

anakryiko commented Dec 3, 2021

bpf_load_btf() has inconsistent naming (similar to bpf_load_program() and bpf_create_map()), and it doesn't allow to specify log level. So deprecate bpf_load_btf() in favor of bpf_btf_load() with OPTS.

@anakryiko anakryiko added the libbpf-1.0 Tasks related to libbpf-1.0 release label Dec 3, 2021
@anakryiko anakryiko added this to the libbpf-1.0 milestone Dec 3, 2021
@anakryiko anakryiko self-assigned this Dec 3, 2021
@anakryiko anakryiko changed the title libbpf-1.0: deprecate bpf_load_btf() and add extensible bpf_btf_load() libbpf 1.0: deprecate bpf_load_btf() and add extensible bpf_btf_load() Dec 3, 2021
fengguang pushed a commit to 0day-ci/linux that referenced this issue Dec 5, 2021
Similar to previous bpf_prog_load() and bpf_map_create() APIs, add
bpf_btf_load() API which is taking optional OPTS struct. Schedule
bpf_load_btf() for deprecation in v0.8 ([0]).

This makes naming consistent with BPF_BTF_LOAD command, sets up an API
for extensibility in the future, moves options parameters (log-related
fields) into optional options, and also allows to pass log_level
directly. It also removes higher-level retry logic with auto-allocated
buffer from low-level API. Customer is expected to handle that on their
own, if desired. This is similar to bpf_prog_load() behavior.

  [0] Closes: libbpf/libbpf#419

Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
kernel-patches-bot pushed a commit to kernel-patches/bpf that referenced this issue Dec 5, 2021
Similar to previous bpf_prog_load() and bpf_map_create() APIs, add
bpf_btf_load() API which is taking optional OPTS struct. Schedule
bpf_load_btf() for deprecation in v0.8 ([0]).

This makes naming consistent with BPF_BTF_LOAD command, sets up an API
for extensibility in the future, moves options parameters (log-related
fields) into optional options, and also allows to pass log_level
directly. It also removes higher-level retry logic with auto-allocated
buffer from low-level API. Customer is expected to handle that on their
own, if desired. This is similar to bpf_prog_load() behavior.

  [0] Closes: libbpf/libbpf#419

Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
tsipa pushed a commit to tsipa/bpf-next that referenced this issue Dec 5, 2021
Similar to previous bpf_prog_load() and bpf_map_create() APIs, add
bpf_btf_load() API which is taking optional OPTS struct. Schedule
bpf_load_btf() for deprecation in v0.8 ([0]).

This makes naming consistent with BPF_BTF_LOAD command, sets up an API
for extensibility in the future, moves options parameters (log-related
fields) into optional options, and also allows to pass log_level
directly. It also removes higher-level retry logic with auto-allocated
buffer from low-level API. Customer is expected to handle that on their
own, if desired. This is similar to bpf_prog_load() behavior.

  [0] Closes: libbpf/libbpf#419

Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
tsipa pushed a commit to tsipa/bpf-next that referenced this issue Dec 6, 2021
Similar to previous bpf_prog_load() and bpf_map_create() APIs, add
bpf_btf_load() API which is taking optional OPTS struct. Schedule
bpf_load_btf() for deprecation in v0.8 ([0]).

This makes naming consistent with BPF_BTF_LOAD command, sets up an API
for extensibility in the future, moves options parameters (log-related
fields) into optional options, and also allows to pass log_level
directly. It also removes higher-level retry logic with auto-allocated
buffer from low-level API. Customer is expected to handle that on their
own, if desired. This is similar to bpf_prog_load() behavior.

  [0] Closes: libbpf/libbpf#419

Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
kernel-patches-bot pushed a commit to kernel-patches/bpf that referenced this issue Dec 6, 2021
Similar to previous bpf_prog_load() and bpf_map_create() APIs, add
bpf_btf_load() API which is taking optional OPTS struct. Schedule
bpf_load_btf() for deprecation in v0.8 ([0]).

This makes naming consistent with BPF_BTF_LOAD command, sets up an API
for extensibility in the future, moves options parameters (log-related
fields) into optional options, and also allows to pass log_level
directly. It also removes higher-level retry logic with auto-allocated
buffer from low-level API. Customer is expected to handle that on their
own, if desired. This is similar to bpf_prog_load() behavior.

  [0] Closes: libbpf/libbpf#419

Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
kernel-patches-bot pushed a commit to kernel-patches/bpf that referenced this issue Dec 6, 2021
Similar to previous bpf_prog_load() and bpf_map_create() APIs, add
bpf_btf_load() API which is taking optional OPTS struct. Schedule
bpf_load_btf() for deprecation in v0.8 ([0]).

This makes naming consistent with BPF_BTF_LOAD command, sets up an API
for extensibility in the future, moves options parameters (log-related
fields) into optional options, and also allows to pass log_level
directly. It also removes higher-level retry logic with auto-allocated
buffer from low-level API. Customer is expected to handle that on their
own, if desired. This is similar to bpf_prog_load() behavior.

  [0] Closes: libbpf/libbpf#419

Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
tsipa pushed a commit to tsipa/bpf-next that referenced this issue Dec 6, 2021
Similar to previous bpf_prog_load() and bpf_map_create() APIs, add
bpf_btf_load() API which is taking optional OPTS struct. Schedule
bpf_load_btf() for deprecation in v0.8 ([0]).

This makes naming consistent with BPF_BTF_LOAD command, sets up an API
for extensibility in the future, moves options parameters (log-related
fields) into optional options, and also allows to pass log_level
directly. It also removes higher-level retry logic with auto-allocated
buffer from low-level API. Customer is expected to handle that on their
own, if desired. This is similar to bpf_prog_load() behavior.

  [0] Closes: libbpf/libbpf#419

Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
kernel-patches-bot pushed a commit to kernel-patches/bpf that referenced this issue Dec 6, 2021
Similar to previous bpf_prog_load() and bpf_map_create() APIs, add
bpf_btf_load() API which is taking optional OPTS struct. Schedule
bpf_load_btf() for deprecation in v0.8 ([0]).

This makes naming consistent with BPF_BTF_LOAD command, sets up an API
for extensibility in the future, moves options parameters (log-related
fields) into optional options, and also allows to pass log_level
directly. It also removes higher-level retry logic with auto-allocated
buffer from low-level API. Customer is expected to handle that on their
own, if desired. This is similar to bpf_prog_load() behavior.

  [0] Closes: libbpf/libbpf#419

Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
tsipa pushed a commit to tsipa/bpf-next that referenced this issue Dec 6, 2021
Similar to previous bpf_prog_load() and bpf_map_create() APIs, add
bpf_btf_load() API which is taking optional OPTS struct. Schedule
bpf_load_btf() for deprecation in v0.8 ([0]).

This makes naming consistent with BPF_BTF_LOAD command, sets up an API
for extensibility in the future, moves options parameters (log-related
fields) into optional options, and also allows to pass log_level
directly. It also removes higher-level retry logic with auto-allocated
buffer from low-level API. Customer is expected to handle that on their
own, if desired. This is similar to bpf_prog_load() behavior.

  [0] Closes: libbpf/libbpf#419

Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
tsipa pushed a commit to tsipa/bpf-next that referenced this issue Dec 7, 2021
Similar to previous bpf_prog_load() and bpf_map_create() APIs, add
bpf_btf_load() API which is taking optional OPTS struct. Schedule
bpf_load_btf() for deprecation in v0.8 ([0]).

This makes naming consistent with BPF_BTF_LOAD command, sets up an API
for extensibility in the future, moves options parameters (log-related
fields) into optional options, and also allows to pass log_level
directly. It also removes higher-level retry logic with auto-allocated
buffer from low-level API. Customer is expected to handle that on their
own, if desired. This is similar to bpf_prog_load() behavior.

  [0] Closes: libbpf/libbpf#419

Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
kernel-patches-bot pushed a commit to kernel-patches/bpf that referenced this issue Dec 7, 2021
Similar to previous bpf_prog_load() and bpf_map_create() APIs, add
bpf_btf_load() API which is taking optional OPTS struct. Schedule
bpf_load_btf() for deprecation in v0.8 ([0]).

This makes naming consistent with BPF_BTF_LOAD command, sets up an API
for extensibility in the future, moves options parameters (log-related
fields) into optional options, and also allows to pass log_level
directly. It also removes higher-level retry logic with auto-allocated
buffer from low-level API. Customer is expected to handle that on their
own, if desired. This is similar to bpf_prog_load() behavior.

  [0] Closes: libbpf/libbpf#419

Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
tsipa pushed a commit to tsipa/bpf-next that referenced this issue Dec 7, 2021
Similar to previous bpf_prog_load() and bpf_map_create() APIs, add
bpf_btf_load() API which is taking optional OPTS struct. Schedule
bpf_load_btf() for deprecation in v0.8 ([0]).

This makes naming consistent with BPF_BTF_LOAD command, sets up an API
for extensibility in the future, moves options parameters (log-related
fields) into optional options, and also allows to pass log_level
directly. It also removes higher-level retry logic with auto-allocated
buffer from low-level API. Customer is expected to handle that on their
own, if desired. This is similar to bpf_prog_load() behavior.

  [0] Closes: libbpf/libbpf#419

Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
kernel-patches-bot pushed a commit to kernel-patches/bpf that referenced this issue Dec 7, 2021
Similar to previous bpf_prog_load() and bpf_map_create() APIs, add
bpf_btf_load() API which is taking optional OPTS struct. Schedule
bpf_load_btf() for deprecation in v0.8 ([0]).

This makes naming consistent with BPF_BTF_LOAD command, sets up an API
for extensibility in the future, moves options parameters (log-related
fields) into optional options, and also allows to pass log_level
directly. It also removes higher-level retry logic with auto-allocated
buffer from low-level API. Customer is expected to handle that on their
own, if desired. This is similar to bpf_prog_load() behavior.

  [0] Closes: libbpf/libbpf#419

Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
kernel-patches-bot pushed a commit to kernel-patches/bpf that referenced this issue Dec 8, 2021
Similar to previous bpf_prog_load() and bpf_map_create() APIs, add
bpf_btf_load() API which is taking optional OPTS struct. Schedule
bpf_load_btf() for deprecation in v0.8 ([0]).

This makes naming consistent with BPF_BTF_LOAD command, sets up an API
for extensibility in the future, moves options parameters (log-related
fields) into optional options, and also allows to pass log_level
directly. It also removes higher-level retry logic with auto-allocated
buffer from low-level API. Customer is expected to handle that on their
own, if desired. This is similar to bpf_prog_load() behavior.

  [0] Closes: libbpf/libbpf#419

Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
tsipa pushed a commit to tsipa/bpf-next that referenced this issue Dec 8, 2021
Similar to previous bpf_prog_load() and bpf_map_create() APIs, add
bpf_btf_load() API which is taking optional OPTS struct. Schedule
bpf_load_btf() for deprecation in v0.8 ([0]).

This makes naming consistent with BPF_BTF_LOAD command, sets up an API
for extensibility in the future, moves options parameters (log-related
fields) into optional options, and also allows to pass log_level
directly. It also removes higher-level retry logic with auto-allocated
buffer from low-level API. Customer is expected to handle that on their
own, if desired. This is similar to bpf_prog_load() behavior.

  [0] Closes: libbpf/libbpf#419

Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
tsipa pushed a commit to tsipa/bpf-next that referenced this issue Dec 9, 2021
Similar to previous bpf_prog_load() and bpf_map_create() APIs, add
bpf_btf_load() API which is taking optional OPTS struct. Schedule
bpf_load_btf() for deprecation in v0.8 ([0]).

This makes naming consistent with BPF_BTF_LOAD command, sets up an API
for extensibility in the future, moves options parameters (log-related
fields) into optional options, and also allows to pass log_level
directly.

It also removes log buffer auto-allocation logic from low-level API
(consistent with bpf_prog_load() behavior), but preserves a special
treatment of log_level == 0 with non-NULL log_buf, which matches
low-level bpf_prog_load() and high-level libbpf APIs for BTF and program
loading behaviors.

  [0] Closes: libbpf/libbpf#419

Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
fengguang pushed a commit to 0day-ci/linux that referenced this issue Dec 9, 2021
Similar to previous bpf_prog_load() and bpf_map_create() APIs, add
bpf_btf_load() API which is taking optional OPTS struct. Schedule
bpf_load_btf() for deprecation in v0.8 ([0]).

This makes naming consistent with BPF_BTF_LOAD command, sets up an API
for extensibility in the future, moves options parameters (log-related
fields) into optional options, and also allows to pass log_level
directly.

It also removes log buffer auto-allocation logic from low-level API
(consistent with bpf_prog_load() behavior), but preserves a special
treatment of log_level == 0 with non-NULL log_buf, which matches
low-level bpf_prog_load() and high-level libbpf APIs for BTF and program
loading behaviors.

  [0] Closes: libbpf/libbpf#419

Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
kernel-patches-bot pushed a commit to kernel-patches/bpf that referenced this issue Dec 9, 2021
Similar to previous bpf_prog_load() and bpf_map_create() APIs, add
bpf_btf_load() API which is taking optional OPTS struct. Schedule
bpf_load_btf() for deprecation in v0.8 ([0]).

This makes naming consistent with BPF_BTF_LOAD command, sets up an API
for extensibility in the future, moves options parameters (log-related
fields) into optional options, and also allows to pass log_level
directly.

It also removes log buffer auto-allocation logic from low-level API
(consistent with bpf_prog_load() behavior), but preserves a special
treatment of log_level == 0 with non-NULL log_buf, which matches
low-level bpf_prog_load() and high-level libbpf APIs for BTF and program
loading behaviors.

  [0] Closes: libbpf/libbpf#419

Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
fengguang pushed a commit to 0day-ci/linux that referenced this issue Dec 9, 2021
Similar to previous bpf_prog_load() and bpf_map_create() APIs, add
bpf_btf_load() API which is taking optional OPTS struct. Schedule
bpf_load_btf() for deprecation in v0.8 ([0]).

This makes naming consistent with BPF_BTF_LOAD command, sets up an API
for extensibility in the future, moves options parameters (log-related
fields) into optional options, and also allows to pass log_level
directly.

It also removes log buffer auto-allocation logic from low-level API
(consistent with bpf_prog_load() behavior), but preserves a special
treatment of log_level == 0 with non-NULL log_buf, which matches
low-level bpf_prog_load() and high-level libbpf APIs for BTF and program
loading behaviors.

  [0] Closes: libbpf/libbpf#419

Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
kernel-patches-bot pushed a commit to kernel-patches/bpf that referenced this issue Dec 9, 2021
Similar to previous bpf_prog_load() and bpf_map_create() APIs, add
bpf_btf_load() API which is taking optional OPTS struct. Schedule
bpf_load_btf() for deprecation in v0.8 ([0]).

This makes naming consistent with BPF_BTF_LOAD command, sets up an API
for extensibility in the future, moves options parameters (log-related
fields) into optional options, and also allows to pass log_level
directly.

It also removes log buffer auto-allocation logic from low-level API
(consistent with bpf_prog_load() behavior), but preserves a special
treatment of log_level == 0 with non-NULL log_buf, which matches
low-level bpf_prog_load() and high-level libbpf APIs for BTF and program
loading behaviors.

  [0] Closes: libbpf/libbpf#419

Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
tsipa pushed a commit to tsipa/bpf-next that referenced this issue Dec 9, 2021
Similar to previous bpf_prog_load() and bpf_map_create() APIs, add
bpf_btf_load() API which is taking optional OPTS struct. Schedule
bpf_load_btf() for deprecation in v0.8 ([0]).

This makes naming consistent with BPF_BTF_LOAD command, sets up an API
for extensibility in the future, moves options parameters (log-related
fields) into optional options, and also allows to pass log_level
directly.

It also removes log buffer auto-allocation logic from low-level API
(consistent with bpf_prog_load() behavior), but preserves a special
treatment of log_level == 0 with non-NULL log_buf, which matches
low-level bpf_prog_load() and high-level libbpf APIs for BTF and program
loading behaviors.

  [0] Closes: libbpf/libbpf#419

Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
kernel-patches-bot pushed a commit to kernel-patches/bpf that referenced this issue Dec 9, 2021
Similar to previous bpf_prog_load() and bpf_map_create() APIs, add
bpf_btf_load() API which is taking optional OPTS struct. Schedule
bpf_load_btf() for deprecation in v0.8 ([0]).

This makes naming consistent with BPF_BTF_LOAD command, sets up an API
for extensibility in the future, moves options parameters (log-related
fields) into optional options, and also allows to pass log_level
directly.

It also removes log buffer auto-allocation logic from low-level API
(consistent with bpf_prog_load() behavior), but preserves a special
treatment of log_level == 0 with non-NULL log_buf, which matches
low-level bpf_prog_load() and high-level libbpf APIs for BTF and program
loading behaviors.

  [0] Closes: libbpf/libbpf#419

Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
kernel-patches-bot pushed a commit to kernel-patches/bpf that referenced this issue Dec 9, 2021
Similar to previous bpf_prog_load() and bpf_map_create() APIs, add
bpf_btf_load() API which is taking optional OPTS struct. Schedule
bpf_load_btf() for deprecation in v0.8 ([0]).

This makes naming consistent with BPF_BTF_LOAD command, sets up an API
for extensibility in the future, moves options parameters (log-related
fields) into optional options, and also allows to pass log_level
directly.

It also removes log buffer auto-allocation logic from low-level API
(consistent with bpf_prog_load() behavior), but preserves a special
treatment of log_level == 0 with non-NULL log_buf, which matches
low-level bpf_prog_load() and high-level libbpf APIs for BTF and program
loading behaviors.

  [0] Closes: libbpf/libbpf#419

Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
kernel-patches-bot pushed a commit to kernel-patches/bpf that referenced this issue Dec 9, 2021
Similar to previous bpf_prog_load() and bpf_map_create() APIs, add
bpf_btf_load() API which is taking optional OPTS struct. Schedule
bpf_load_btf() for deprecation in v0.8 ([0]).

This makes naming consistent with BPF_BTF_LOAD command, sets up an API
for extensibility in the future, moves options parameters (log-related
fields) into optional options, and also allows to pass log_level
directly.

It also removes log buffer auto-allocation logic from low-level API
(consistent with bpf_prog_load() behavior), but preserves a special
treatment of log_level == 0 with non-NULL log_buf, which matches
low-level bpf_prog_load() and high-level libbpf APIs for BTF and program
loading behaviors.

  [0] Closes: libbpf/libbpf#419

Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
kernel-patches-bot pushed a commit to kernel-patches/bpf that referenced this issue Dec 9, 2021
Similar to previous bpf_prog_load() and bpf_map_create() APIs, add
bpf_btf_load() API which is taking optional OPTS struct. Schedule
bpf_load_btf() for deprecation in v0.8 ([0]).

This makes naming consistent with BPF_BTF_LOAD command, sets up an API
for extensibility in the future, moves options parameters (log-related
fields) into optional options, and also allows to pass log_level
directly.

It also removes log buffer auto-allocation logic from low-level API
(consistent with bpf_prog_load() behavior), but preserves a special
treatment of log_level == 0 with non-NULL log_buf, which matches
low-level bpf_prog_load() and high-level libbpf APIs for BTF and program
loading behaviors.

  [0] Closes: libbpf/libbpf#419

Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Link: https://lore.kernel.org/bpf/20211209193840.1248570-3-andrii@kernel.org
anakryiko added a commit to anakryiko/libbpf that referenced this issue Dec 10, 2021
Similar to previous bpf_prog_load() and bpf_map_create() APIs, add
bpf_btf_load() API which is taking optional OPTS struct. Schedule
bpf_load_btf() for deprecation in v0.8 ([0]).

This makes naming consistent with BPF_BTF_LOAD command, sets up an API
for extensibility in the future, moves options parameters (log-related
fields) into optional options, and also allows to pass log_level
directly.

It also removes log buffer auto-allocation logic from low-level API
(consistent with bpf_prog_load() behavior), but preserves a special
treatment of log_level == 0 with non-NULL log_buf, which matches
low-level bpf_prog_load() and high-level libbpf APIs for BTF and program
loading behaviors.

  [0] Closes: libbpf#419

Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Link: https://lore.kernel.org/bpf/20211209193840.1248570-3-andrii@kernel.org
tsipa pushed a commit to tsipa/bpf-next that referenced this issue Dec 10, 2021
Similar to previous bpf_prog_load() and bpf_map_create() APIs, add
bpf_btf_load() API which is taking optional OPTS struct. Schedule
bpf_load_btf() for deprecation in v0.8 ([0]).

This makes naming consistent with BPF_BTF_LOAD command, sets up an API
for extensibility in the future, moves options parameters (log-related
fields) into optional options, and also allows to pass log_level
directly.

It also removes log buffer auto-allocation logic from low-level API
(consistent with bpf_prog_load() behavior), but preserves a special
treatment of log_level == 0 with non-NULL log_buf, which matches
low-level bpf_prog_load() and high-level libbpf APIs for BTF and program
loading behaviors.

  [0] Closes: libbpf/libbpf#419

Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Link: https://lore.kernel.org/bpf/20211209193840.1248570-3-andrii@kernel.org
bella485 pushed a commit to bella485/centos-stream-9 that referenced this issue May 1, 2024
Bugzilla: https://bugzilla.redhat.com/2069046

Upstream Status: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git

commit 0ed08d6725b5116aaad7a0082d721286e0a43dca
Author: Andrii Nakryiko <andrii@kernel.org>
Date:   Thu Dec 9 11:38:30 2021 -0800

    libbpf: Add OPTS-based bpf_btf_load() API

    Similar to previous bpf_prog_load() and bpf_map_create() APIs, add
    bpf_btf_load() API which is taking optional OPTS struct. Schedule
    bpf_load_btf() for deprecation in v0.8 ([0]).

    This makes naming consistent with BPF_BTF_LOAD command, sets up an API
    for extensibility in the future, moves options parameters (log-related
    fields) into optional options, and also allows to pass log_level
    directly.

    It also removes log buffer auto-allocation logic from low-level API
    (consistent with bpf_prog_load() behavior), but preserves a special
    treatment of log_level == 0 with non-NULL log_buf, which matches
    low-level bpf_prog_load() and high-level libbpf APIs for BTF and program
    loading behaviors.

      [0] Closes: libbpf/libbpf#419

    Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
    Signed-off-by: Alexei Starovoitov <ast@kernel.org>
    Link: https://lore.kernel.org/bpf/20211209193840.1248570-3-andrii@kernel.org

Signed-off-by: Artem Savkov <asavkov@redhat.com>
bella485 pushed a commit to bella485/centos-stream-9 that referenced this issue May 1, 2024
Bugzilla: https://bugzilla.redhat.com/2069046

Upstream Status: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git

commit 0ed08d6725b5116aaad7a0082d721286e0a43dca
Author: Andrii Nakryiko <andrii@kernel.org>
Date:   Thu Dec 9 11:38:30 2021 -0800

    libbpf: Add OPTS-based bpf_btf_load() API

    Similar to previous bpf_prog_load() and bpf_map_create() APIs, add
    bpf_btf_load() API which is taking optional OPTS struct. Schedule
    bpf_load_btf() for deprecation in v0.8 ([0]).

    This makes naming consistent with BPF_BTF_LOAD command, sets up an API
    for extensibility in the future, moves options parameters (log-related
    fields) into optional options, and also allows to pass log_level
    directly.

    It also removes log buffer auto-allocation logic from low-level API
    (consistent with bpf_prog_load() behavior), but preserves a special
    treatment of log_level == 0 with non-NULL log_buf, which matches
    low-level bpf_prog_load() and high-level libbpf APIs for BTF and program
    loading behaviors.

      [0] Closes: libbpf/libbpf#419

    Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
    Signed-off-by: Alexei Starovoitov <ast@kernel.org>
    Link: https://lore.kernel.org/bpf/20211209193840.1248570-3-andrii@kernel.org

Signed-off-by: Artem Savkov <asavkov@redhat.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
libbpf-1.0 Tasks related to libbpf-1.0 release
Projects
None yet
Development

No branches or pull requests

1 participant