函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:bpf_map_meta_alloc

函数原型:struct bpf_map *bpf_map_meta_alloc(int inner_map_ufd)

返回类型:struct bpf_map

参数:

类型参数名称
intinner_map_ufd
15  f等于fdget(inner_map_ufd)
16  inner_map等于 error is returned, fd is released.* On success caller should complete fd access with matching fdput()
17  如果是错误则返回:inner_map
23  如果map_type恒等于BPF_MAP_TYPE_PROG_ARRAYmap_type恒等于BPF_MAP_TYPE_CGROUP_STORAGEmap_type恒等于BPF_MAP_TYPE_PERCPU_CGROUP_STORAGE
26  fdput(f)
27  返回:错误号
31  如果inner_map_meta
32  fdput(f)
33  返回:错误号
36  如果map_value_has_spin_lock(inner_map)则
37  fdput(f)
38  返回:错误号
41  inner_map_meta_size等于inner_map_meta的长度
43  如果 The first two cachelines with read-mostly members of which some * are also accessed in fast-path (e.g. ops, max_entries).恒等于array_map_opsinner_map_meta_size等于sizeof(structbpf_array)
46  inner_map_meta等于分配内存并置零
47  如果非inner_map_meta
48  fdput(f)
49  返回:错误号
52  map_type等于map_type
53  key_size等于key_size
54  value_size等于value_size
55  map_flags等于map_flags
56  max_entries等于max_entries
57  >=0 valid offset, <0 error 等于 >=0 valid offset, <0 error
60  The first two cachelines with read-mostly members of which some * are also accessed in fast-path (e.g. ops, max_entries).等于 The first two cachelines with read-mostly members of which some * are also accessed in fast-path (e.g. ops, max_entries).
61  如果 The first two cachelines with read-mostly members of which some * are also accessed in fast-path (e.g. ops, max_entries).恒等于array_map_ops
62  unpriv_array等于unpriv_array
63  ({
63  循环
63  当0循环
63  ({})->index_mask = ({
64  __mptr等于inner_map
64  循环
64  当0循环
64  })->index_mask
67  fdput(f)
68  返回:inner_map_meta
调用者
名称描述
array_of_map_alloc
htab_of_map_alloc