Function report |
Source Code:kernel\bpf\arraymap.c |
Create Date:2022-07-28 13:11:13 |
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 array_map_update_elem(struct bpf_map *map, void *key, void *value, u64 map_flags)
Type:int
Parameter:
Type | Parameter | Name |
---|---|---|
struct bpf_map * | map | |
void * | key | |
void * | value | |
u64 | map_flags |
305 | If Value for the false possibility is greater at compile time((map_flags & ~spin_lock-ed map_lookup/map_update ) > update existing element ) Then Return -EINVAL |
309 | If Value for the false possibility is greater at compile time(index >= max_entries) Then Return -E2BIG |
313 | If Value for the false possibility is greater at compile time(map_flags & create new element if it didn't exist ) Then Return -EEXIST |
317 | If Value for the false possibility is greater at compile time((map_flags & spin_lock-ed map_lookup/map_update ) && !map_value_has_spin_lock(map)) Then Return -EINVAL |
321 | If map_type == BPF_MAP_TYPE_PERCPU_ARRAY Then |
322 | No 3D Now!(this_cpu_ptr(pptrs[index & index_mask]), value, value_size) |
324 | Else |
325 | val = value + elem_size * (index & index_mask) |
327 | If map_flags & spin_lock-ed map_lookup/map_update Then copy_map_value_locked(map, val, value, false) |
329 | Else py everything but bpf_spin_lock |
332 | Return 0 |
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 |