函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:__queue_map_get

函数原型:static int __queue_map_get(struct bpf_map *map, void *value, bool delete)

返回类型:int

参数:

类型参数名称
struct bpf_map *map
void *value
booldelete
116  qs等于bpf_queue_stack(map)
118  err等于0
121  raw_spin_lock_irqsave( & lock, flags)
123  如果queue_stack_map_is_empty(qs)则
124  memset(value, 0, value_size)
125  err等于负ENOENT
126  转到:out
129  ptr等于elements[tail * value_size]
130  内存复制(value, ptr, value_size)
132  如果delete
133  如果此条件成立可能性小(为编译器优化)(++tail >= max_entries + 1 )则tail等于0
137  out :
138  raw_spin_unlock_irqrestore( & lock, flags)
139  返回:err
调用者
名称描述
queue_map_peek_elemCalled from syscall or from eBPF program
queue_map_pop_elemCalled from syscall or from eBPF program