open_classid(9)
β¨ open_classid(9) β¨
okay so bestie, we're in the Kernel API Manual today and this page is literally called open_classid β say it with me, it's giving cgroupv1 energy π
πΈ NAME πΈ
open_classid β opens a cgroupv1 net_cls classid, that's the whole vibe π
π¦ SYNOPSIS π¦
int open_classid (void );
π ARGUMENTS π
voidβ no arguments. none. zero. she takes nothing and she still serves π
π₯ DESCRIPTION π₯
So here's the tea β β this function expects the cgroup work dir to already be created, because that's where she does the opening. Like, she's not gonna make the folder for you, she's just gonna walk in and open the door, yk? iykyk π
On success, it returns the file descriptor. On failure it returns -1. that's it. that's the whole story. no cap π
π SEE ALSO π
the whole friend group came to support, we love a squad π«Ά:
Kernel file ./tools/testing/selftests/bpf/cgroup_helpers.cenable_controllers(9)write_cgroup_file(9)write_cgroup_file_parent(9)setup_cgroup_environment(9)join_cgroup(9)join_root_cgroup(9)join_parent_cgroup(9)set_cgroup_xattr(9)__cleanup_cgroup_environment(9)cleanup_cgroup_environment(9)get_root_cgroup(9)create_and_get_cgroup(9)get_cgroup_id_from_path(9)setup_classid_environment(9)set_classid(9)join_classid(9)cleanup_classid_environment(9)get_classid_cgroup_id(9)get_cgroup1_hierarchy_id(9)
fr fr go read the source before you poke at this, it lives at ./tools/testing/selftests/bpf/cgroup_helpers.c and she's iconic β¨
and that's the page bestie, mwah π this one came from ./tools/testing/selftests/bpf, dated October 2026 β periodt, stan, and have a blessed lil cgroupv1 day πβπ§
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms