Function report |
Source Code:kernel\bpf\devmap.c |
Create Date:2022-07-28 13:22:33 |
Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
home page | Tree |
Annotation kernel can get tool activity | Download SCCT | Chinese |
Name:__dev_map_hash_update_elem
Proto:static int __dev_map_hash_update_elem(struct net *net, struct bpf_map *map, void *key, void *value, u64 map_flags)
Type:int
Parameter:
Type | Parameter | Name |
---|---|---|
struct net * | net | |
struct bpf_map * | map | |
void * | key | |
void * | value | |
u64 | map_flags |
674 | If Value for the false possibility is greater at compile time(map_flags > update existing element || !ifindex) Then Return -EINVAL |
677 | spin_lock_irqsave( & index_lock, flags) |
679 | old_dev = __dev_map_hash_lookup_elem(map, idx) |
680 | If old_dev && map_flags & create new element if it didn't exist Then Go to out_err |
689 | If old_dev Then |
691 | Else |
692 | If items >= max_entries Then |
693 | spin_unlock_irqrestore( & index_lock, flags) |
695 | Return -E2BIG |
697 | items++ |
702 | spin_unlock_irqrestore( & index_lock, flags) |
707 | Return 0 |
709 | out_err : |
710 | spin_unlock_irqrestore( & index_lock, flags) |
711 | Return err |
Name | Describe |
---|---|
dev_map_hash_update_elem |
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 |