| Function report | 
| Source Code: kernel\bpf\hashtab.c | Create Date:2022-07-28 13:10:07 | 
| Last Modify:2022-05-23 09:15:29 | Copyright©Brick | 
| home page | Tree | 
| Annotation kernel can get tool activity | Download SCCT | Chinese | 
Name:__htab_percpu_map_update_elem
Proto:static int __htab_percpu_map_update_elem(struct bpf_map *map, void *key, void *value, u64 map_flags, bool onallcpus)
Type:int
Parameter:
| Type | Parameter | Name | 
|---|---|---|
| struct bpf_map * | map | |
| void * | key | |
| void * | value | |
| u64 | map_flags | |
| bool | onallcpus | 
| 987 | If Value for the false possibility is greater at compile time(map_flags > update existing element ) Then Return -EINVAL | 
| 991 | WARN_ON_ONCE(!_read_lock_held() - might we be in RCU read-side critical section?* If CONFIG_DEBUG_LOCK_ALLOC is selected, returns nonzero iff in an RCU* read-side critical section) | 
| 995 | hash = htab_map_hash(key, key_size, hashrnd) | 
| 997 | b = __select_bucket(htab, hash) | 
| 1001 | raw_spin_lock_irqsave( & lock, flags) | 
| 1005 | ret = check_flags(htab, l_old, map_flags) | 
| 1009 | If l_old Then | 
| 1011 | pcpu_copy_value(htab, htab_elem_get_ptr(l_old, key_size), value, onallcpus) | 
| 1013 | Else | 
| 1022 | ret = 0 | 
| 1023 | err : | 
| 1024 | raw_spin_unlock_irqrestore( & lock, flags) | 
| 1025 | Return ret | 
| Name | Describe | 
|---|---|
| htab_percpu_map_update_elem | |
| bpf_percpu_hash_update | 
| 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 |