]> git.baikalelectronics.ru Git - kernel.git/commit
tools/libpf: Add offsetof/container_of macro in bpf_helpers.h
authorYonghong Song <yhs@fb.com>
Sat, 9 May 2020 17:59:19 +0000 (10:59 -0700)
committerAlexei Starovoitov <ast@kernel.org>
Sun, 10 May 2020 00:05:27 +0000 (17:05 -0700)
commitcabc98fc5d93c97ed2197a07dfec9b0a01d339b9
treea163830ff0f8a707eb45743aa95b3947857e0d1f
parent57403c0cb7ae353c4da0658a3c96a66e99a907ca
tools/libpf: Add offsetof/container_of macro in bpf_helpers.h

These two helpers will be used later in bpf_iter bpf program
bpf_iter_netlink.c. Put them in bpf_helpers.h since they could
be useful in other cases.

Signed-off-by: Yonghong Song <yhs@fb.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Acked-by: Andrii Nakryiko <andriin@fb.com>
Link: https://lore.kernel.org/bpf/20200509175919.2477104-1-yhs@fb.com
tools/lib/bpf/bpf_helpers.h