setup_classid_environment(9)
β¨ NAME β¨
okay bestie, welcome to setup_classid_environment(9) from the Kernel API Manual π β this one is literally about Setup the cgroupv1 net_cls environment. No cap, that's the whole name vibe.
π SYNOPSIS π
int setup_classid_environment (void );
π¦ ARGUMENTS π¦
voidβ no arguments, bestie. Not a single one. π
πΈ DESCRIPTION πΈ
okay so listen π: this function should only be called in a custom mount namespace, like one created by running setup_cgroup_environment. Do not just raw-dog it in your normal namespace, fr fr π.
bestie, this is a caveat, not a suggestion β only call it in a custom mount namespace, e.g. created by running setup_cgroup_environment. π«Ά
After calling this function, cleanup_classid_environment should be called once testing is complete. Yes, cleanup is also main character energy π§Ήβ¨.
This function will print an error to stderr and return 1 if it is unable to setup the cgroup environment. If setup is successful, 0 is returned. That's it β 1 for "bestie it didn't work π", 0 for "slay, it worked π
".
π₯ SEE ALSO π₯
- Kernel file:
./tools/testing/selftests/bpf/cgroup_helpers.c enable_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)set_classid(9)join_classid(9)cleanup_classid_environment(9)get_classid_cgroup_id(9)get_cgroup1_hierarchy_id(9)open_classid(9)
okay that's the whole page, bestie π source/version vibes: ./tools/testing/selftests/bpf; date: October 2026; and yes, the page itself is setup_classid_environment(9) β bye, love u, periodt πβ¨
π¦ 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