On 5/24/24 3:30 PM, Kui-Feng Lee wrote:
diff --git a/tools/testing/selftests/bpf/progs/struct_ops_detach.c b/tools/testing/selftests/bpf/progs/struct_ops_detach.c new file mode 100644 index 000000000000..45eacc2ca657 --- /dev/null +++ b/tools/testing/selftests/bpf/progs/struct_ops_detach.c @@ -0,0 +1,9 @@ +// SPDX-License-Identifier: GPL-2.0 +/* Copyright (c) 2024 Meta Platforms, Inc. and affiliates. */ +#include <vmlinux.h> +#include "../bpf_testmod/bpf_testmod.h" + +char _license[] SEC("license") = "GPL"; + +SEC(".struct_ops.link") +struct bpf_testmod_ops testmod_do_detach
I was trying if the set can go without patch 6/7 but patch 5 cannot compile by itself... :(
progs/struct_ops_detach.c:6:16: error: expected ';' after top level declarator 6 | char _license[] SEC("license") = "GPL"; | ^ | ; progs/struct_ops_detach.c:8:5: error: expected parameter declarator 8 | SEC(".struct_ops.link") pw-bot: cr