函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:bpf_percpu_lru_pop_free

函数原型:static struct bpf_lru_node *bpf_percpu_lru_pop_free(struct bpf_lru *lru, u32 hash)

返回类型:struct bpf_lru_node

参数:

类型参数名称
struct bpf_lru *lru
u32hash
403  struct bpf_lru_node * node = NULL
406  cpu等于These macros fold the SMP functionality into a single CPU system()
408  l等于per_cpu_ptr(percpu_lru, cpu)
410  raw_spin_lock_irqsave( & lock, flags)
412  1. Rotate the active list (if needed)* 2. Always rotate the inactive list
414  free_list等于lists[BPF_LRU_LIST_T_FREE]
415  如果链表为空Calls __bpf_lru_list_shrink_inactive() to shrink some* ref-bit-cleared nodes and move them to the designated* free list
419  如果非链表为空
420  node等于list_first_entry - get the first element from a list*@ptr: the list head to take the element from.*@type: the type of the struct this is embedded in.*@member: the name of the list_head within the struct.* Note, that list is expected to be not empty.(free_list, structbpf_lru_node, list)
421  *nodehash_offset的和等于hash
422  ref等于0
423  Move nodes between or within active and inactive list (like* active to inactive, inactive to active or tail of active back to* the head of active).
426  raw_spin_unlock_irqrestore( & lock, flags)
428  返回:node
调用者
名称描述
bpf_lru_pop_free