函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:kernel\bpf\local_storage.c Create Date:2022-07-27 14:31:37
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:bpf_cgroup_storage_calculate_size

函数原型:static size_t bpf_cgroup_storage_calculate_size(struct bpf_map *map, u32 *pages)

返回类型:size_t

参数:

类型参数名称
struct bpf_map *map
u32 *pages
464  如果cgroup_storage_type(map)恒等于BPF_CGROUP_STORAGE_SHARED
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.(bpf_cgroup_storage的长度 + size, PAGE_SIZE)右移PAGE_SHIFT determines the page size
468  否则
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  返回:size
调用者
名称描述
bpf_cgroup_storage_alloc
bpf_cgroup_storage_free