diff options
author | Joanne Koong <joannelkoong@gmail.com> | 2023-04-20 00:14:14 -0700 |
---|---|---|
committer | Daniel Borkmann <daniel@iogearbox.net> | 2023-04-27 10:40:52 +0200 |
commit | d911ba7ceafd29606df4018bbd87a1642f9e6d88 (patch) | |
tree | e04de098eec6ea62f16a0d76ad564acedf89c05a /tools/testing/selftests/bpf/bpf_kfuncs.h | |
parent | 361f129f3cc185af6667aca0bec0be9a020a8abc (diff) | |
download | lwn-d911ba7ceafd29606df4018bbd87a1642f9e6d88.tar.gz lwn-d911ba7ceafd29606df4018bbd87a1642f9e6d88.zip |
selftests/bpf: Add tests for dynptr convenience helpers
Add various tests for the added dynptr convenience helpers.
Signed-off-by: Joanne Koong <joannelkoong@gmail.com>
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Link: https://lore.kernel.org/bpf/20230420071414.570108-6-joannelkoong@gmail.com
Diffstat (limited to 'tools/testing/selftests/bpf/bpf_kfuncs.h')
-rw-r--r-- | tools/testing/selftests/bpf/bpf_kfuncs.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/tools/testing/selftests/bpf/bpf_kfuncs.h b/tools/testing/selftests/bpf/bpf_kfuncs.h index 8c993ec8ceea..f3c41f8902a0 100644 --- a/tools/testing/selftests/bpf/bpf_kfuncs.h +++ b/tools/testing/selftests/bpf/bpf_kfuncs.h @@ -35,4 +35,10 @@ extern void *bpf_dynptr_slice(const struct bpf_dynptr *ptr, __u32 offset, extern void *bpf_dynptr_slice_rdwr(const struct bpf_dynptr *ptr, __u32 offset, void *buffer, __u32 buffer__szk) __ksym; +extern int bpf_dynptr_adjust(const struct bpf_dynptr *ptr, __u32 start, __u32 end) __ksym; +extern int bpf_dynptr_is_null(const struct bpf_dynptr *ptr) __ksym; +extern int bpf_dynptr_is_rdonly(const struct bpf_dynptr *ptr) __ksym; +extern __u32 bpf_dynptr_size(const struct bpf_dynptr *ptr) __ksym; +extern int bpf_dynptr_clone(const struct bpf_dynptr *ptr, struct bpf_dynptr *clone__init) __ksym; + #endif |