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

clean-up bpftool from legacy support #4012

Closed
wants to merge 6 commits into from

Conversation

kernel-patches-bot
Copy link

Pull request for series with
subject: clean-up bpftool from legacy support
version: 3
url: https://patchwork.kernel.org/project/netdevbpf/list/?series=694820

@kernel-patches-bot
Copy link
Author

Upstream branch: b548b17
series: https://patchwork.kernel.org/project/netdevbpf/list/?series=694820
version: 3

@kernel-patches-bot
Copy link
Author

Upstream branch: f12ed9c
series: https://patchwork.kernel.org/project/netdevbpf/list/?series=694820
version: 3

@kernel-patches-bot
Copy link
Author

Upstream branch: dfd0afb
series: https://patchwork.kernel.org/project/netdevbpf/list/?series=694820
version: 3

@kernel-patches-bot
Copy link
Author

Upstream branch: e662c77
series: https://patchwork.kernel.org/project/netdevbpf/list/?series=694820
version: 3

@kernel-patches-bot
Copy link
Author

Upstream branch: bd56f86
series: https://patchwork.kernel.org/project/netdevbpf/list/?series=694820
version: 3

@kernel-patches-bot
Copy link
Author

Upstream branch: 6728aea
series: https://patchwork.kernel.org/project/netdevbpf/list/?series=694820
version: 3

@kernel-patches-bot
Copy link
Author

Upstream branch: 26a9b43
series: https://patchwork.kernel.org/project/netdevbpf/list/?series=694820
version: 3

Following:
  commit bd05410 ("libbpf: enforce strict libbpf 1.0 behaviors")
  commit 93b8952 ("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 <sahid.ferdjaoui@industrialdiscipline.com>
Acked-by: Yonghong Song <yhs@fb.com>
Reviewed-by: Quentin Monnet <quentin@isovalent.com>
There is no reasons to keep PTR_ERR() when kern_btf=NULL, let's just
return 0.
This also cleans this part of code from using libbpf_get_error().

Signed-off-by: Sahid Orentino Ferdjaoui <sahid.ferdjaoui@industrialdiscipline.com>
Acked-by: Yonghong Song <yhs@fb.com>
It is expected that errno be passed to strerror(). This also cleans
this part of code from using libbpf_get_error().

Signed-off-by: Sahid Orentino Ferdjaoui <sahid.ferdjaoui@industrialdiscipline.com>
Acked-by: Yonghong Song <yhs@fb.com>
Reviewed-by: Quentin Monnet <quentin@isovalent.com>
bpftool is now totally compliant with libbpf 1.0 mode and is not
expected to be compiled with pre-1.0, let's clean-up the usage of
libbpf_get_error().

The changes stay aligned with returned errors always negative.

- In tools/bpf/bpftool/btf.c This fixes an unintialized local variable
`err` in function do_dump() because it may now be returned without
having been set.
- This also removes the checks on NULL pointers before calling
btf__free() because that function already does the check.

Signed-off-by: Sahid Orentino Ferdjaoui <sahid.ferdjaoui@industrialdiscipline.com>
@kernel-patches-bot
Copy link
Author

Upstream branch: 32637e3
series: https://patchwork.kernel.org/project/netdevbpf/list/?series=694820
version: 3

The function contains a single btf__free() call which can be
inlined. Credits to Yonghong Song.

Signed-off-by: Sahid Orentino Ferdjaoui <sahid.ferdjaoui@industrialdiscipline.com>
Acked-by: Yonghong Song <yhs@fb.com>
Reviewed-by: Quentin Monnet <quentin@isovalent.com>
@kernel-patches-bot
Copy link
Author

At least one diff in series https://patchwork.kernel.org/project/netdevbpf/list/?series=694820 expired. Closing PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants