Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:kernel\bpf\bpf_lru_list.c Create Date:2022-07-28 13:12:56
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:bpf_lru_init

Proto:int bpf_lru_init(struct bpf_lru *lru, bool percpu, u32 hash_offset, del_from_htab_func del_from_htab, void *del_arg)

Type:int

Parameter:

TypeParameterName
struct bpf_lru *lru
boolpercpu
u32hash_offset
del_from_htab_funcdel_from_htab
void *del_arg
650  If percpu Then
651  percpu_lru = alloc_percpu(structbpf_lru_list)
652  If Not percpu_lru Then Return -ENOMEM
661  nr_scans = PERCPU_NR_SCANS
662  Else
663  clru = common_lru
665  local_list = alloc_percpu(structbpf_lru_locallist)
666  If Not local_list Then Return -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  Return 0