diff options
author | Geliang Tang <tanggeliang@kylinos.cn> | 2024-05-23 14:49:59 +0800 |
---|---|---|
committer | Daniel Borkmann <daniel@iogearbox.net> | 2024-06-03 19:32:54 +0200 |
commit | 3f32a115f61d31049e3e91d469bca849f712a979 (patch) | |
tree | 608a414439e62d5092e74fc0eb487559b864a43f /tools/perf/scripts/python/export-to-sqlite.py | |
parent | a9f0ea175948c21640ae1cc145e679db7fc45fa6 (diff) |
selftests/bpf: Use bpf_link attachments in test_sockmap
Switch attachments to bpf_link using bpf_program__attach_sockmap() instead
of bpf_prog_attach().
This patch adds a new array progs[] to replace prog_fd[] array, set in
populate_progs() for each program in bpf object.
And another new array links[] to save the attached bpf_link. It is
initalized as NULL in populate_progs, set as the return valuses of
bpf_program__attach_sockmap(), and detached by bpf_link__detach().
Signed-off-by: Geliang Tang <tanggeliang@kylinos.cn>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Tested-by: Jakub Sitnicki <jakub@cloudflare.com>
Acked-by: John Fastabend <john.fastabend@gmail.com>
Link: https://lore.kernel.org/bpf/32cf8376a810e2e9c719f8e4cfb97132ed2d1f9c.1716446893.git.tanggeliang@kylinos.cn
Diffstat (limited to 'tools/perf/scripts/python/export-to-sqlite.py')
0 files changed, 0 insertions, 0 deletions