函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:kernel\bpf\syscall.c Create Date:2022-07-27 14:04:07
Last Modify:2022-05-19 18:06:12 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:find_and_alloc_map

函数原型:static struct bpf_map *find_and_alloc_map(union bpf_attr *attr)

返回类型:struct bpf_map

参数:

类型参数名称
union bpf_attr *attr
105  type等于 one of enum bpf_map_type
109  如果type大于等于ARRAY_SIZE - get the number of elements in array @arr*@arr: array to be sized(bpf_map_types)则返回:错误号
111  type等于array_index_nospec - sanitize an array index after a bounds check* For a code sequence like:* if (index < size) {* index = array_index_nospec(index, size);* val = array[index];* }* (type, ARRAY_SIZE - get the number of elements in array @arr*@arr: array to be sized(bpf_map_types))
112  ops等于bpf_map_types[type]
113  如果非ops则返回:错误号
116  如果map_alloc_check
117  err等于map_alloc_check(attr)
118  如果err则返回:错误号
121  如果 ifindex of netdev to create on ops等于bpf_map_offload_ops
123  map等于map_alloc(attr)
124  如果是错误则返回:map
126  The first two cachelines with read-mostly members of which some * are also accessed in fast-path (e.g. ops, max_entries).等于ops
127  map_type等于type
128  返回:map
调用者
名称描述
map_createalled via syscall