函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:bpf_lru_init

函数原型:int bpf_lru_init(struct bpf_lru *lru, bool percpu, u32 hash_offset, del_from_htab_func del_from_htab, void *del_arg)

返回类型:int

参数:

类型参数名称
struct bpf_lru *lru
boolpercpu
u32hash_offset
del_from_htab_funcdel_from_htab
void *del_arg
650  如果percpu
651  percpu_lru等于alloc_percpu(structbpf_lru_list)
652  如果非percpu_lru则返回:负ENOMEM
658  l等于per_cpu_ptr(percpu_lru, cpu)
661  nr_scans等于PERCPU_NR_SCANS
662  否则
663  clru等于common_lru
665  local_list等于alloc_percpu(structbpf_lru_locallist)
666  如果非local_list则返回:负ENOMEM
676  bpf_lru_list_init( & lru_list)
677  nr_scans等于LOCAL_NR_SCANS
680  percpu等于percpu
681  del_from_htab等于del_from_htab
682  del_arg等于del_arg
683  hash_offset等于hash_offset
685  返回:0
调用者
名称描述
prealloc_init