]> git.baikalelectronics.ru Git - kernel.git/commit
bpf: Switch to offsetofend in BPF_PROG_TEST_RUN
authorStanislav Fomichev <sdf@google.com>
Tue, 10 Dec 2019 19:19:33 +0000 (11:19 -0800)
committerDaniel Borkmann <daniel@iogearbox.net>
Wed, 11 Dec 2019 13:52:18 +0000 (14:52 +0100)
commit3d50421bb04017ad738cff3be32fc0409157c43b
treedfe609803b0fbe1536d8223c4e021c926ae30315
parentf65f5c80a2834ce6cc4c9a69ee1b6b5ad588ce41
bpf: Switch to offsetofend in BPF_PROG_TEST_RUN

Switch existing pattern of "offsetof(..., member) + FIELD_SIZEOF(...,
member)' to "offsetofend(..., member)" which does exactly what
we need without all the copy-paste.

Suggested-by: Andrii Nakryiko <andriin@fb.com>
Signed-off-by: Stanislav Fomichev <sdf@google.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Acked-by: Andrii Nakryiko <andriin@fb.com>
Link: https://lore.kernel.org/bpf/20191210191933.105321-1-sdf@google.com
net/bpf/test_run.c