join_classid(9)
join_classid(9) π
Kernel API Manual bestie, we are looking at join_classid(9), and it is lowkey giving βtiny helper, big cgroupv1 energyβ β¨
πΈ NAME πΈ
join_classid β join a cgroupv1 net_cls classid π
β¨ SYNOPSIS β¨
int join_classid (void );
π¦ ARGUMENTS π¦
voidβ no arguments, bestie. Literally none. Not a single one. π«Ά
π DESCRIPTION π
Okay so this function expects the cgroup work dir to be already created, because we join it right here. No cap.
Thatβs what causes the process sockets to be tagged with the given net_cls classid. Iconic behavior, honestly π₯
On success, it returns 0. Otherwise, on failure, it returns 1. Periodt.
π SEE ALSO π
Kernel file ./tools/testing/selftests/bpf/cgroup_helpers.c is right there in the mix, and then thereβs this whole squad β go read them too, iykyk π
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)setup_classid_environment(9)set_classid(9)cleanup_classid_environment(9)get_classid_cgroup_id(9)get_cgroup1_hierarchy_id(9)open_classid(9)
Kernel API Manual, source/version ./tools/testing/selftests/bpf, October 2026 β bye bestie, mwah π
π¦ 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