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:51
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:bpf_percpu_lru_populate

Proto:static void bpf_percpu_lru_populate(struct bpf_lru *lru, void *buf, u32 node_offset, u32 elem_size, u32 nr_elems)

Type:void

Parameter:

TypeParameterName
struct bpf_lru *lru
void *buf
u32node_offset
u32elem_size
u32nr_elems
584  pcpu_entries = nr_elems / num_possible_cpus()
586  i = 0
588  for_each_possible_cpu(cpu)
591  l = per_cpu_ptr(percpu_lru, cpu)
592  again :
593  node = buf + node_offset
594  cpu = cpu
595  type = BPF_LRU_LIST_T_FREE
596  ref = 0
597  list_add - add a new entry*@new: new entry to be added*@head: list head to add it after* Insert a new entry after the specified head.* This is good for implementing stacks.
598  i++
599  buf += elem_size
600  If i == nr_elems Then Break
602  If i % pcpu_entries Then Go to again
Caller
NameDescribe
bpf_lru_populate