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:31
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:bpf_cgroup_storage_calculate_size

Proto:static size_t bpf_cgroup_storage_calculate_size(struct bpf_map *map, u32 *pages)

Type:size_t

Parameter:

TypeParameterName
struct bpf_map *map
u32 *pages
464  If cgroup_storage_type(map) == BPF_CGROUP_STORAGE_SHARED Then
465  size = sizeof(structbpf_storage_buffer) + value_size
466  pages = und_up - round up to next specified power of 2*@x: the value to round*@y: multiple to round up to (must be a power of 2)* Rounds @x up to next multiple of @y (which must be a power of 2).* To perform arbitrary rounding up, use roundup() below.( size of bpf_cgroup_storage + size, PAGE_SIZE) >> PAGE_SHIFT determines the page size
468  Else
469  size = value_size
470  pages = und_up - round up to next specified power of 2*@x: the value to round*@y: multiple to round up to (must be a power of 2)* Rounds @x up to next multiple of @y (which must be a power of 2).* To perform arbitrary rounding up, use roundup() below.(und_up - round up to next specified power of 2*@x: the value to round*@y: multiple to round up to (must be a power of 2)* Rounds @x up to next multiple of @y (which must be a power of 2).* To perform arbitrary rounding up, use roundup() below.(size, 8) * num_possible_cpus(), PAGE_SIZE) >> PAGE_SHIFT determines the page size
474  Return size
Caller
NameDescribe
bpf_cgroup_storage_alloc
bpf_cgroup_storage_free