Function report |
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 activity | Download SCCT | Chinese |
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:
Type | Parameter | Name |
---|---|---|
struct bpf_lru * | lru | |
bool | percpu | |
u32 | hash_offset | |
del_from_htab_func | del_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 |
655 | for_each_possible_cpu(cpu) |
658 | l = per_cpu_ptr(percpu_lru, cpu) |
659 | bpf_lru_list_init(l) |
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 |
669 | for_each_possible_cpu(cpu) |
672 | loc_l = per_cpu_ptr(local_list, cpu) |
673 | bpf_lru_locallist_init(loc_l, cpu) |
676 | bpf_lru_list_init( & lru_list) |
677 | nr_scans = LOCAL_NR_SCANS |
681 | del_from_htab = del_from_htab |
683 | hash_offset = hash_offset |
685 | Return 0 |
Source code conversion tool public plug-in interface | X |
---|---|
Support c/c++/esqlc/java Oracle/Informix/Mysql Plug-in can realize: logical Report Code generation and batch code conversion |