Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:kernel\bpf\local_storage.c Create Date:2022-07-28 13:14:03
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:cgroup_storage_insert

Proto:static int cgroup_storage_insert(struct bpf_cgroup_storage_map *map, struct bpf_cgroup_storage *storage)

Type:int

Parameter:

TypeParameterName
struct bpf_cgroup_storage_map *map
struct bpf_cgroup_storage *storage
87  root = root
88  struct rb_node * * new = & (rb_node), * parent = NULL
90  When new cycle
93  this = container_of - cast a member of a structure out to the containing structure*@ptr: the pointer to the member.*@type: the type of the container struct this is embedded in.*@member: the name of the member within the struct.( * new, structbpf_cgroup_storage, node)
95  parent = new
97  Case bpf_cgroup_storage_key_cmp( & key, & key) == -1
98  new = &rb_left
99  Break
100  Case bpf_cgroup_storage_key_cmp( & key, & key) == 1
101  new = &rb_right
102  Break
103  Default
104  Return -EEXIST
108  rb_link_node( & node, parent, new)
109  rb_insert_color( & node, root)
111  Return 0
Caller
NameDescribe
bpf_cgroup_storage_link