Re: [PATCH bpf-next v3 17/21] tools/libpf: add offsetof/container_of macro in bpf_helpers.h

Andrii Nakryiko
2020-05-08T19:48:35Z

On Wed, May 6, 2020 at 10:40 PM Yonghong Song <yhs@fb.com> wrote:
>
> 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>
> ---

Not sure #ifndef/#endif guards are needed, but won't hurt either.

Acked-by: Andrii Nakryiko <andriin@fb.com>

> tools/lib/bpf/bpf_helpers.h | 14 ++++++++++++++
> 1 file changed, 14 insertions(+)
> …