Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:kernel\bpf\arraymap.c Create Date:2022-07-28 13:11:33
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:fd_array_map_delete_elem

Proto:static int fd_array_map_delete_elem(struct bpf_map *map, void *key)

Type:int

Parameter:

TypeParameterName
struct bpf_map *map
void *key
605  array = container_of - cast a member of a structure out to the containing structure*@ptr: the pointer to the member.*@type: the type of the container struct this is embedded in.*@member: the name of the member within the struct.(map, structbpf_array, map)
607  index = key
609  If index >= max_entries Then Return -E2BIG
612  If map_poke_run Then
613  mutex_lock( & poke_mutex)
614  old_ptr = xchg(ptrs + index, NULL)
615  map_poke_run(map, index, old_ptr, NULL)
616  mutex_unlock - release the mutex*@lock: the mutex to be released* Unlock a mutex that has been locked by this task previously.* This function must not be used in interrupt context. Unlocking* of a not locked mutex is not allowed.
617  Else
618  old_ptr = xchg(ptrs + index, NULL)
621  If old_ptr Then
622  map_fd_put_ptr(old_ptr)
623  Return 0
624  Else
625  Return -ENOENT
Caller
NameDescribe
bpf_fd_array_map_cleardecrement refcnt of all bpf_progs that are stored in this map
perf_event_fd_array_release