selftests/bpf: Add __contains macro to bpf_experimental.h
authorKumar Kartikeya Dwivedi <memxor@gmail.com>
Fri, 18 Nov 2022 01:56:09 +0000 (07:26 +0530)
committerAlexei Starovoitov <ast@kernel.org>
Fri, 18 Nov 2022 03:22:14 +0000 (19:22 -0800)
commit64069c72b4b8e44f6876249cc8f2e2ee4d209a93
treef91299450a71edf9e67b52bc3090e7e8ef5473e5
parentc22dfdd21592c5d56b49d5fba8de300ad7bf293c
selftests/bpf: Add __contains macro to bpf_experimental.h

Add user facing __contains macro which provides a convenient wrapper
over the verbose kernel specific BTF declaration tag required to
annotate BPF list head structs in user types.

Acked-by: Dave Marchevsky <davemarchevsky@fb.com>
Signed-off-by: Kumar Kartikeya Dwivedi <memxor@gmail.com>
Link: https://lore.kernel.org/r/20221118015614.2013203-20-memxor@gmail.com
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
tools/testing/selftests/bpf/bpf_experimental.h