Skip to content

Commit 74bf80e

Browse files
tixxdzjrfastab
authored andcommitted
bpf:cgroup: add Cgroup operations definition
Add MSG_OP_CGROUP and its sub operations. These operations will be forwarded to the ring buffer for logging and debugging purpose, except for MSG_OP_CGROUP_ATTACH_TASK that is used to discover cgroup config. - MSG_OP_CGROUP_MKDIR: is when cgroup is created, we send event for debugging. - MSG_OP_CGROUP_RMDIR: is when cgroup is removed from fs, used for debugging. - MSG_OP_CGROUP_RELEASE: is when cgroup is released, used for debugging. - MSG_OP_CGROUP_ATTACH_TASK: is when a task is migrated to a cgroup, used to migrate Tetragon so it discover current cgroup environment. Signed-off-by: Djalal Harouni <[email protected]>
1 parent 1ceecb3 commit 74bf80e

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

bpf/lib/msg_types.h

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,20 @@ enum msg_ops {
2626

2727
MSG_OP_DATA = 24,
2828

29+
MSG_OP_CGROUP = 25,
30+
2931
MSG_OP_MAX,
3032
};
33+
34+
enum msg_cgroup_ops {
35+
MSG_OP_CGROUP_UNDEF = 0,
36+
MSG_OP_CGROUP_MKDIR =
37+
1, /* cgroup_mkdir tracepoint, used for debugging */
38+
MSG_OP_CGROUP_RMDIR =
39+
2, /* cgroup_rmdir tracepoint, used for debugging */
40+
MSG_OP_CGROUP_RELEASE =
41+
3, /* cgroup_release tracepoint, used for debugging */
42+
MSG_OP_CGROUP_ATTACH_TASK = 10, /* cgroup_attach_task tracepoint */
43+
};
44+
3145
#endif // _MSG_TYPES_

0 commit comments

Comments
 (0)