On Tue, Mar 21, 2023 at 4:28 PM Kui-Feng Lee <kuifeng@xxxxxxxx> wrote: > > bpf_map__attach_struct_ops() was creating a dummy bpf_link as a > placeholder, but now it is constructing an authentic one by calling > bpf_link_create() if the map has the BPF_F_LINK flag. > > You can flag a struct_ops map with BPF_F_LINK by calling > bpf_map__set_map_flags(). > > Signed-off-by: Kui-Feng Lee <kuifeng@xxxxxxxx> > --- LGTM. Acked-by: Andrii Nakryiko <andrii@xxxxxxxxxx> > tools/lib/bpf/libbpf.c | 95 +++++++++++++++++++++++++++++++----------- > 1 file changed, 71 insertions(+), 24 deletions(-) > [...]