projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1642a39
)
selftests/bpf: Use BPF_PROG2 for some fentry programs without struct arguments
author
Yonghong Song
<yhs@fb.com>
Wed, 31 Aug 2022 15:27:18 +0000
(08:27 -0700)
committer
Alexei Starovoitov
<ast@kernel.org>
Wed, 7 Sep 2022 02:51:14 +0000
(19:51 -0700)
Use BPF_PROG2 instead of BPF_PROG for programs in progs/timer.c
to test BPF_PROG2 for cases without struct arguments.
Signed-off-by: Yonghong Song <yhs@fb.com>
Link:
https://lore.kernel.org/r/20220831152718.2081091-1-yhs@fb.com
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
tools/testing/selftests/bpf/progs/timer.c
patch
|
blob
|
history
diff --git
a/tools/testing/selftests/bpf/progs/timer.c
b/tools/testing/selftests/bpf/progs/timer.c
index 0053c540217391ee3c95274e7c4aeb936adb264e..acda5c9cea9336e27848644b0f0b005b5647d006 100644
(file)
--- a/
tools/testing/selftests/bpf/progs/timer.c
+++ b/
tools/testing/selftests/bpf/progs/timer.c
@@
-120,7
+120,7
@@
static int timer_cb1(void *map, int *key, struct bpf_timer *timer)
}
SEC("fentry/bpf_fentry_test1")
-int BPF_PROG
(test1, int
a)
+int BPF_PROG
2(test1, int,
a)
{
struct bpf_timer *arr_timer, *lru_timer;
struct elem init = {};
@@
-236,7
+236,7
@@
int bpf_timer_test(void)
}
SEC("fentry/bpf_fentry_test2")
-int BPF_PROG
(test2, int a, int
b)
+int BPF_PROG
2(test2, int, a, int,
b)
{
struct hmap_elem init = {}, *val;
int key = HTAB, key_malloc = HTAB_MALLOC;