Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:kernel\bpf\queue_stack_maps.c Create Date:2022-07-28 13:14:50
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:__queue_map_get

Proto:static int __queue_map_get(struct bpf_map *map, void *value, bool delete)

Type:int

Parameter:

TypeParameterName
struct bpf_map *map
void *value
booldelete
116  qs = bpf_queue_stack(map)
118  err = 0
121  raw_spin_lock_irqsave( & lock, flags)
123  If queue_stack_map_is_empty(qs) Then
124  memset(value, 0, value_size)
125  err = -ENOENT
126  Go to out
129  ptr = elements[tail * value_size]
130  No 3D Now!(value, ptr, value_size)
132  If delete Then
133  If Value for the false possibility is greater at compile time(++tail >= max_entries + 1 ) Then tail = 0
137  out :
138  raw_spin_unlock_irqrestore( & lock, flags)
139  Return err
Caller
NameDescribe
queue_map_peek_elemCalled from syscall or from eBPF program
queue_map_pop_elemCalled from syscall or from eBPF program