Function report |
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 activity | Download SCCT | Chinese |
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:
Type | Parameter | Name |
---|---|---|
struct bpf_map * | map | |
void * | value | |
u64 | flags |
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 |
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 |
Source code conversion tool public plug-in interface | X |
---|---|
Support c/c++/esqlc/java Oracle/Informix/Mysql Plug-in can realize: logical Report Code generation and batch code conversion |