libbpf: move bpf_for(), bpf_for_each(), and bpf_repeat() into bpf_helpers.h
authorAndrii Nakryiko <andrii@kernel.org>
Tue, 18 Apr 2023 00:21:47 +0000 (17:21 -0700)
committerAlexei Starovoitov <ast@kernel.org>
Tue, 18 Apr 2023 19:45:11 +0000 (12:45 -0700)
commitc5e64741670883a5b35d42f3125d611f5a4aa14f
treea5bc0279a6bb10b8594dc89c6f4435460b303325
parent30bbfe3236b01b81ed5f4a91cd9d87a236b182e3
libbpf: move bpf_for(), bpf_for_each(), and bpf_repeat() into bpf_helpers.h

To make it easier for bleeding-edge BPF applications, such as sched_ext,
to utilize open-coded iterators, move bpf_for(), bpf_for_each(), and
bpf_repeat() macros from selftests/bpf-internal bpf_misc.h helper, to
libbpf-provided bpf_helpers.h header.

Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Link: https://lore.kernel.org/r/20230418002148.3255690-6-andrii@kernel.org
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
tools/lib/bpf/bpf_helpers.h
tools/testing/selftests/bpf/progs/bpf_misc.h