]> git.proxmox.com Git - mirror_ubuntu-eoan-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)
commitf42ee093be2980f2689ea7a170d580364820f48b
treed48eaa45ce3ae99c846f7b4b1f55a246587edec1
parent34a6bbb8131b75daeb3e9be026d39d6463762baf
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