]> git.baikalelectronics.ru Git - kernel.git/commit
libbpf: Simplify BPF program auto-attach code
authorAndrii Nakryiko <andrii@kernel.org>
Tue, 14 Sep 2021 01:47:32 +0000 (18:47 -0700)
committerAlexei Starovoitov <ast@kernel.org>
Tue, 14 Sep 2021 22:49:24 +0000 (15:49 -0700)
commit846e70ae97f64702cca3ede1ef91f723d9bdc65a
tree81f401da9d5eab5a1a06afc81189938aaab4c61f
parent4d278437434e2661931777917dae650b943558a2
libbpf: Simplify BPF program auto-attach code

Remove the need to explicitly pass bpf_sec_def for auto-attachable BPF
programs, as it is already recorded at bpf_object__open() time for all
recognized type of BPF programs. This further reduces number of explicit
calls to find_sec_def(), simplifying further refactorings.

No functional changes are done by this patch.

Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Acked-by: Martin KaFai Lau <kafai@fb.com>
Link: https://lore.kernel.org/bpf/20210914014733.2768-4-andrii@kernel.org
tools/lib/bpf/libbpf.c