aboutsummaryrefslogtreecommitdiff
path: root/tools/testing/selftests/bpf/prog_tests/prog_array_init.c
diff options
context:
space:
mode:
authorGeliang Tang <[email protected]>2024-05-23 14:49:59 +0800
committerDaniel Borkmann <[email protected]>2024-06-03 19:32:54 +0200
commit3f32a115f61d31049e3e91d469bca849f712a979 (patch)
tree608a414439e62d5092e74fc0eb487559b864a43f /tools/testing/selftests/bpf/prog_tests/prog_array_init.c
parenta9f0ea175948c21640ae1cc145e679db7fc45fa6 (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 <[email protected]> Signed-off-by: Daniel Borkmann <[email protected]> Tested-by: Jakub Sitnicki <[email protected]> Acked-by: John Fastabend <[email protected]> Link: https://lore.kernel.org/bpf/32cf8376a810e2e9c719f8e4cfb97132ed2d1f9c.1716446893.git.tanggeliang@kylinos.cn
Diffstat (limited to 'tools/testing/selftests/bpf/prog_tests/prog_array_init.c')
0 files changed, 0 insertions, 0 deletions