函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:prealloc_elems_and_freelist

函数原型:static int prealloc_elems_and_freelist(struct bpf_stack_map *smap)

返回类型:int

参数:

类型参数名称
struct bpf_stack_map *smap
63  elem_size等于sizeof(structstack_map_bucket)加value_size
66  elems等于bpf_map_area_alloc(elem_size * max_entries, numa_node)
68  如果非elems则返回:负ENOMEM
71  err等于SPDX-License-Identifier: GPL-2.0-only
72  如果err则转到:free_elems
75  pcpu_freelist_populate( & freelist, elems, elem_size, max_entries)
77  返回:0
79  free_elems :
80  bpf_map_area_free(elems)
81  返回:err
调用者
名称描述
stack_map_allocCalled from syscall