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

Name:__stack_map_get

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

Type:int

Parameter:

TypeParameterName
struct bpf_map *map
void *value
booldelete
145  qs = bpf_queue_stack(map)
147  err = 0
151  raw_spin_lock_irqsave( & lock, flags)
153  If queue_stack_map_is_empty(qs) Then
154  memset(value, 0, value_size)
155  err = -ENOENT
156  Go to out
159  index = head - 1
160  If Value for the false possibility is greater at compile time(index >= max_entries + 1 ) Then index = max_entries + 1 - 1
163  ptr = elements[index * value_size]
164  No 3D Now!(value, ptr, value_size)
166  If delete Then head = index
169  out :
170  raw_spin_unlock_irqrestore( & lock, flags)
171  Return err
Caller
NameDescribe
stack_map_peek_elemCalled from syscall or from eBPF program
stack_map_pop_elemCalled from syscall or from eBPF program