bpf, selftests: Add cgroup v1 net_cls classid helpers
authorDaniel Borkmann <daniel@iogearbox.net>
Mon, 13 Sep 2021 23:07:58 +0000 (01:07 +0200)
committerAlexei Starovoitov <ast@kernel.org>
Mon, 13 Sep 2021 23:35:58 +0000 (16:35 -0700)
commitd8079d8026f82e4435445297d1b77bba1c4c7960
treea90c327d7749b21c236d1ccdd8bc21f9282c2af9
parent8520e224f547cd070c7c8f97b1fc6d58cff7ccaa
bpf, selftests: Add cgroup v1 net_cls classid helpers

Minimal set of helpers for net_cls classid cgroupv1 management in order
to set an id, join from a process, initiate setup and teardown. cgroupv2
helpers are left as-is, but reused where possible.

Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Acked-by: Andrii Nakryiko <andrii@kernel.org>
Link: https://lore.kernel.org/bpf/20210913230759.2313-2-daniel@iogearbox.net
tools/testing/selftests/bpf/cgroup_helpers.c
tools/testing/selftests/bpf/cgroup_helpers.h