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

Name:Called from syscall or from eBPF program

Proto:static int queue_stack_map_push_elem(struct bpf_map *map, void *value, u64 flags)

Type:int

Parameter:

TypeParameterName
struct bpf_map *map
void *value
u64flags
202  qs = bpf_queue_stack(map)
204  err = 0
210  replace = flags & update existing element
213  If flags & create new element if it didn't exist || flags > update existing element Then Return -EINVAL
216  raw_spin_lock_irqsave( & lock, irq_flags)
218  If queue_stack_map_is_full(qs) Then
219  If Not replace Then
220  err = -E2BIG
221  Go to out
224  If Value for the false possibility is greater at compile time(++tail >= max_entries + 1 ) Then tail = 0
228  dst = elements[head * value_size]
229  No 3D Now!(dst, value, value_size)
231  If Value for the false possibility is greater at compile time(++head >= max_entries + 1 ) Then head = 0
234  out :
235  raw_spin_unlock_irqrestore( & lock, irq_flags)
236  Return err