Re: [PATCH -next 4/4] cgroup: bpf: Add an example to do cgroup checking in BPF

2016-06-21 Thread Alexei Starovoitov
On Tue, Jun 21, 2016 at 05:23:22PM -0700, Martin KaFai Lau wrote: > test_cgrp2_array_pin.c: > A userland program that creates a bpf_map (BPF_MAP_TYPE_GROUP_ARRAY), > pouplates/updates it with a cgroup2's backed fd and pins it to a > bpf-fs's file. The pinned file can be loaded by tc and then used

[PATCH -next 4/4] cgroup: bpf: Add an example to do cgroup checking in BPF

2016-06-21 Thread Martin KaFai Lau
test_cgrp2_array_pin.c: A userland program that creates a bpf_map (BPF_MAP_TYPE_GROUP_ARRAY), pouplates/updates it with a cgroup2's backed fd and pins it to a bpf-fs's file. The pinned file can be loaded by tc and then used by the bpf prog later. This program can also update an existing pinned ar