]> 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)
commitea1f997e826e0a2336d6d8ef2c941c5dbd3c5364
treed48eaa45ce3ae99c846f7b4b1f55a246587edec1
parent526fed0d27e89ddcb4ecf533cf7e7b8a315fdf2e
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