]> git.baikalelectronics.ru Git - kernel.git/commit
bpf/test_run: support cgroup local storage
authorRoman Gushchin <guro@fb.com>
Thu, 2 Aug 2018 21:27:27 +0000 (14:27 -0700)
committerDaniel Borkmann <daniel@iogearbox.net>
Thu, 2 Aug 2018 22:47:32 +0000 (00:47 +0200)
commit39f852976aff24f357db7377b5a6793c6b24059a
treed48eaa45ce3ae99c846f7b4b1f55a246587edec1
parent4e41626e6e90745242a64e6a44f9e7bfa1b6970f
bpf/test_run: support cgroup local storage

Allocate a temporary cgroup storage to use for bpf program test runs.

Because the test program is not actually attached to a cgroup,
the storage is allocated manually just for the execution
of the bpf program.

If the program is executed multiple times, the storage is not zeroed
on each run, emulating multiple runs of the program, attached to
a real cgroup.

Signed-off-by: Roman Gushchin <guro@fb.com>
Cc: Alexei Starovoitov <ast@kernel.org>
Cc: Daniel Borkmann <daniel@iogearbox.net>
Acked-by: Martin KaFai Lau <kafai@fb.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
net/bpf/test_run.c