libbpf: Introduce more granular state for bpf_object
authorMykyta Yatsenko <yatsenko@meta.com>
Mon, 3 Mar 2025 13:57:50 +0000 (13:57 +0000)
committerAlexei Starovoitov <ast@kernel.org>
Sat, 15 Mar 2025 18:48:28 +0000 (11:48 -0700)
commit9a9e347835d007f279274d175b9fcd9b47d9ee50
treec555f728f3bd36bcafdc234292999eccb22f23cb
parent6ef78c41911d34f02e26529a3ce3183589db4b82
libbpf: Introduce more granular state for bpf_object

We are going to split bpf_object loading into 2 stages: preparation and
loading. This will increase flexibility when working with bpf_object
and unlock some optimizations and use cases.
This patch substitutes a boolean flag (loaded) by more finely-grained
state for bpf_object.

Signed-off-by: Mykyta Yatsenko <yatsenko@meta.com>
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Link: https://lore.kernel.org/bpf/20250303135752.158343-3-mykyta.yatsenko5@gmail.com
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
tools/lib/bpf/libbpf.c