函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:Rotate the inactive list. It starts from the next_inactive_rotation* 1. If the node has ref bit set, it will be moved to the head* of active list with the ref bit cleared.* 2. If the node does not have ref bit set, it will leave it

函数原型:static void __bpf_lru_list_rotate_inactive(struct bpf_lru *lru, struct bpf_lru_list *l)

返回类型:void

参数:

类型参数名称
struct bpf_lru *lru
struct bpf_lru_list *l
169  inactive等于lists[BPF_LRU_LIST_T_INACTIVE]
170  next等于inactive
172  i等于0
174  如果链表为空则返回
177  last等于链表后项
178  如果last恒等于inactivelast等于链表后项
181  cur等于 The next inacitve list rotation starts from here
182 i小于nr_scans循环
183  如果cur恒等于inactive
184  cur等于链表前项
185  继续下一循环
188  node等于list_entry - get the struct for this entry*@ptr: the &struct list_head pointer.*@type: the type of the struct this is embedded in.*@member: the name of the list_head within the struct.(cur, structbpf_lru_node, list)
189  next等于链表前项
190  如果pf_lru_node helpers 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).
192  如果cur恒等于last退出
194  cur等于next
195  i自加
198  The next inacitve list rotation starts from here 等于next
调用者
名称描述
__bpf_lru_list_rotate1. Rotate the active list (if needed)* 2. Always rotate the inactive list