Function report |
Source Code:kernel\bpf\syscall.c |
Create Date:2022-07-28 12:52:52 |
Last Modify:2022-05-19 18:06:12 | Copyright©Brick |
home page | Tree |
Annotation kernel can get tool activity | Download SCCT | Chinese |
Name:map_lookup_and_delete_elem
Proto:static int map_lookup_and_delete_elem(union bpf_attr *attr)
Type:int
Parameter:
Type | Parameter | Name |
---|---|---|
union bpf_attr * | attr |
1185 | __user * ukey = u64_to_user_ptr(key) |
1186 | __user * uvalue = u64_to_user_ptr(value) |
1194 | If helper macro to check that unused fields 'union bpf_attr' are zero (BPF_MAP_LOOKUP_AND_DELETE_ELEM) Then Return -EINVAL |
1198 | map = error is returned, fd is released.* On success caller should complete fd access with matching fdput() |
1201 | If Not (map_get_sys_perms(map, f) & Has write method(s) ) Then |
1206 | key = __bpf_copy_key(ukey, key_size) |
1212 | value_size = value_size |
1215 | value = Allocation memory |
1219 | If map_type == BPF_MAP_TYPE_QUEUE || map_type == BPF_MAP_TYPE_STACK Then |
1221 | err = map_pop_elem(map, value) |
1222 | Else |
1223 | err = -Operation is not supported |
1226 | If err Then Go to free_value |
1229 | If copy_to_user(uvalue, value, value_size) != 0 Then Go to free_value |
1232 | err = 0 |
1234 | free_value : |
1236 | free_key : |
1238 | err_put : |
1240 | 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 |